lyx_mirror/src/insets
Enrico Forestieri 1ef605f625 Introduce a wrapper class for odocstream to help ensuring that no
blank lines may be inadvertently output. This is achieved by using two
special iomanip-like variables (breakln and safebreakln) in the lyx::
namespace. When they are inserted in the stream, a newline is output
only if not already at the beginning of a line. The difference between
breakln and safebreakln is that, if needed, the former outputs '\n'
and the latter "%\n".
In future, the new class will also be used for counting the number of
newlines issued. Even if the infractrure for doing that is already in
place, the counting is essentially still done the old way.
There are still places in the code where the functionality of the
class could be used, most probably. ATM, it is used for InsetTabular,
InsetListings, InsetFloat, and InsetText.
The Comment and GreyedOut insets required a special treatment and a
new InsetLayout parameter (Display) has been introduced. The default
for Display is "true", meaning that the corresponding latex
environment is of "display" type, i.e., it stands on its own, whereas
"false" means that the contents appear inline with the text. The
latter is the case for both Comment and GreyedOut insets.
Mostly, the only visible effects on latex exports should be the
disappearing of some redundant % chars and the appearing/disappearing
of null {} latex groups after a comment or lyxgreyedout environments
(they are related to the presence or absence of a space immediately
after those environments), as well as the fact that math environments
are now started on their own lines.
As a last thing, only the latex code between \begin{document} and
\end{document} goes through the new class, the preamble being directly
output through odocstream, as usual.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37360 a592a061-630c-0410-9148-cb99ea01b6c8
2011-01-29 02:41:13 +00:00
..
ExternalSupport.cpp Revert r36654. 2010-12-04 23:01:59 +00:00
ExternalSupport.h
ExternalTemplate.cpp
ExternalTemplate.h
ExternalTransforms.cpp
ExternalTransforms.h
Inset.cpp Finish disentangling tocString(). We introduce a new method, forToc(), 2010-12-20 21:55:09 +00:00
Inset.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetArgument.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetArgument.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetBibitem.cpp Try to finally fix #6930. All the paths that did not come from context 2010-12-08 09:24:04 +00:00
InsetBibitem.h Simplify some of the bibliography update code. There is really no reason 2010-12-03 20:08:04 +00:00
InsetBibtex.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetBibtex.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetBox.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetBox.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetBranch.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetBranch.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetCaption.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetCaption.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetCitation.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetCitation.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetCode.h fix compiler warnings in pedantic mode: remove trailing comma after last enum member 2010-12-17 19:56:51 +00:00
InsetCollapsable.cpp Trivial cleanup. 2010-12-14 23:18:48 +00:00
InsetCollapsable.h Rename InsetXXX::contextMenu to InsetXXX::contextMenuName. Now this function doesn't need all the parameters and we split the functionality of choosing which context menu to return, from the functionality of supplying the name for the Inset itself. Now, the InsetText context menu is returned for InsetCollapsables when the button is not hit by the mouse. There is no (intended) change in functionality for insets without a button, collapsed insets. This fixes partly bug #6642. A fix for InsetTabular and for insets with no button will follow. 2010-11-29 21:27:25 +00:00
InsetCommand.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetCommand.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetCommandParams.cpp
InsetCommandParams.h
InsetERT.cpp Try to finally fix #6930. All the paths that did not come from context 2010-12-08 09:24:04 +00:00
InsetERT.h Rename InsetXXX::contextMenu to InsetXXX::contextMenuName. Now this function doesn't need all the parameters and we split the functionality of choosing which context menu to return, from the functionality of supplying the name for the Inset itself. Now, the InsetText context menu is returned for InsetCollapsables when the button is not hit by the mouse. There is no (intended) change in functionality for insets without a button, collapsed insets. This fixes partly bug #6642. A fix for InsetTabular and for insets with no button will follow. 2010-11-29 21:27:25 +00:00
InsetExternal.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetExternal.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetFlex.cpp We need to do the sanity check here, too, as we do in 2010-11-26 16:45:58 +00:00
InsetFlex.h
InsetFloat.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetFloat.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetFloatList.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetFloatList.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetFoot.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetFoot.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetFootlike.cpp
InsetFootlike.h
InsetGraphics.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetGraphics.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetGraphicsParams.cpp
InsetGraphicsParams.h
InsetHyperlink.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetHyperlink.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetInclude.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetInclude.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetIndex.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetIndex.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetInfo.cpp Fix crash in lyx -e latex lib/doc/Shortcuts.lyx: theApp() is 0 in batch mode. 2011-01-06 18:40:39 +00:00
InsetInfo.h fix compiler warnings in pedantic mode: remove trailing comma after last enum member 2010-12-17 19:56:51 +00:00
InsetLabel.cpp Inset::addToToc() can and should be const. It wasn't, I take it, because 2011-01-12 22:23:27 +00:00
InsetLabel.h Inset::addToToc() can and should be const. It wasn't, I take it, because 2011-01-12 22:23:27 +00:00
InsetLayout.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetLayout.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetLine.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetLine.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetListings.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetListings.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetListingsParams.cpp fix compiler warnings in pedantic mode: remove trailing comma after last enum member 2010-12-17 19:56:51 +00:00
InsetListingsParams.h
InsetMarginal.cpp Inset::addToToc() can and should be const. It wasn't, I take it, because 2011-01-12 22:23:27 +00:00
InsetMarginal.h Inset::addToToc() can and should be const. It wasn't, I take it, because 2011-01-12 22:23:27 +00:00
InsetNewline.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetNewline.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetNewpage.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetNewpage.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetNomencl.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetNomencl.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetNote.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetNote.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetPhantom.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetPhantom.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetPreview.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetPreview.h Rename InsetXXX::contextMenu to InsetXXX::contextMenuName. Now this function doesn't need all the parameters and we split the functionality of choosing which context menu to return, from the functionality of supplying the name for the Inset itself. Now, the InsetText context menu is returned for InsetCollapsables when the button is not hit by the mouse. There is no (intended) change in functionality for insets without a button, collapsed insets. This fixes partly bug #6642. A fix for InsetTabular and for insets with no button will follow. 2010-11-29 21:27:25 +00:00
InsetQuotes.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetQuotes.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetRef.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetRef.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetScript.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetScript.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetSpace.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetSpace.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetSpecialChar.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetSpecialChar.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetTabular.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetTabular.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetText.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetText.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetTOC.cpp Fix bug #7176: Clicking TOC doesn't bring up outline 2010-12-17 13:12:43 +00:00
InsetTOC.h Fix bug #7176: Clicking TOC doesn't bring up outline 2010-12-17 13:12:43 +00:00
InsetVSpace.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetVSpace.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetWrap.cpp Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
InsetWrap.h Introduce a wrapper class for odocstream to help ensuring that no 2011-01-29 02:41:13 +00:00
RenderBase.h
RenderButton.cpp
RenderButton.h
RenderGraphic.cpp
RenderGraphic.h
RenderPreview.cpp
RenderPreview.h