src/CutAndPaste.C
src/debug.C
src/exporter.C
+src/ext_l10n.h
src/figure_form.C
src/figureForm.C
src/FontLoader.C
*
* ====================================================== */
-#include <fstream>
-#include <algorithm>
-
#include <config.h>
#include "BufferView.h"
#include "buffer.h"
#include "lyxcursor.h"
#include "lyxtext.h"
-#include "insets/inseterror.h"
#include "LyXView.h"
#include "bufferlist.h"
-#include "support/FileInfo.h"
#include "lyxscreen.h"
-#include "support/filetools.h"
-#include "frontends/Alert.h"
#include "LaTeX.h"
#include "BufferView_pimpl.h"
-#include "insets/insetcommand.h" //ChangeRefs
-#include "support/lyxfunctional.h" //equal_1st_in_pair
#include "language.h"
#include "gettext.h"
#include "undo_funcs.h"
#include "debug.h"
#include "iterators.h"
+#include "frontends/Alert.h"
+
+#include "insets/insetcommand.h" //ChangeRefs
+#include "insets/inseterror.h"
+
+#include "support/FileInfo.h"
+#include "support/filetools.h"
+#include "support/lyxfunctional.h" //equal_1st_in_pair
+
+#include <fstream>
+#include <algorithm>
+
extern BufferList bufferlist;
using std::pair;
#include <config.h>
-#include <ctime>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <locale.h>
-
#ifdef __GNUG__
#pragma implementation
#endif
#include "lyx_gui_misc.h"
#include "lyxrc.h"
#include "intl.h"
-#include "support/LAssert.h"
-#include "support/lstrings.h"
+// added for Dispatch functions
+#include "lyx_cb.h"
+#include "lyx_main.h"
+#include "FloatList.h"
+#include "gettext.h"
+#include "ParagraphParameters.h"
+#include "undo_funcs.h"
+
#include "frontends/Dialogs.h"
#include "frontends/Alert.h"
+#include "frontends/FileDialog.h"
+
#include "insets/insetbib.h"
#include "insets/insettext.h"
-/// added for Dispatch functions
-#include "lyx_cb.h"
-#include "frontends/FileDialog.h"
-#include "lyx_main.h"
-#include "FloatList.h"
-#include "support/filetools.h"
-#include "support/lyxfunctional.h"
#include "insets/inseturl.h"
#include "insets/insetlatexaccent.h"
#include "insets/insettoc.h"
#include "insets/insetcaption.h"
#include "insets/insetfloatlist.h"
#include "insets/insetspecialchar.h"
-#include "gettext.h"
-#include "ParagraphParameters.h"
-#include "undo_funcs.h"
+
#include "mathed/formulabase.h"
+#include "support/LAssert.h"
+#include "support/lstrings.h"
+#include "support/filetools.h"
+#include "support/lyxfunctional.h"
+
+#include <ctime>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <locale.h>
+
+
extern lyx::layout_type current_layout;
using std::vector;
2001-12-08 Lars Gullik Bjønnes <larsbj@birdstep.com>
* buffer.C (insertErtContents): try to handle font and language
- interaction a bit better.
+ interaction a bit better.g
* ColorHandler.C (updateColor): change the hash to cover the whole
LColor enum, ws cleanup
#include <config.h>
-#include <fstream>
-
#ifdef __GNUG__
#pragma implementation
#endif
#include "Chktex.h"
#include "LaTeX.h" // TeXErrors
-#include "support/filetools.h"
#include "lyxlex.h"
-#include "support/FileInfo.h"
#include "debug.h"
+#include "gettext.h"
+
+#include "support/FileInfo.h"
+#include "support/filetools.h"
#include "support/syscall.h"
#include "support/syscontr.h"
#include "support/path.h"
#include "support/lstrings.h"
-#include "gettext.h"
+
+#include <fstream>
using std::ifstream;
using std::getline;
#pragma implementation
#endif
-#include <sys/time.h>
-#include <unistd.h>
-
#include "LyXView.h"
#include "minibuffer.h"
#include "debug.h"
#include "intl.h"
#include "lyxrc.h"
-#include "support/filetools.h" // OnlyFilename()
#include "lyxtext.h"
#include "buffer.h"
-#include "frontends/Dialogs.h"
-#include "frontends/Toolbar.h"
-#include "frontends/Menubar.h"
#include "MenuBackend.h"
#include "lyx_gui_misc.h" // [update,Close,Redraw]AllBufferRelatedDialogs
#include "bufferview_funcs.h" // CurrentState()
#include "lyxfunc.h"
#include "BufferView.h"
+#include "frontends/Dialogs.h"
+#include "frontends/Toolbar.h"
+#include "frontends/Menubar.h"
+
+#include "support/filetools.h" // OnlyFilename()
+
+#include <sys/time.h>
+#include <unistd.h>
+
using std::endl;
using lyx::layout_type;
#pragma implementation
#endif
-#ifdef USE_STL_MEMORY
-#include <memory>
-#endif
-
-#include <cmath>
-
#include "Painter.h"
#include "LString.h"
#include "debug.h"
#include "lyxfont.h"
-#include "frontends/GUIRunTime.h"
-#include "support/LAssert.h"
-#include "support/lstrings.h"
#include "WorkArea.h"
#include "font.h"
#include "ColorHandler.h"
#include "encoding.h"
#include "language.h"
+#include "frontends/GUIRunTime.h"
#include "frontends/support/LyXImage.h"
+#include "support/LAssert.h"
+#include "support/lstrings.h"
+
+#include <boost/smart_ptr.hpp>
+
+#include <cmath>
+
using std::endl;
using std::max;
}
-/* Basic drawing routines */
+// Basic drawing routines
PainterBase & Painter::point(int x, int y, LColor::color c)
{
enum line_style ls,
enum line_width lw)
{
-#ifndef HAVE_AUTO_PTR
- XPoint * points = new XPoint[np];
-#else
- auto_ptr<XPoint> points(new Xpoint[np]);
-#endif
+ boost::scoped_array<XPoint> points(new XPoint[np]);
+
for (int i = 0; i < np; ++i) {
points[i].x = xp[i];
points[i].y = yp[i];
XDrawLines(display, owner.getPixmap(),
lyxColorHandler->getGCLinepars(ls, lw, col),
- points, np, CoordModeOrigin);
+ points.get(), np, CoordModeOrigin);
-#ifndef HAVE_AUTO_PTR
- delete[] points;
-#endif
return *this;
}
PainterBase & Painter::fillPolygon(int const * xp, int const * yp, int np,
LColor::color col)
{
-#ifndef HAVE_AUTO_PTR
- XPoint * points = new XPoint[np];
-#else
- auto_ptr<XPoint> points(new XPoint[np]);
-#endif
- for (int i=0; i < np; ++i) {
+ boost::scoped_array<XPoint> points(new XPoint[np]);
+
+ for (int i = 0; i < np; ++i) {
points[i].x = xp[i];
points[i].y = yp[i];
}
XFillPolygon(display, owner.getPixmap(),
- lyxColorHandler->getGCForeground(col), points, np,
+ lyxColorHandler->getGCForeground(col), points.get(), np,
Nonconvex, CoordModeOrigin);
-#ifndef HAVE_AUTO_PTR
- delete[] points;
-#endif
+
return *this;
}
LColor::color col,
enum line_style ls, enum line_width lw)
{
-#ifndef HAVE_AUTO_PTR
- XSegment * s= new XSegment[ns];
-#else
- auto_ptr<XSegment> s(new XSegment[ns]);
-#endif
- for (int i=0; i<ns; ++i) {
+ boost::scoped_array<XSegment> s(new XSegment[ns]);
+
+ for (int i = 0; i < ns; ++i) {
s[i].x1 = x1[i];
s[i].y1 = y1[i];
s[i].x2 = x2[i];
s[i].y2 = y2[i];
}
XDrawSegments(display, owner.getPixmap(),
- lyxColorHandler->getGCLinepars(ls, lw, col), s, ns);
+ lyxColorHandler->getGCLinepars(ls, lw, col),
+ s.get(), ns);
-#ifndef HAVE_AUTO_PTR
- delete [] s;
-#endif
return *this;
}
+
PainterBase & Painter::pixmap(int x, int y, int w, int h, Pixmap bitmap)
{
XGCValues val;
return *this;
}
+
PainterBase & Painter::image(int x, int y, int w, int h, LyXImage const * image)
{
Pixmap bitmap = image->getPixmap();
LyXFont const & f)
{
if (lyxrc.font_norm_type == LyXRC::ISO_10646_1) {
- XChar2b * xs = new XChar2b[ls];
+ boost::scoped_array<XChar2b> xs(new XChar2b[ls]);
Encoding const * encoding = f.language()->encoding();
LyXFont font(f);
if (f.isSymbolFont()) {
xs[i].byte1 = c >> 8;
xs[i].byte2 = c & 0xff;
}
- text(x , y, xs, ls, font);
- delete[] xs;
+ text(x , y, xs.get(), ls, font);
return *this;
}
} else {
LyXFont smallfont(f);
smallfont.decSize().decSize().setShape(LyXFont::UP_SHAPE);
- char c;
int tmpx = x;
for (size_t i = 0; i < ls; ++i) {
- c = s[i];
+ char c = s[i];
if (islower(static_cast<unsigned char>(c))) {
c = toupper(c);
lyxfont::XSetFont(display, gc, smallfont);
void Painter::underline(LyXFont const & f, int x, int y, int width)
{
- int below = max(lyxfont::maxDescent(f) / 2, 2);
- int height = max((lyxfont::maxDescent(f) / 4) - 1, 1);
+ int const below = max(lyxfont::maxDescent(f) / 2, 2);
+ int const height = max((lyxfont::maxDescent(f) / 4) - 1, 1);
if (height < 2)
line(x, y + below, x + width, y + below, f.color());
else
Thesaurus::ThesaurusEntry::ThesaurusEntry(string const & ent, char part)
: entry(ent), pos(Thesaurus::NONE)
{
- if (part & AikSaurus::Unknown) pos |= OTHER;
- if (part & AikSaurus::Other) pos |= OTHER;
- if (part & AikSaurus::Noun) pos |= NOUN;
- if (part & AikSaurus::Verb) pos |= VERB;
- if (part & AikSaurus::Adjective) pos |= ADJECTIVE;
- if (part & AikSaurus::Adverb) pos |= ADVERB;
+ if (part & AikSaurus::Unknown)
+ pos |= OTHER;
+ if (part & AikSaurus::Other)
+ pos |= OTHER;
+ if (part & AikSaurus::Noun)
+ pos |= NOUN;
+ if (part & AikSaurus::Verb)
+ pos |= VERB;
+ if (part & AikSaurus::Adjective)
+ pos |= ADJECTIVE;
+ if (part & AikSaurus::Adverb)
+ pos |= ADVERB;
}
Thesaurus::Thesaurus()
{
- aik_ = new AikSaurus();
+ aik_ = new AikSaurus;
}
return entries;
char pos;
- string ret;
- ret = aik_->next(pos);
+ string ret = aik_->next(pos);
while (!ret.empty()) {
entries.push_back(ThesaurusEntry(ret, pos));
ret = aik_->next(pos);
* ====================================================== */
#include <config.h>
-#include <cmath>
-#include <cctype>
+
#ifdef __GNUG__
#pragma implementation
#endif
#include "WorkArea.h"
#include "debug.h"
-#include "support/lstrings.h"
#include "LyXView.h"
-#include "support/filetools.h" // LibFileSearch
#include "lyxrc.h" // lyxrc.show_banner
#include "version.h" // lyx_version
-#include "support/LAssert.h"
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
#include "lyxlookup.h"
#endif
+#include "support/filetools.h" // LibFileSearch
+#include "support/lstrings.h"
+#include "support/LAssert.h"
+
+#include <cmath>
+#include <cctype>
+
using std::endl;
FL_OBJECT * figinset_canvas;
#include "bufferview_funcs.h"
#include "lyxfont.h"
#include "version.h"
+#include "LaTeX.h"
+#include "Chktex.h"
+#include "LyXView.h"
+#include "debug.h"
+#include "LaTeXFeatures.h"
+#include "lyxtext.h"
+#include "gettext.h"
+#include "language.h"
+#include "encoding.h"
+#include "exporter.h"
+#include "Lsstream.h"
+#include "converter.h"
+#include "BufferView.h"
+#include "ParagraphParameters.h"
+#include "iterators.h"
+
#include "mathed/formulamacro.h"
#include "mathed/formula.h"
+
#include "insets/inset.h"
#include "insets/inseterror.h"
#include "insets/insetlabel.h"
#endif
#include "insets/insetcaption.h"
#include "insets/insetfloatlist.h"
+
+#include "frontends/Dialogs.h"
+#include "frontends/Alert.h"
+
#include "support/textutils.h"
#include "support/filetools.h"
#include "support/path.h"
#include "support/os.h"
-#include "LaTeX.h"
-#include "Chktex.h"
-#include "LyXView.h"
-#include "debug.h"
-#include "LaTeXFeatures.h"
#include "support/syscall.h"
#include "support/lyxlib.h"
#include "support/FileInfo.h"
#include "support/lyxmanip.h"
-#include "lyxtext.h"
-#include "gettext.h"
-#include "language.h"
-#include "frontends/Dialogs.h"
-#include "frontends/Alert.h"
-#include "encoding.h"
-#include "exporter.h"
-#include "Lsstream.h"
-#include "converter.h"
-#include "BufferView.h"
-#include "ParagraphParameters.h"
-#include "iterators.h"
#include <fstream>
#include <iomanip>
#include <map>
#include <stack>
#include <list>
+#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <sys/types.h>
#include <utime.h>
-#include <algorithm>
#ifdef HAVE_LOCALE
#include <locale>
* ======================================================
*/
+#include <config.h>
+
#ifdef __GNUG__
#pragma implementation
#endif
-#include <config.h>
-
-#include <assert.h>
-#include <algorithm>
-#include <functional>
-
-#include "frontends/Alert.h"
#include "bufferlist.h"
#include "lyx_main.h"
-#include "support/FileInfo.h"
-#include "support/filetools.h"
-#include "support/lyxmanip.h"
-#include "support/lyxfunctional.h"
-#include "support/LAssert.h"
#include "lyx_gui_misc.h"
#include "lastfiles.h"
#include "debug.h"
#include "vc-backend.h"
#include "TextCache.h"
+#include "frontends/Alert.h"
+
+#include "support/FileInfo.h"
+#include "support/filetools.h"
+#include "support/lyxmanip.h"
+#include "support/lyxfunctional.h"
+#include "support/LAssert.h"
+
+#include <assert.h>
+#include <algorithm>
+#include <functional>
+
+
using std::vector;
using std::find;
using std::endl;
#include <config.h>
-#include "Lsstream.h"
-
-#include <ctime>
-#include <clocale>
-
-#include <utility>
-#include <algorithm>
-
-#include <cstdlib>
-#include <cctype>
-
#ifdef __GNUG__
#pragma implementation
#endif
-#include "support/lyxalgo.h"
-#include "support/LAssert.h"
+#include "lyxfunc.h"
#include "version.h"
#include "kbmap.h"
-#include "lyxfunc.h"
#include "lyxrow.h"
#include "bufferlist.h"
#include "BufferView.h"
#include "lyx_main.h"
#include "lyx_cb.h"
#include "LyXAction.h"
+#include "debug.h"
+#include "lyxrc.h"
+#include "lyxtext.h"
+#include "gettext.h"
+#include "Lsstream.h"
+#include "trans_mgr.h"
+#include "layout.h"
+#include "WorkArea.h"
+#include "bufferview_funcs.h"
+#include "minibuffer.h"
+#include "vspace.h"
+#include "LyXView.h"
+#include "lyx_gui_misc.h"
+#include "FloatList.h"
+#include "converter.h"
+#include "exporter.h"
+#include "importer.h"
+#include "FontLoader.h"
+#include "TextCache.h"
+#include "lyxfind.h"
+#include "undo_funcs.h"
+#include "ParagraphParameters.h"
+#include "figureForm.h"
+
#include "insets/inseturl.h"
#include "insets/insetlatexaccent.h"
#include "insets/insettoc.h"
#endif
#include "insets/insettabular.h"
#include "insets/insetcaption.h"
+
#include "mathed/formulamacro.h"
#include "mathed/math_cursor.h"
#include "mathed/math_inset.h"
-#include "minibuffer.h"
-#include "vspace.h"
-#include "LyXView.h"
-#include "lyx_gui_misc.h"
+
+#include "frontends/FileDialog.h"
+#include "frontends/Dialogs.h"
+#include "frontends/Toolbar.h"
+#include "frontends/Menubar.h"
+#include "frontends/Alert.h"
+
+#include "support/lyxalgo.h"
+#include "support/LAssert.h"
#include "support/filetools.h"
#include "support/FileInfo.h"
#include "support/syscall.h"
#include "support/lstrings.h"
#include "support/path.h"
#include "support/lyxfunctional.h"
-#include "debug.h"
-#include "lyxrc.h"
-#include "lyxtext.h"
-#include "gettext.h"
-#include "trans_mgr.h"
-#include "layout.h"
-#include "WorkArea.h"
-#include "bufferview_funcs.h"
-#include "frontends/FileDialog.h"
-#include "frontends/Dialogs.h"
-#include "frontends/Toolbar.h"
-#include "frontends/Menubar.h"
-#include "frontends/Alert.h"
-#include "FloatList.h"
-#include "converter.h"
-#include "exporter.h"
-#include "importer.h"
-#include "FontLoader.h"
-#include "TextCache.h"
-#include "lyxfind.h"
-#include "undo_funcs.h"
-#include "ParagraphParameters.h"
-#include "figureForm.h"
+
+#include <ctime>
+#include <clocale>
+#include <cstdlib>
+#include <cctype>
+
+#include <utility>
+#include <algorithm>
+
using std::pair;
using std::make_pair;
{
if (position().pos_ == xcell().data_.size())
return 0;
- return const_cast<MathAtom *>(xcell().begin() + position().pos_);
+ return const_cast<MathAtom *>(&*(xcell().begin() + position().pos_));
}
+// -*- C++ -*-
#ifndef MATH_ITERATOR_H
#define MATH_ITERATOR_H
#include "lyxtext.h"
#include "LString.h"
#include "paragraph.h"
-#include "insets/inseterror.h"
-#include "insets/insetbib.h"
-#include "insets/insetspecialchar.h"
-#include "insets/insettext.h"
-#include "insets/insetfloat.h"
#include "layout.h"
#include "LyXView.h"
-#include "support/textutils.h"
-#include "support/lstrings.h"
#include "undo_funcs.h"
#include "buffer.h"
#include "bufferparams.h"
#include "FloatList.h"
#include "language.h"
#include "ParagraphParameters.h"
+
+#include "insets/inseterror.h"
+#include "insets/insetbib.h"
+#include "insets/insetspecialchar.h"
+#include "insets/insettext.h"
+#include "insets/insetfloat.h"
+
#include "support/LAssert.h"
+#include "support/textutils.h"
+#include "support/lstrings.h"
using std::copy;
using std::find;