+2002-07-09 Angus Leeming <leeming@lyx.org>
+
+ * xformsImage.C (scale): use boost::tie.
+ (statusCB): fudge to fix bug in image width for xforms <= 0.89.6.
+
2002-07-08 Angus Leeming <leeming@lyx.org>
* forms/fdfix.sh: whitespace.
# endif
#endif
+#include <boost/tuple/tuple.hpp>
+
using std::find_if;
namespace {
{
if (!image_)
return 0;
+
+#if FL_VERSION == 0 && FL_REVISION == 89 && FL_FIXLEVEL <= 6
+ // Used to fix a bug in xforms <= 0.89.6 which
+ // crops the image unnecessarily.
+ return image_->w + 5;
+#else
return image_->w;
+#endif
}
if (!image_)
return;
- // boost::tie produces horrible compilation errors on my machine
- // Angus 25 Feb 2002
- std::pair<unsigned int, unsigned int> d = getScaledDimensions(params);
- unsigned int const width = d.first;
- unsigned int const height = d.second;
+ unsigned int width;
+ unsigned int height;
+ boost::tie(width, height) = getScaledDimensions(params);
if (width == getWidth() && height == getHeight())
// No scaling needed
-2002-07-08 Angus Leeming <leeming@lyx.org>
+2002-07-09 Angus Leeming <leeming@lyx.org>
* PreviewLoader.C: Further refactoring of the code. Should now be
pretty clean.
past its sell-by date. The code to read the metrics file is now found
as a helper function in PreviewLoader.C.
+ * GraphicsImageXPM.C (scale): use boost::tie.
+
2002-07-08 Herbert Voss <voss@lyx.org>
* PreviewLoader.C: use of preview_size_factor to get the right
#include <cmath> // cos, sin
#include <cstdlib> // malloc, free
+#include <boost/tuple/tuple.hpp>
+
#include FORMS_H_LOCATION
#ifndef CXX_GLOBAL_CSTD
typedef unsigned int dimension;
- // boost::tie produces horrible compilation errors on my machine
- // Angus 25 Feb 2002
- std::pair<dimension, dimension> d = getScaledDimensions(params);
- dimension const new_width = d.first;
- dimension const new_height = d.second;
+ dimension new_width;
+ dimension new_height;
+ boost::tie(new_width, new_height) = getScaledDimensions(params);
+
if (new_width == getWidth() && new_height == getHeight())
// No scaling needed
return;