Kaydet (Commit) 2ffd82c3 authored tarafından Caolán McNamara's avatar Caolán McNamara

XubString->OUString

Change-Id: Iea7d8681cdcd45d545826af63fc689640dfe29f0
üst 5346394e
...@@ -28,13 +28,13 @@ class CntContentTypeItem : public CntUnencodedStringItem ...@@ -28,13 +28,13 @@ class CntContentTypeItem : public CntUnencodedStringItem
{ {
private: private:
INetContentType _eType; INetContentType _eType;
XubString _aPresentation; OUString _aPresentation;
public: public:
TYPEINFO(); TYPEINFO();
CntContentTypeItem(); CntContentTypeItem();
CntContentTypeItem( sal_uInt16 nWhich, const XubString& rType ); CntContentTypeItem( sal_uInt16 nWhich, const OUString& rType );
CntContentTypeItem( const CntContentTypeItem& rOrig ); CntContentTypeItem( const CntContentTypeItem& rOrig );
virtual SfxPoolItem* Create( SvStream& rStream, virtual SfxPoolItem* Create( SvStream& rStream,
...@@ -47,7 +47,7 @@ public: ...@@ -47,7 +47,7 @@ public:
virtual SfxPoolItem* Clone( SfxItemPool *pPool = NULL ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = NULL ) const;
void SetValue( const XubString& rNewVal ); void SetValue( const OUString& rNewVal );
using SfxPoolItem::Compare; using SfxPoolItem::Compare;
virtual int Compare( const SfxPoolItem &rWith, const IntlWrapper& rIntlWrapper ) const; virtual int Compare( const SfxPoolItem &rWith, const IntlWrapper& rIntlWrapper ) const;
......
...@@ -31,7 +31,7 @@ public: ...@@ -31,7 +31,7 @@ public:
SfxStringItem() {} SfxStringItem() {}
SfxStringItem(sal_uInt16 which, const XubString & rValue): SfxStringItem(sal_uInt16 which, const OUString & rValue):
CntUnencodedStringItem(which, rValue) {} CntUnencodedStringItem(which, rValue) {}
SfxStringItem(sal_uInt16 nWhich, SvStream & rStream); SfxStringItem(sal_uInt16 nWhich, SvStream & rStream);
......
...@@ -46,7 +46,7 @@ CntContentTypeItem::CntContentTypeItem() ...@@ -46,7 +46,7 @@ CntContentTypeItem::CntContentTypeItem()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
CntContentTypeItem::CntContentTypeItem( sal_uInt16 which, const XubString& rType ) CntContentTypeItem::CntContentTypeItem( sal_uInt16 which, const OUString& rType )
: CntUnencodedStringItem( which, rType ), : CntUnencodedStringItem( which, rType ),
_eType( CONTENT_TYPE_NOT_INIT ) _eType( CONTENT_TYPE_NOT_INIT )
{ {
...@@ -122,11 +122,11 @@ SfxPoolItem* CntContentTypeItem::Clone( SfxItemPool* /* pPool */ ) const ...@@ -122,11 +122,11 @@ SfxPoolItem* CntContentTypeItem::Clone( SfxItemPool* /* pPool */ ) const
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void CntContentTypeItem::SetValue( const XubString& rNewVal ) void CntContentTypeItem::SetValue( const OUString& rNewVal )
{ {
// De-initialize enum type and presentation. // De-initialize enum type and presentation.
_eType = CONTENT_TYPE_NOT_INIT; _eType = CONTENT_TYPE_NOT_INIT;
_aPresentation.Erase(); _aPresentation = OUString();
CntUnencodedStringItem::SetValue( rNewVal ); CntUnencodedStringItem::SetValue( rNewVal );
} }
...@@ -150,7 +150,7 @@ SfxItemPresentation CntContentTypeItem::GetPresentation( ...@@ -150,7 +150,7 @@ SfxItemPresentation CntContentTypeItem::GetPresentation(
XubString & rText, XubString & rText,
const IntlWrapper * pIntlWrapper) const const IntlWrapper * pIntlWrapper) const
{ {
if (_aPresentation.Len() == 0) if (_aPresentation.isEmpty())
{ {
DBG_ASSERT(pIntlWrapper, DBG_ASSERT(pIntlWrapper,
"CntContentTypeItem::GetPresentation(): No IntlWrapper"); "CntContentTypeItem::GetPresentation(): No IntlWrapper");
...@@ -160,7 +160,7 @@ SfxItemPresentation CntContentTypeItem::GetPresentation( ...@@ -160,7 +160,7 @@ SfxItemPresentation CntContentTypeItem::GetPresentation(
pIntlWrapper-> pIntlWrapper->
getLocale()); getLocale());
} }
if (_aPresentation.Len() > 0) if (!_aPresentation.isEmpty())
{ {
rText = _aPresentation; rText = _aPresentation;
return SFX_ITEM_PRESENTATION_COMPLETE; return SFX_ITEM_PRESENTATION_COMPLETE;
...@@ -217,7 +217,7 @@ bool CntContentTypeItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uIn ...@@ -217,7 +217,7 @@ bool CntContentTypeItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uIn
SetValue(aValue); SetValue(aValue);
else else
SetValue( SetValue(
INetContentTypes::RegisterContentType(aValue, UniString())); INetContentTypes::RegisterContentType(aValue, OUString()));
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment