From b630a55d77a6fcb9aad625508ac47f9b72d6b80c Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 20 May 2008 11:54:23 +0000 Subject: [PATCH] Fix caption numbering of child documents. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24866 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiClipboard.h | 4 ++++ src/insets/InsetCaption.cpp | 11 ++++++----- src/insets/InsetFloat.cpp | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt4/GuiClipboard.h b/src/frontends/qt4/GuiClipboard.h index 4bb808cda3..5e7e455f06 100644 --- a/src/frontends/qt4/GuiClipboard.h +++ b/src/frontends/qt4/GuiClipboard.h @@ -21,6 +21,8 @@ namespace lyx { namespace frontend { +class QWindowsMimeMetafile; + /** * The Qt4 version of the Clipboard. */ @@ -52,6 +54,8 @@ private Q_SLOTS: void on_dataChanged(); private: + /// WMF Mime handler for Windows clipboard. + QWindowsMimeMetafile * wmf_mime_; bool text_clipboard_empty_; bool has_lyx_contents_; bool has_graphics_contents_; diff --git a/src/insets/InsetCaption.cpp b/src/insets/InsetCaption.cpp index dafaddef13..193d6ba0bb 100644 --- a/src/insets/InsetCaption.cpp +++ b/src/insets/InsetCaption.cpp @@ -280,27 +280,28 @@ int InsetCaption::getCaptionText(odocstream & os, 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(); string const & type = cnts.current_float(); // Memorize type for addToToc(). type_ = type; in_subfloat_ = cnts.isSubfloat(); if (type.empty()) - full_label_ = buffer().B_("Senseless!!! "); + full_label_ = master.B_("Senseless!!! "); else { // FIXME: life would be _much_ simpler if listings was // listed in Floating. docstring name; if (type == "listing") - name = buffer().B_("Listing"); + name = master.B_("Listing"); else - name = buffer().B_(tclass.floats().getType(type).name()); + name = master.B_(tclass.floats().getType(type).name()); docstring counter = from_utf8(type); if (in_subfloat_) { counter = "sub-" + from_utf8(type); name = bformat(_("Sub-%1$s"), - buffer().B_(tclass.floats().getType(type).name())); + master.B_(tclass.floats().getType(type).name())); } if (cnts.hasCounter(counter)) { cnts.step(counter); diff --git a/src/insets/InsetFloat.cpp b/src/insets/InsetFloat.cpp index d77701bcf4..2d92366803 100644 --- a/src/insets/InsetFloat.cpp +++ b/src/insets/InsetFloat.cpp @@ -191,7 +191,7 @@ bool InsetFloat::getStatus(Cursor & cur, FuncRequest const & cmd, 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(); bool const savesubflt = cnts.isSubfloat();