| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419 |
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/lengthcombo.C lyx-1.3.1/src/frontends/qt2/lengthcombo.C
- --- lyx-1.3.1.orig/src/frontends/qt2/lengthcombo.C 2002-12-17 21:37:11.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/lengthcombo.C 2003-04-29 20:03:52.378340752 +0200
- @@ -35,9 +35,9 @@
- }
-
-
- -LyXLength::UNIT LengthCombo::currentLengthItem() const
- +LyXLength::LENUNIT LengthCombo::currentLengthItem() const
- {
- - return static_cast<LyXLength::UNIT>(currentItem());
- + return static_cast<LyXLength::LENUNIT>(currentItem());
- }
-
-
- @@ -47,7 +47,7 @@
- }
-
-
- -void LengthCombo::setCurrentItem(LyXLength::UNIT unit)
- +void LengthCombo::setCurrentItem(LyXLength::LENUNIT unit)
- {
- QComboBox::setCurrentItem(int(unit));
- }
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/lengthcombo.h lyx-1.3.1/src/frontends/qt2/lengthcombo.h
- --- lyx-1.3.1.orig/src/frontends/qt2/lengthcombo.h 2002-11-17 12:24:08.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/lengthcombo.h 2003-04-29 20:03:52.378861522 +0200
- @@ -21,7 +21,7 @@
- #include "vspace.h"
-
- /**
- - * A combo box for selecting LyXLength::UNIT types.
- + * A combo box for selecting LyXLength::LENUNIT types.
- */
- class LengthCombo : public QComboBox {
- Q_OBJECT
- @@ -29,9 +29,9 @@
- LengthCombo(QWidget * parent, char * name);
-
- /// set the current item
- - virtual void setCurrentItem(LyXLength::UNIT unit);
- + virtual void setCurrentItem(LyXLength::LENUNIT unit);
- /// get the current item
- - LyXLength::UNIT currentLengthItem() const;
- + LyXLength::LENUNIT currentLengthItem() const;
- /// enable the widget
- virtual void setEnabled(bool b);
-
- @@ -39,7 +39,7 @@
- virtual void has_activated(int index);
- signals:
- /// the current selection has changed
- - void selectionChanged(LyXLength::UNIT unit);
- + void selectionChanged(LyXLength::LENUNIT unit);
-
- };
-
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/QDocument.C lyx-1.3.1/src/frontends/qt2/QDocument.C
- --- lyx-1.3.1.orig/src/frontends/qt2/QDocument.C 2003-02-12 16:32:01.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/QDocument.C 2003-04-29 20:03:52.361659250 +0200
- @@ -275,7 +275,7 @@
- break;
- case 3:
- {
- - LyXLength::UNIT unit =
- + LyXLength::LENUNIT unit =
- dialog_->layoutModule->skipLengthCO->
- currentLengthItem();
- double length =
- @@ -382,7 +382,7 @@
-
- // set the default unit
- // FIXME: move to controller
- - LyXLength::UNIT defaultUnit = LyXLength::CM;
- + LyXLength::LENUNIT defaultUnit = LyXLength::CM;
- switch (lyxrc.default_papersize) {
- case BufferParams::PAPER_DEFAULT: break;
-
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/QGraphics.C lyx-1.3.1/src/frontends/qt2/QGraphics.C
- --- lyx-1.3.1.orig/src/frontends/qt2/QGraphics.C 2002-12-17 21:37:10.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/QGraphics.C 2003-04-29 20:03:52.362682905 +0200
- @@ -141,7 +141,7 @@
- InsetGraphicsParams & igp = controller().params();
-
- // set the right default unit
- - LyXLength::UNIT unitDefault = LyXLength::CM;
- + LyXLength::LENUNIT unitDefault = LyXLength::CM;
- switch (lyxrc.default_papersize) {
- case BufferParams::PAPER_DEFAULT: break;
-
- @@ -260,7 +260,7 @@
- }
- // 2. the height (a lengthgcombo type)
- dialog_->height->setText(toqstr(tostr(igp.height.value())));
- - LyXLength::UNIT unit_ = (igp.height.value() > 0.0) ?
- + LyXLength::LENUNIT unit_ = (igp.height.value() > 0.0) ?
- igp.height.unit() : unitDefault;
- dialog_->heightUnit->setCurrentItem(unit_);
-
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/QMinipage.C lyx-1.3.1/src/frontends/qt2/QMinipage.C
- --- lyx-1.3.1.orig/src/frontends/qt2/QMinipage.C 2002-12-17 21:37:10.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/QMinipage.C 2003-04-29 20:03:52.363209925 +0200
- @@ -56,7 +56,7 @@
- void QMinipage::apply()
- {
- double const value = strToDbl(fromqstr(dialog_->widthED->text()));
- - LyXLength::UNIT unit = dialog_->unitsLC->currentLengthItem();
- + LyXLength::LENUNIT unit = dialog_->unitsLC->currentLengthItem();
- if (dialog_->widthED->text().isEmpty())
- unit = LyXLength::UNIT_NONE;
-
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/qt_helpers.C lyx-1.3.1/src/frontends/qt2/qt_helpers.C
- --- lyx-1.3.1.orig/src/frontends/qt2/qt_helpers.C 2002-12-17 21:37:11.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/qt_helpers.C 2003-04-29 20:03:52.363693126 +0200
- @@ -67,14 +67,14 @@
- if (isValidGlueLength(fromqstr(length)))
- return fromqstr(length);
-
- - LyXLength::UNIT unit = combo->currentLengthItem();
- + LyXLength::LENUNIT unit = combo->currentLengthItem();
-
- return LyXLength(length.toDouble(), unit).asString();
- }
-
-
- void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
- - string const & len, LyXLength::UNIT defaultUnit)
- + string const & len, LyXLength::LENUNIT defaultUnit)
- {
- if (len.empty()) {
- // no length (UNIT_NONE)
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/qt_helpers.h lyx-1.3.1/src/frontends/qt2/qt_helpers.h
- --- lyx-1.3.1.orig/src/frontends/qt2/qt_helpers.h 2002-12-17 21:37:11.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/qt_helpers.h 2003-04-29 20:03:52.364154800 +0200
- @@ -35,7 +35,7 @@
-
- /// method to set widgets from a LyXLength
- void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
- - string const & len, LyXLength::UNIT default_unit);
- + string const & len, LyXLength::LENUNIT default_unit);
-
- /**
- * toqstr - convert char * into unicode
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/QTabular.C lyx-1.3.1/src/frontends/qt2/QTabular.C
- --- lyx-1.3.1.orig/src/frontends/qt2/QTabular.C 2003-02-07 15:31:40.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/QTabular.C 2003-04-29 20:03:52.364906771 +0200
- @@ -165,7 +165,7 @@
- bool const isReadonly = bc().bp().isReadOnly();
- dialog_->specialAlignmentED->setEnabled(!isReadonly);
-
- - LyXLength::UNIT default_unit = controller().metric() ? LyXLength::CM : LyXLength::IN;
- + LyXLength::LENUNIT default_unit = controller().metric() ? LyXLength::CM : LyXLength::IN;
- if (!pwidth.zero()) {
- dialog_->widthED->setText(toqstr(tostr(pwidth.value())));
- dialog_->widthUnit->setCurrentItem(pwidth.unit());
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/QWrap.C lyx-1.3.1/src/frontends/qt2/QWrap.C
- --- lyx-1.3.1.orig/src/frontends/qt2/QWrap.C 2002-12-17 21:37:10.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/QWrap.C 2003-04-29 20:03:52.365432794 +0200
- @@ -56,7 +56,7 @@
- void QWrap::apply()
- {
- double const value = strToDbl(fromqstr(dialog_->widthED->text()));
- - LyXLength::UNIT unit = dialog_->unitsLC->currentLengthItem();
- + LyXLength::LENUNIT unit = dialog_->unitsLC->currentLengthItem();
- if (dialog_->widthED->text().isEmpty())
- unit = LyXLength::UNIT_NONE;
-
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/ui/ClassModuleBase.ui lyx-1.3.1/src/frontends/qt2/ui/ClassModuleBase.ui
- --- lyx-1.3.1.orig/src/frontends/qt2/ui/ClassModuleBase.ui 2003-02-18 15:02:18.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/ui/ClassModuleBase.ui 2003-04-29 20:03:52.366169585 +0200
- @@ -322,7 +322,7 @@
- <verdata>5</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- </customwidget>
- </customwidgets>
- <images>
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/ui/MarginsModuleBase.ui lyx-1.3.1/src/frontends/qt2/ui/MarginsModuleBase.ui
- --- lyx-1.3.1.orig/src/frontends/qt2/ui/MarginsModuleBase.ui 2003-02-18 15:02:18.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/ui/MarginsModuleBase.ui 2003-04-29 20:03:52.366987455 +0200
- @@ -401,7 +401,7 @@
- <verdata>5</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- </customwidget>
- </customwidgets>
- <images>
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/ui/PaperModuleBase.ui lyx-1.3.1/src/frontends/qt2/ui/PaperModuleBase.ui
- --- lyx-1.3.1.orig/src/frontends/qt2/ui/PaperModuleBase.ui 2003-01-23 17:23:39.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/ui/PaperModuleBase.ui 2003-04-29 20:03:52.367739413 +0200
- @@ -286,7 +286,7 @@
- <verdata>5</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- </customwidget>
- </customwidgets>
- <images>
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/ui/QGraphicsDialogBase.ui lyx-1.3.1/src/frontends/qt2/ui/QGraphicsDialogBase.ui
- --- lyx-1.3.1.orig/src/frontends/qt2/ui/QGraphicsDialogBase.ui 2003-01-23 17:23:40.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/ui/QGraphicsDialogBase.ui 2003-04-29 20:03:52.370563925 +0200
- @@ -1212,7 +1212,7 @@
- <verdata>5</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- </customwidget>
- </customwidgets>
- <images>
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/ui/QMinipageDialogBase.ui lyx-1.3.1/src/frontends/qt2/ui/QMinipageDialogBase.ui
- --- lyx-1.3.1.orig/src/frontends/qt2/ui/QMinipageDialogBase.ui 2003-02-25 15:10:05.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/ui/QMinipageDialogBase.ui 2003-04-29 20:03:52.371717175 +0200
- @@ -346,7 +346,7 @@
- <verdata>5</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- </customwidget>
- </customwidgets>
- <images>
- @@ -364,7 +364,7 @@
- </connection>
- <connection>
- <sender>unitsLC</sender>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- <receiver>QMinipageDialogBase</receiver>
- <slot>change_adaptor()</slot>
- </connection>
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/ui/QTabularDialogBase.ui lyx-1.3.1/src/frontends/qt2/ui/QTabularDialogBase.ui
- --- lyx-1.3.1.orig/src/frontends/qt2/ui/QTabularDialogBase.ui 2003-01-23 17:23:40.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/ui/QTabularDialogBase.ui 2003-04-29 20:03:52.374644549 +0200
- @@ -1356,7 +1356,7 @@
- <verdata>5</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- </customwidget>
- <customwidget>
- <class>QSetBorder</class>
- @@ -1577,7 +1577,7 @@
- </connection>
- <connection>
- <sender>widthUnit</sender>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- <receiver>QTabularDialogBase</receiver>
- <slot>width_changed()</slot>
- </connection>
- diff -Naur lyx-1.3.1.orig/src/frontends/qt2/ui/QWrapDialogBase.ui lyx-1.3.1/src/frontends/qt2/ui/QWrapDialogBase.ui
- --- lyx-1.3.1.orig/src/frontends/qt2/ui/QWrapDialogBase.ui 2003-01-13 11:33:23.000000000 +0100
- +++ lyx-1.3.1/src/frontends/qt2/ui/QWrapDialogBase.ui 2003-04-29 20:03:52.375768392 +0200
- @@ -340,7 +340,7 @@
- <verdata>5</verdata>
- </sizepolicy>
- <pixmap>image0</pixmap>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- </customwidget>
- </customwidgets>
- <images>
- @@ -358,7 +358,7 @@
- </connection>
- <connection>
- <sender>unitsLC</sender>
- - <signal>selectionChanged(LyXLength::UNIT)</signal>
- + <signal>selectionChanged(LyXLength::LENUNIT)</signal>
- <receiver>QWrapDialogBase</receiver>
- <slot>change_adaptor()</slot>
- </connection>
- diff -Naur lyx-1.3.1.orig/src/lengthcommon.C lyx-1.3.1/src/lengthcommon.C
- --- lyx-1.3.1.orig/src/lengthcommon.C 2002-11-25 02:15:10.000000000 +0100
- +++ lyx-1.3.1/src/lengthcommon.C 2003-04-29 20:03:52.376260266 +0200
- @@ -45,10 +45,10 @@
- // N_("twidth%"), N_("cwidth%"), N_("pwidth%"), N_("lwidth%"),
- // N_("theight%"), N_("pheight%") };
-
- -LyXLength::UNIT unitFromString(string const & data)
- +LyXLength::LENUNIT unitFromString(string const & data)
- {
- int i = 0;
- while (i < num_units && data != unit_name[i])
- ++i;
- - return static_cast<LyXLength::UNIT>(i);
- + return static_cast<LyXLength::LENUNIT>(i);
- }
- diff -Naur lyx-1.3.1.orig/src/lengthcommon.h lyx-1.3.1/src/lengthcommon.h
- --- lyx-1.3.1.orig/src/lengthcommon.h 2002-11-17 12:24:08.000000000 +0100
- +++ lyx-1.3.1/src/lengthcommon.h 2003-04-29 20:03:52.376643680 +0200
- @@ -19,7 +19,7 @@
- extern char const * unit_name_ltx[];
-
- /// return the unit given a string representation such as "cm"
- -LyXLength::UNIT unitFromString(string const & data);
- +LyXLength::LENUNIT unitFromString(string const & data);
-
-
- #endif // LENGTH_COMMON_H
- diff -Naur lyx-1.3.1.orig/src/lyxlength.C lyx-1.3.1/src/lyxlength.C
- --- lyx-1.3.1.orig/src/lyxlength.C 2002-12-04 03:57:14.000000000 +0100
- +++ lyx-1.3.1/src/lyxlength.C 2003-04-29 20:09:34.116688131 +0200
- @@ -31,7 +31,7 @@
- {}
-
-
- -LyXLength::LyXLength(double v, LyXLength::UNIT u)
- +LyXLength::LyXLength(double v, LyXLength::LENUNIT u)
- : val_(v), unit_(u)
- {}
-
- @@ -99,7 +99,7 @@
- }
-
-
- -LyXLength::UNIT LyXLength::unit() const
- +LyXLength::LENUNIT LyXLength::unit() const
- {
- return unit_;
- }
- @@ -111,7 +111,7 @@
- }
-
-
- -void LyXLength::unit(LyXLength::UNIT u)
- +void LyXLength::unit(LyXLength::LENUNIT u)
- {
- unit_ = u;
- }
- @@ -156,7 +156,7 @@
- double result = 0.0;
-
- switch (unit_) {
- - case LyXLength::SP:
- + case LyXLength::LYX_SP:
- // Scaled point: sp = 1/65536 pt
- result = zoom * dpi * val_
- / (72.27 * 65536); // 4736286.7
- @@ -181,7 +181,7 @@
- result = zoom * dpi * val_
- / 25.4; // 25.4
- break;
- - case LyXLength::PC:
- + case LyXLength::LYX_PC:
- // Pica: 1 pc = 12 pt
- result = zoom * dpi * val_
- / (72.27 / 12); // 6.0225
- diff -Naur lyx-1.3.1.orig/src/lyxlength.h lyx-1.3.1/src/lyxlength.h
- --- lyx-1.3.1.orig/src/lyxlength.h 2002-12-04 03:57:14.000000000 +0100
- +++ lyx-1.3.1/src/lyxlength.h 2003-04-29 20:05:52.608542869 +0200
- @@ -23,13 +23,13 @@
- class LyXLength {
- public:
- /// length units
- - enum UNIT {
- - SP, ///< Scaled point (65536sp = 1pt) TeX's smallest unit.
- + enum LENUNIT {
- + LYX_SP, ///< Scaled point (65536sp = 1pt) TeX's smallest unit.
- PT, ///< Point = 1/72.27in = 0.351mm
- BP, ///< Big point (72bp = 1in), also PostScript point
- DD, ///< Didot point = 1/72 of a French inch, = 0.376mm
- MM, ///< Millimeter = 2.845pt
- - PC, ///< Pica = 12pt = 4.218mm
- + LYX_PC, ///< Pica = 12pt = 4.218mm
- CC, ///< Cicero = 12dd = 4.531mm
- CM, ///< Centimeter = 10mm = 2.371pc
- IN, ///< Inch = 25.4mm = 72.27pt = 6.022pc
- @@ -48,7 +48,7 @@
- ///
- LyXLength();
- ///
- - LyXLength(double v, LyXLength::UNIT u);
- + LyXLength(double v, LyXLength::LENUNIT u);
-
- /// "data" must be a decimal number, followed by a unit
- explicit LyXLength(string const & data);
- @@ -56,11 +56,11 @@
- ///
- double value() const;
- ///
- - LyXLength::UNIT unit() const;
- + LyXLength::LENUNIT unit() const;
- ///
- void value(double);
- ///
- - void unit(LyXLength::UNIT unit);
- + void unit(LyXLength::LENUNIT unit);
- ///
- bool zero() const;
- ///
- @@ -82,7 +82,7 @@
- ///
- double val_;
- ///
- - LyXLength::UNIT unit_;
- + LyXLength::LENUNIT unit_;
- };
-
- ///
- diff -Naur lyx-1.3.1.orig/src/vspace.C lyx-1.3.1/src/vspace.C
- --- lyx-1.3.1.orig/src/vspace.C 2002-12-01 23:59:17.000000000 +0100
- +++ lyx-1.3.1/src/vspace.C 2003-04-29 20:03:52.379626127 +0200
- @@ -32,7 +32,7 @@
- /// used to return numeric values in parsing vspace
- double number[4] = { 0, 0, 0, 0 };
- /// used to return unit types in parsing vspace
- -LyXLength::UNIT unit[4] = { LyXLength::UNIT_NONE,
- +LyXLength::LENUNIT unit[4] = { LyXLength::UNIT_NONE,
- LyXLength::UNIT_NONE,
- LyXLength::UNIT_NONE,
- LyXLength::UNIT_NONE };
|