mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-08 10:51:03 +00:00
Fix linking issue with MacOSX.
* insetcollapsable: new floatName method. * insetfloat.C: floatname function deleted. * insetwrap.C: floatname function deleted. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15272 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
94c10102c0
commit
d81ffbdc23
@ -15,11 +15,14 @@
|
||||
#include "insetcollapsable.h"
|
||||
|
||||
#include "buffer.h"
|
||||
#include "bufferparams.h"
|
||||
#include "BufferView.h"
|
||||
#include "cursor.h"
|
||||
#include "debug.h"
|
||||
#include "dispatchresult.h"
|
||||
#include "FloatList.h"
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "lyxlex.h"
|
||||
#include "funcrequest.h"
|
||||
@ -407,3 +410,11 @@ void InsetCollapsable::setLabelFont(LyXFont & font)
|
||||
{
|
||||
labelfont_ = font;
|
||||
}
|
||||
|
||||
string InsetCollapsable::floatName(string const & type, BufferParams const & bp)
|
||||
{
|
||||
FloatList const & floats = bp.getLyXTextClass().floats();
|
||||
FloatList::const_iterator it = floats[type];
|
||||
// FIXME UNICODE
|
||||
return (it == floats.end()) ? type : lyx::to_utf8(_(it->second.name()));
|
||||
}
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "box.h"
|
||||
#include "lyxfont.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class LyXText;
|
||||
class Paragraph;
|
||||
class CursorSlice;
|
||||
@ -94,6 +96,8 @@ protected:
|
||||
InsetBase * editXY(LCursor & cur, int x, int y);
|
||||
///
|
||||
void setInlined() { status_ = Inlined; }
|
||||
///
|
||||
std::string floatName(std::string const & type, BufferParams const &);
|
||||
|
||||
protected:
|
||||
///
|
||||
|
@ -114,27 +114,12 @@ using std::ostringstream;
|
||||
//
|
||||
// Lgb
|
||||
|
||||
namespace {
|
||||
|
||||
string floatname(string const & type, BufferParams const & bp)
|
||||
{
|
||||
FloatList const & floats = bp.getLyXTextClass().floats();
|
||||
FloatList::const_iterator it = floats[type];
|
||||
if (it == floats.end())
|
||||
return type;
|
||||
|
||||
// FIXME UNICODE
|
||||
return lyx::to_utf8(_(it->second.name()));
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
InsetFloat::InsetFloat(BufferParams const & bp, string const & type)
|
||||
: InsetCollapsable(bp)
|
||||
{
|
||||
// FIXME UNICODE
|
||||
setLabel(lyx::to_utf8(_("float: ")) + floatname(type, bp));
|
||||
setLabel(lyx::to_utf8(_("float: ")) + floatName(type, bp));
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
@ -375,7 +360,7 @@ void InsetFloat::wide(bool w, BufferParams const & bp)
|
||||
{
|
||||
params_.wide = w;
|
||||
// FIXME UNICODE
|
||||
string lab = lyx::to_utf8(_("float: ")) + floatname(params_.type, bp);
|
||||
string lab = lyx::to_utf8(_("float: ")) + floatName(params_.type, bp);
|
||||
if (params_.wide)
|
||||
lab += '*';
|
||||
setLabel(lab);
|
||||
@ -386,7 +371,7 @@ void InsetFloat::sideways(bool s, BufferParams const & bp)
|
||||
{
|
||||
params_.sideways = s;
|
||||
// FIXME UNICODE
|
||||
string lab = lyx::to_utf8(_("float: ")) + floatname(params_.type, bp);
|
||||
string lab = lyx::to_utf8(_("float: ")) + floatName(params_.type, bp);
|
||||
if (params_.sideways)
|
||||
lab += lyx::to_utf8(_(" (sideways)"));
|
||||
setLabel(lab);
|
||||
|
@ -44,24 +44,11 @@ using std::ostream;
|
||||
using std::ostringstream;
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
string floatname(string const & type, BufferParams const & bp)
|
||||
{
|
||||
FloatList const & floats = bp.getLyXTextClass().floats();
|
||||
FloatList::const_iterator it = floats[type];
|
||||
// FIXME UNICODE
|
||||
return (it == floats.end()) ? type : lyx::to_utf8(_(it->second.name()));
|
||||
}
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
|
||||
: InsetCollapsable(bp)
|
||||
{
|
||||
// FIXME UNICODE
|
||||
setLabel(lyx::to_utf8(_("wrap: ")) + floatname(type, bp));
|
||||
setLabel(lyx::to_utf8(_("wrap: ")) + floatName(type, bp));
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
|
Loading…
Reference in New Issue
Block a user