mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 19:25:39 +00:00
fix bug 1955
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13322 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9f2c265640
commit
f02a98497d
@ -1,3 +1,8 @@
|
||||
2006-03-10 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* QWorkArea.C (getClipboard): convert MAC to UNIX line endings on OSX
|
||||
* QWorkArea.C (putClipboard): convert UNIX to MAC line endings on OSX
|
||||
|
||||
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* QCitationDialog.C (up, down): get rid of the iterator.
|
||||
|
@ -35,6 +35,11 @@
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include <support/lstrings.h>
|
||||
|
||||
using lyx::support::subst;
|
||||
#endif
|
||||
using std::endl;
|
||||
using std::string;
|
||||
|
||||
@ -201,7 +206,12 @@ string const QWorkArea::getClipboard() const
|
||||
QString str = QApplication::clipboard()->text();
|
||||
if (str.isNull())
|
||||
return string();
|
||||
#ifdef Q_OS_MAC
|
||||
// The MAC clipboard uses \r for lineendings, and we use \n
|
||||
return subst(fromqstr(str), '\r', '\n');
|
||||
#else
|
||||
return fromqstr(str);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -210,7 +220,12 @@ void QWorkArea::putClipboard(string const & str) const
|
||||
#if QT_VERSION >= 300
|
||||
QApplication::clipboard()->setSelectionMode(true);
|
||||
#endif
|
||||
#ifdef Q_OS_MAC
|
||||
// The MAC clipboard uses \r for lineendings, and we use \n
|
||||
QApplication::clipboard()->setText(toqstr(subst(str, '\n', '\r')));
|
||||
#else
|
||||
QApplication::clipboard()->setText(toqstr(str));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-03-10 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* QWorkArea.C (getClipboard): convert MAC to UNIX line endings on OSX
|
||||
* QWorkArea.C (putClipboard): convert UNIX to MAC line endings on OSX
|
||||
|
||||
2006-03-05 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* add svn:ignore
|
||||
|
@ -43,6 +43,11 @@
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include <support/lstrings.h>
|
||||
|
||||
using lyx::support::subst;
|
||||
#endif
|
||||
using std::endl;
|
||||
using std::string;
|
||||
|
||||
@ -350,13 +355,24 @@ string const QWorkArea::getClipboard() const
|
||||
lyxerr[Debug::ACTION] << "getClipboard: " << (const char*) str << endl;
|
||||
if (str.isNull())
|
||||
return string();
|
||||
#ifdef Q_OS_MAC
|
||||
// The MAC clipboard uses \r for lineendings, and we use \n
|
||||
return subst(fromqstr(str), '\r', '\n');
|
||||
#else
|
||||
return fromqstr(str);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void QWorkArea::putClipboard(string const & str) const
|
||||
{
|
||||
#ifdef Q_OS_MAC
|
||||
// The MAC clipboard uses \r for lineendings, and we use \n
|
||||
QApplication::clipboard()->setText(toqstr(subst(str, '\n', '\r')),
|
||||
QClipboard::Selection);
|
||||
#else
|
||||
QApplication::clipboard()->setText(toqstr(str), QClipboard::Selection);
|
||||
#endif
|
||||
lyxerr[Debug::ACTION] << "putClipboard: " << str << endl;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user