The branch, master, has been updated.

- Log -----------------------------------------------------------------

commit f90a396488fda1f915af83f6584e6025ff69f486
Merge: a41bdfa 00ac474
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sat Nov 24 15:46:37 2012 +0100

    Merge branch 'master' of git.lyx.org:lyx


commit a41bdfa4536b3f5a2daab8ce949b94199df5b943
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Sat Nov 24 15:46:20 2012 +0100

    Missing pieces for InsetLayout arguments

diff --git a/lib/layouts/stdinsets.inc b/lib/layouts/stdinsets.inc
index 76eeee8..9f1deb9 100644
--- a/lib/layouts/stdinsets.inc
+++ b/lib/layouts/stdinsets.inc
@@ -469,6 +469,8 @@ InsetLayout Info:shortcuts
 End
 
 InsetLayout Caption
+       LaTeXType            command
+       LatexName            caption
        Argument 1
                LabelString   "Short Title|S"
                Tooltip       "The caption as it appears in the list of 
figures/tables"
diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp
index a637d90..22548a4 100644
--- a/src/insets/InsetCaption.cpp
+++ b/src/insets/InsetCaption.cpp
@@ -227,11 +227,7 @@ void InsetCaption::latex(otexstream & os,
        // FIXME: actually, it is moving only when there is no
        // optional argument.
        runparams.moving_arg = true;
-       os << "\\caption";
-       getOptArg(os, runparams);
-       os << '{';
        InsetText::latex(os, runparams);
-       os << "}\n";
        runparams_in.encoding = runparams.encoding;
 }
 
@@ -280,13 +276,6 @@ void InsetCaption::getArgument(otexstream & os,
 }
 
 
-void InsetCaption::getOptArg(otexstream & os,
-                       OutputParams const & runparams) const
-{
-       latexArgInsets(paragraphs()[0], os, runparams, getLayout().latexargs());
-}
-
-
 int InsetCaption::getCaptionAsPlaintext(odocstream & os,
                        OutputParams const & runparams) const
 {
diff --git a/src/insets/InsetCaption.h b/src/insets/InsetCaption.h
index dc28873..d446da8 100644
--- a/src/insets/InsetCaption.h
+++ b/src/insets/InsetCaption.h
@@ -28,8 +28,6 @@ public:
        docstring layoutName() const;
        /// return the mandatory argument (LaTeX format) only
        void getArgument(otexstream & os, OutputParams const &) const;
-       /// return the optional argument(s) only
-       void getOptArg(otexstream & os, OutputParams const &) const;
        /// return the caption text
        int getCaptionAsPlaintext(odocstream & os, OutputParams const &) const;
        /// return the caption text as HTML
diff --git a/src/insets/InsetText.cpp b/src/insets/InsetText.cpp
index 06644ad..7432f5a 100644
--- a/src/insets/InsetText.cpp
+++ b/src/insets/InsetText.cpp
@@ -436,6 +436,7 @@ void InsetText::latex(otexstream & os, OutputParams const & 
runparams) const
                        if (runparams.moving_arg)
                                os << "\\protect";
                        os << '\\' << from_utf8(il.latexname());
+                       getOptArg(os, runparams);
                        if (!il.latexparam().empty())
                                os << from_utf8(il.latexparam());
                        os << '{';
@@ -590,6 +591,12 @@ docstring InsetText::insetAsXHTML(XHTMLStream & xs, 
OutputParams const & rp,
        return docstring();
 }
 
+void InsetText::getOptArg(otexstream & os,
+                       OutputParams const & runparams) const
+{
+       latexArgInsets(paragraphs()[0], os, runparams, getLayout().latexargs());
+}
+
 
 void InsetText::cursorPos(BufferView const & bv,
                CursorSlice const & sl, bool boundary, int & x, int & y) const
diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h
index 0110adf..4fb9fc3 100644
--- a/src/insets/InsetText.h
+++ b/src/insets/InsetText.h
@@ -93,6 +93,9 @@ public:
                               XHTMLOptions) const;
        ///
        void validate(LaTeXFeatures & features) const;
+       
+       /// return the optional argument(s) only
+       void getOptArg(otexstream & os, OutputParams const &) const;
 
        /// return x,y of given position relative to the inset's baseline
        void cursorPos(BufferView const & bv, CursorSlice const & sl,

-----------------------------------------------------------------------

Summary of changes:
 lib/layouts/stdinsets.inc   |    2 ++
 src/insets/InsetCaption.cpp |   11 -----------
 src/insets/InsetCaption.h   |    2 --
 src/insets/InsetText.cpp    |    7 +++++++
 src/insets/InsetText.h      |    3 +++
 5 files changed, 12 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
The LyX Source Repository

Reply via email to