LyX instances. This re-enables copy/paste from the internal clipboard on
OS X (currently broken since Clipboard::isInternal() always returns false for
some reason).
* src/insets/insettabular.C
(InsetTabular::doDispatch): adjust to clipboard interface change
(InsetTabular::copySelection): ditto
* src/mathed/InsetMathGrid.C
(InsetMathGrid::doDispatch): ditto
* src/mathed/InsetMathNest.C
(InsetMathNest::doDispatch): ditto
* src/buffer.[Ch]
(Buffer::readString): New method: Read document from a string
(Buffer::readFile): Change return value from bool to enum (needed
for readString). Return wrongversion if we are reading from a string
and the version does not match.
(Buffer::do_writeFile): make public and rename to write
* src/CutAndPaste.C
(putClipboard): New helper, put stuff to the system clipboard
(void copySelectionHelper): Use putClipboard instead of
theClipboard().put()
(void copySelection): ditto
(void pasteClipboard): new method for pasting in text
(void pasteParagraphList):
* src/frontends/Clipboard.h
(Clipboard::get): Rename to getAsText
(Clipboard::getAsLyX): New method for getting the system clipboard
in LyX format
(Clipboard::hasLyXContents): New method telling whether there is LyX
contents in the clipboard
* src/frontends/qt4/GuiClipboard.[Ch]: Implement the new methods
* src/text3.C
(LyXText::dispatch): Use pasteClipboard for pasting the system
clipboard
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16669 a592a061-630c-0410-9148-cb99ea01b6c8
a bug on Windows due to an unnecessary conversion to external style.
* src/insets/ExternalSupport.C
(subst_path): avoid a bug in the external material inset on Windows
by don't using external_path. The filename will be quoted and thus
there will be no problems with forward slashes.
* src/frontends/qt4/QGraphics.C
* src/frontends/qt4/QExternal.C
* src/frontends/qt4/QInclude.C:
(Qxxx::apply): On Windows, the user could input an absolute path in
native style by hand (without using the file dialog), so make sure
that no backslashes can slip in by this way.
* src/frontends/qt4/QPrefsDialog.C
(internal_path_list, external_path_list): new wrappers for the
corresponding functions in the os namespace.
(PrefPaths::apply): make sure that path_prefix is stored in the
internal style, i.e., without backslashes.
(PrefPaths::update): make sure that path_prefix is displayed to
the user in the native style.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16659 a592a061-630c-0410-9148-cb99ea01b6c8
encodings) more fine grained: From paragraph level to individual character
level. The inputenc package supports that since at least 2000.
* src/insets/insetbase.h
(latex): Document the differences between output to a string stream
and a file stream
* src/buffer.h
(writeLaTeXSource): ditto
* src/output_latex.h
(latexParagraphs): ditto
(switchEncoding): new function to change the encoding of a stream
(and output \inputencoding commands)
* src/paragraph_pimpl.C
(Paragraph::Pimpl::simpleTeXSpecialC): Adjust to latexWriteEndChanges
changes
* src/support/docstream.[Ch]
(setEncoding, operator<<): New stream modifier that changes the
encoding of file streams
* src/lyxfont.[Ch]
(LyXFont::latexWriteStartChanges): Change stream encoding if needed
(LyXFont::latexWriteEndChanges): Change stream encoding if needed
* src/lyxfont.h
(public:):
* src/paragraph.C
(Paragraph::simpleTeXOnePar): Adjust to latexWriteStartChanges and latexWriteEndChanges changes
(bool Paragraph::simpleTeXOnePar):
(bool Paragraph::simpleTeXOnePar):
(bool Paragraph::simpleTeXOnePar):
(bool Paragraph::simpleTeXOnePar):
(bool Paragraph::simpleTeXOnePar):
* src/output_latex.C
(TeXOnePar): Remove the ugly hack to for wencoding changes and use
switchEncoding instead. A nice side effect is that the old hack would
not work if the main language encoding is latin1 and a character
would be mapped to a cedilla in the "fake ucs4" encoding, because
iconv refuses to convert such a character to latin1, although it
exists in latin1 (it wants to attach it to a base character).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16633 a592a061-630c-0410-9148-cb99ea01b6c8
* InsetFloat::addToToc(): avoid a string copy, a map lookup and a TocItem construction. Don't complete the loop if item found.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16600 a592a061-630c-0410-9148-cb99ea01b6c8
we got a consensus on this on the list.
Some calls of haveSelection are still missing, but we need to decide the
"persistent selection" question before those can be implemented properly.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16572 a592a061-630c-0410-9148-cb99ea01b6c8
after selecting something with the mouse
* src/insets/insettabular.C
(InsetTabular::doDispatch): Set the X selection if there is a
selection after release of the left mouse button
* src/mathed/InsetMathNest.C
(InsetMathNest::doDispatch): Set the X selection after double and
triple click of the left mouse button
(InsetMathNest::lfunMouseRelease): Set the X selection if there is a
selection after release of the left mouse button
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16530 a592a061-630c-0410-9148-cb99ea01b6c8
* src/insets/insettabular.C
(InsetTabular::doDispatch): Only paste the tabular clipboard if the
system clipboard is not newer, else let the current cell paste the
system clipboard
(InsetTabular::getStatus): Only decide whether to enable LFUN_PASTE
if the tabular clipboard is not empty and the system clipboard is
not newer, else let the current cell decide.
* src/mathed/InsetMathGrid.C
(InsetMathGrid::doDispatch): Use the system clipboard for LFUN_PASTE
if it is newer.
* src/mathed/InsetMathNest.C
(InsetMathNest::doDispatch): Use the system clipboard for LFUN_PASTE
if it is newer.
* src/text3.C
(doInsertInset): Add a "0" argument to LFUN_PASTE, because we always
want to use the internal clipboard here
(LyXText::dispatch): ditto (when handling mouse button 2 press)
(LyXText::dispatch): Use the system clipboard for LFUN_PASTE if it
is newer.
(LyXText::getStatus): Also enable LFUN_PASTE if the system clipboard
is owned by another application
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16498 a592a061-630c-0410-9148-cb99ea01b6c8
(InsetTabular::getStatus): Correctly enable LFUN_PASTE when the
special tabular clipboard is empty by removing an errornous
fall-through to LFUN_INSET_MODIFY
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16495 a592a061-630c-0410-9148-cb99ea01b6c8
(InsetTabular::doDispatch): Don't reset the table paste buffer
when pasting from the external clipboard or selection, since no
paste operation should ever change any clipboard.
At the same time make the code more readable by removing the
fall-through.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16492 a592a061-630c-0410-9148-cb99ea01b6c8
false by default.
(metrics): do not set to openinlined if
hasFixedWidth is true.
* insetbox.C (hasFixedWidth): returns true if the box has a fixed
width.
(metrics): use hasFixedWidth.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16426 a592a061-630c-0410-9148-cb99ea01b6c8
* src/insets/insetcollapsable.C: test if inset is open before editing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16406 a592a061-630c-0410-9148-cb99ea01b6c8
instead of std::string
* src/support/lyxlib.h
* src/support/getcwd.C
(getcwd): return a FileName, not a std::string in filesystem encoding
* src/support/filetools.[Ch]
(makeAbsPath): return a FileName, not a std::string in undefined encoding
* src/support/lyxlib.h
* src/support/tempName.C
(makeAbsPath): return a FileName, not a std::string in undefined encoding
* many other files: Adjust to the changes above
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16399 a592a061-630c-0410-9148-cb99ea01b6c8
mouse_hover_ is copied with copied collapsable insets. Should be false for
newly copied insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16182 a592a061-630c-0410-9148-cb99ea01b6c8