#87298# insert operator<< for OString

This commit is contained in:
Juergen Schmidt 2001-06-20 13:50:40 +00:00
parent 80a03301e1
commit 40cd280e03
2 changed files with 21 additions and 5 deletions

View File

@ -2,9 +2,9 @@
*
* $RCSfile: global.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: jsc $ $Date: 2001-03-13 12:04:21 $
* last change: $Author: jsc $ $Date: 2001-06-20 14:49:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -139,6 +139,11 @@ public:
sal_Int32 getSize();
::rtl::OString getName() { return m_name; }
// friend functions
friend ostream &operator<<(ostream& o, ::rtl::OString*);
friend ostream &operator<<(ostream& o, const ::rtl::OString&);
protected:
::rtl::OString m_name;
};

View File

@ -2,9 +2,9 @@
*
* $RCSfile: global.cxx,v $
*
* $Revision: 1.8 $
* $Revision: 1.9 $
*
* last change: $Author: pl $ $Date: 2001-05-10 20:07:30 $
* last change: $Author: jsc $ $Date: 2001-06-20 14:50:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@ -338,7 +338,7 @@ FileStream::~FileStream()
sal_Bool FileStream::isValid()
{
#if defined(SAL_UNX) || defined(SAL_OS2)
#if defined(SAL_UNX) || defined(SAL_OS2) || !defined(D__STL_NO_NEW_IOSTREAMS)
#if STLPORT_VERSION < 400
if(rdbuf()->fd() < 0)
#else
@ -381,3 +381,14 @@ sal_Int32 FileStream::getSize()
return size;
}
ostream &operator <<(ostream& o, OString* s)
{
o << s->getStr();
return o;
}
ostream &operator <<(ostream& o, const OString& s)
{
o << s.getStr();
return o;
}