* fixed all compilation issues of printkit-stuff with gcc4 on Linux
* removed leagcy _sstream-header, we now use sstream, as both compilers provide it git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19109 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d03f6d5c29
commit
6b376d6055
@ -12,6 +12,7 @@
|
||||
using namespace std;
|
||||
|
||||
class SpoolMetaData {
|
||||
typedef std::string string;
|
||||
private:
|
||||
string fDescription;
|
||||
string fMimeType;
|
||||
|
@ -13,6 +13,7 @@ class PCL6Driver;
|
||||
|
||||
class PCL6WriterStream {
|
||||
public:
|
||||
virtual ~PCL6WriterStream() {}
|
||||
virtual void write(const uint8 *data, uint32 size) = 0;
|
||||
};
|
||||
|
||||
|
@ -268,6 +268,7 @@ class ListIterator
|
||||
virtual bool DoItem(BListItem* item) = 0;
|
||||
public:
|
||||
static bool DoIt(BListItem* item, void* data);
|
||||
virtual ~ListIterator() {}
|
||||
};
|
||||
|
||||
|
||||
|
@ -30,6 +30,8 @@ THE SOFTWARE.
|
||||
#include <math.h>
|
||||
#include "LinePathBuilder.h"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
static const float kNearZero = 0.000000000001;
|
||||
static const float kMinPenSize = 0.0001;
|
||||
|
||||
|
@ -58,6 +58,7 @@ private:
|
||||
|
||||
public:
|
||||
Link(PDFWriter* writer, BString* utf8);
|
||||
virtual ~Link() {}
|
||||
void Do();
|
||||
};
|
||||
|
||||
|
@ -882,26 +882,6 @@ PDFWriter::Paint(bool stroke)
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
bool
|
||||
PDFWriter::IsSame(const pattern &p1, const pattern &p2)
|
||||
{
|
||||
char *a = (char*)p1.data;
|
||||
char *b = (char*)p2.data;
|
||||
return memcmp(a, b, 8) == 0;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
bool
|
||||
PDFWriter::IsSame(const rgb_color &c1, const rgb_color &c2)
|
||||
{
|
||||
char *a = (char*)&c1;
|
||||
char *b = (char*)&c1;
|
||||
return memcmp(a, b, sizeof(rgb_color)) == 0;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
void
|
||||
PDFWriter::SetColor()
|
||||
|
@ -394,6 +394,26 @@ class PDFWriter : public PrinterDriver, public PictureIterator
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
inline bool
|
||||
PDFWriter::IsSame(const pattern &p1, const pattern &p2)
|
||||
{
|
||||
char *a = (char*)p1.data;
|
||||
char *b = (char*)p2.data;
|
||||
return memcmp(a, b, 8) == 0;
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------
|
||||
inline bool
|
||||
PDFWriter::IsSame(const rgb_color &c1, const rgb_color &c2)
|
||||
{
|
||||
char *a = (char*)&c1;
|
||||
char *b = (char*)&c1;
|
||||
return memcmp(a, b, sizeof(rgb_color)) == 0;
|
||||
}
|
||||
|
||||
|
||||
// PDFLib C callbacks class instance redirectors
|
||||
size_t _WriteData(PDF *p, void *data, size_t size);
|
||||
void _ErrorHandler(PDF *p, int type, const char *msg);
|
||||
|
@ -164,7 +164,7 @@ PageSetupWindow::PageSetupWindow(BMessage *msg, const char *printerName)
|
||||
margin.right = page.right - margin.right;
|
||||
margin.bottom = page.bottom - margin.bottom;
|
||||
|
||||
fMarginView = new MarginView(BRect(20,20,200,160), width, height,
|
||||
fMarginView = new MarginView(BRect(20,20,200,160), (int32)width, (int32)height,
|
||||
margin, units);
|
||||
panel->AddChild(fMarginView);
|
||||
|
||||
|
@ -152,7 +152,7 @@ PageSetupWindow::PageSetupWindow(BMessage *msg, const char *printerName)
|
||||
margin.Set(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
fMarginView = new MarginView(BRect(20,20,200,160), width, height,
|
||||
fMarginView = new MarginView(BRect(20,20,200,160), (int32)width, (int32)height,
|
||||
margin, units);
|
||||
panel->AddChild(fMarginView);
|
||||
|
||||
|
@ -32,6 +32,7 @@ THE SOFTWARE.
|
||||
|
||||
#include <string.h>
|
||||
#include "Utils.h"
|
||||
#include <string.h>
|
||||
|
||||
// --------------------------------------------------
|
||||
EscapeMessageFilter::EscapeMessageFilter(BWindow *window, int32 what)
|
||||
|
@ -529,7 +529,7 @@ JobSetupView::AttachedToWindow()
|
||||
fGamma = new JSDSlider(gamma_rect, "gamma", "Gamma", new BMessage(kMsgQuality), -300, 300, B_BLOCK_THUMB);
|
||||
|
||||
fGamma->SetLimitLabels("Brighter", "Darker");
|
||||
fGamma->SetValue(100 * log(fJobData->getGamma()) / log(2.0));
|
||||
fGamma->SetValue((int32)(100 * log(fJobData->getGamma()) / log(2.0)));
|
||||
fGamma->SetHashMarks(B_HASH_MARKS_BOTH);
|
||||
fGamma->SetHashMarkCount(7);
|
||||
box->AddChild(fGamma);
|
||||
|
@ -119,4 +119,4 @@ void PagesView::setReverse(bool reverse)
|
||||
{
|
||||
fReverse = reverse;
|
||||
Invalidate();
|
||||
}
|
||||
}
|
||||
|
@ -33,4 +33,4 @@ const BaseCap *PrinterCap::getDefaultCap(CapID id) const
|
||||
|
||||
int PrinterCap::getProtocolClass() const {
|
||||
return fPrinterData->getProtocolClass();
|
||||
}
|
||||
}
|
||||
|
@ -4,8 +4,7 @@
|
||||
#ifndef __HttpURLConnection_H
|
||||
#define __HttpURLConnection_H
|
||||
|
||||
#include <istream.h>
|
||||
#include <ostream.h>
|
||||
#include <iostream>
|
||||
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
@ -4,8 +4,7 @@
|
||||
#ifndef __IppContent_H
|
||||
#define __IppContent_H
|
||||
|
||||
#include <istream.h>
|
||||
#include <ostream.h>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
||||
|
@ -141,7 +141,7 @@ ssize_t IppTransport::Write(const void *buffer, size_t size)
|
||||
{
|
||||
// DBGMSG(("write: %d\n", size));
|
||||
|
||||
if (!__fs.write(buffer, size)) {
|
||||
if (!__fs.write((const char *)buffer, size)) {
|
||||
__error = true;
|
||||
return 0;
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
#else
|
||||
# include <net/socket.h>
|
||||
#endif
|
||||
#include <ostream.h>
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
char *itoa(int i, char *buf, int unit)
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <iomanip>
|
||||
#include "_sstream"
|
||||
#include <sstream>
|
||||
|
||||
#include "LpsClient.h"
|
||||
#include "LprSetupDlg.h"
|
||||
|
@ -9,7 +9,7 @@
|
||||
# include <net/netdb.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include "_sstream"
|
||||
#include <sstream>
|
||||
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
|
@ -4,8 +4,7 @@
|
||||
#ifndef __LPSCLIENT_H
|
||||
#define __LPSCLIENT_H
|
||||
|
||||
#include <istream.h>
|
||||
#include <ostream.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#if (!__MWERKS__)
|
||||
|
@ -4,8 +4,7 @@
|
||||
#ifndef __Socket_H
|
||||
#define __Socket_H
|
||||
|
||||
#include <istream.h>
|
||||
#include <ostream.h>
|
||||
#include <iostream>
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -4,9 +4,7 @@
|
||||
#ifndef __SocketStream_H
|
||||
#define __SocketStream_H
|
||||
|
||||
#include <istream.h>
|
||||
#include <ostream.h>
|
||||
#include <streambuf.h>
|
||||
#include <iostream>
|
||||
|
||||
class Socket;
|
||||
|
||||
|
@ -1,24 +0,0 @@
|
||||
/*
|
||||
* _sstream
|
||||
* Copyright 1999 Y.Takagi. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#if __MWERKS__
|
||||
#include <sstream>
|
||||
#else
|
||||
|
||||
#ifndef __SSTREAM_H
|
||||
#define __SSTREAM_H
|
||||
|
||||
#include <strstream>
|
||||
#include <string>
|
||||
|
||||
class ostringstream : public ostrstream {
|
||||
public:
|
||||
ostringstream() : ostrstream() {}
|
||||
~ostringstream() { delete [] ostrstream::str(); }
|
||||
string str() { *this << ends; return string(ostrstream::str()); }
|
||||
};
|
||||
|
||||
#endif /* __SSTREAM_H */
|
||||
#endif /* USING_STRSTREAM */
|
Loading…
Reference in New Issue
Block a user