mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
Fix caption numbering of child documents.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24866 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
be310e33ca
commit
b630a55d77
@ -21,6 +21,8 @@
|
|||||||
namespace lyx {
|
namespace lyx {
|
||||||
namespace frontend {
|
namespace frontend {
|
||||||
|
|
||||||
|
class QWindowsMimeMetafile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Qt4 version of the Clipboard.
|
* The Qt4 version of the Clipboard.
|
||||||
*/
|
*/
|
||||||
@ -52,6 +54,8 @@ private Q_SLOTS:
|
|||||||
void on_dataChanged();
|
void on_dataChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
/// WMF Mime handler for Windows clipboard.
|
||||||
|
QWindowsMimeMetafile * wmf_mime_;
|
||||||
bool text_clipboard_empty_;
|
bool text_clipboard_empty_;
|
||||||
bool has_lyx_contents_;
|
bool has_lyx_contents_;
|
||||||
bool has_graphics_contents_;
|
bool has_graphics_contents_;
|
||||||
|
@ -280,27 +280,28 @@ int InsetCaption::getCaptionText(odocstream & os,
|
|||||||
|
|
||||||
void InsetCaption::updateLabels(ParIterator const & it)
|
void InsetCaption::updateLabels(ParIterator const & it)
|
||||||
{
|
{
|
||||||
DocumentClass const & tclass = buffer().params().documentClass();
|
Buffer const & master = *buffer().masterBuffer();
|
||||||
|
DocumentClass const & tclass = master.params().documentClass();
|
||||||
Counters & cnts = tclass.counters();
|
Counters & cnts = tclass.counters();
|
||||||
string const & type = cnts.current_float();
|
string const & type = cnts.current_float();
|
||||||
// Memorize type for addToToc().
|
// Memorize type for addToToc().
|
||||||
type_ = type;
|
type_ = type;
|
||||||
in_subfloat_ = cnts.isSubfloat();
|
in_subfloat_ = cnts.isSubfloat();
|
||||||
if (type.empty())
|
if (type.empty())
|
||||||
full_label_ = buffer().B_("Senseless!!! ");
|
full_label_ = master.B_("Senseless!!! ");
|
||||||
else {
|
else {
|
||||||
// FIXME: life would be _much_ simpler if listings was
|
// FIXME: life would be _much_ simpler if listings was
|
||||||
// listed in Floating.
|
// listed in Floating.
|
||||||
docstring name;
|
docstring name;
|
||||||
if (type == "listing")
|
if (type == "listing")
|
||||||
name = buffer().B_("Listing");
|
name = master.B_("Listing");
|
||||||
else
|
else
|
||||||
name = buffer().B_(tclass.floats().getType(type).name());
|
name = master.B_(tclass.floats().getType(type).name());
|
||||||
docstring counter = from_utf8(type);
|
docstring counter = from_utf8(type);
|
||||||
if (in_subfloat_) {
|
if (in_subfloat_) {
|
||||||
counter = "sub-" + from_utf8(type);
|
counter = "sub-" + from_utf8(type);
|
||||||
name = bformat(_("Sub-%1$s"),
|
name = bformat(_("Sub-%1$s"),
|
||||||
buffer().B_(tclass.floats().getType(type).name()));
|
master.B_(tclass.floats().getType(type).name()));
|
||||||
}
|
}
|
||||||
if (cnts.hasCounter(counter)) {
|
if (cnts.hasCounter(counter)) {
|
||||||
cnts.step(counter);
|
cnts.step(counter);
|
||||||
|
@ -191,7 +191,7 @@ bool InsetFloat::getStatus(Cursor & cur, FuncRequest const & cmd,
|
|||||||
|
|
||||||
void InsetFloat::updateLabels(ParIterator const & it)
|
void InsetFloat::updateLabels(ParIterator const & it)
|
||||||
{
|
{
|
||||||
Counters & cnts = buffer().params().documentClass().counters();
|
Counters & cnts = buffer().masterBuffer()->params().documentClass().counters();
|
||||||
string const saveflt = cnts.current_float();
|
string const saveflt = cnts.current_float();
|
||||||
bool const savesubflt = cnts.isSubfloat();
|
bool const savesubflt = cnts.isSubfloat();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user