XubString->OUString

Change-Id: I178f9eb702afb6143c583d5fd54003a427d895fa
This commit is contained in:
Caolán McNamara
2013-08-13 20:41:52 +01:00
parent 8ae46066e6
commit 403a75a275
13 changed files with 40 additions and 40 deletions

View File

@@ -654,13 +654,13 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
if ( nHLevel == STYLE_PRE ) if ( nHLevel == STYLE_PRE )
{ {
Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 ); Font aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 );
SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO ); SvxFontItem aFontItem( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO );
aItems.Put( aFontItem ); aItems.Put( aFontItem );
SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK ); SvxFontItem aFontItemCJK( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CJK );
aItems.Put( aFontItemCJK ); aItems.Put( aFontItemCJK );
SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetName(), XubString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL ); SvxFontItem aFontItemCTL( aFont.GetFamily(), aFont.GetName(), OUString(), aFont.GetPitch(), aFont.GetCharSet(), EE_CHAR_FONTINFO_CTL );
aItems.Put( aFontItemCTL ); aItems.Put( aFontItemCTL );
} }

View File

@@ -222,8 +222,8 @@ SvxFontItem::SvxFontItem( const sal_uInt16 nId ) :
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
SvxFontItem::SvxFontItem( const FontFamily eFam, const XubString& aName, SvxFontItem::SvxFontItem( const FontFamily eFam, const OUString& aName,
const XubString& aStName, const FontPitch eFontPitch, const OUString& aStName, const FontPitch eFontPitch,
const rtl_TextEncoding eFontTextEncoding, const sal_uInt16 nId ) : const rtl_TextEncoding eFontTextEncoding, const sal_uInt16 nId ) :
SfxPoolItem( nId ), SfxPoolItem( nId ),
@@ -256,19 +256,19 @@ bool SvxFontItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
case 0: case 0:
{ {
com::sun::star::awt::FontDescriptor aFontDescriptor; com::sun::star::awt::FontDescriptor aFontDescriptor;
aFontDescriptor.Name = aFamilyName.GetBuffer(); aFontDescriptor.Name = aFamilyName;
aFontDescriptor.StyleName = aStyleName.GetBuffer(); aFontDescriptor.StyleName = aStyleName;
aFontDescriptor.Family = (sal_Int16)(eFamily); aFontDescriptor.Family = (sal_Int16)(eFamily);
aFontDescriptor.CharSet = (sal_Int16)(eTextEncoding); aFontDescriptor.CharSet = (sal_Int16)(eTextEncoding);
aFontDescriptor.Pitch = (sal_Int16)(ePitch); aFontDescriptor.Pitch = (sal_Int16)(ePitch);
rVal <<= aFontDescriptor; rVal <<= aFontDescriptor;
} }
break; break;
case MID_FONT_FAMILY_NAME : case MID_FONT_FAMILY_NAME:
rVal <<= OUString(aFamilyName.GetBuffer()); rVal <<= aFamilyName;
break; break;
case MID_FONT_STYLE_NAME: case MID_FONT_STYLE_NAME:
rVal <<= OUString(aStyleName.GetBuffer()); rVal <<= aStyleName;
break; break;
case MID_FONT_FAMILY : rVal <<= (sal_Int16)(eFamily); break; case MID_FONT_FAMILY : rVal <<= (sal_Int16)(eFamily); break;
case MID_FONT_CHAR_SET : rVal <<= (sal_Int16)(eTextEncoding); break; case MID_FONT_CHAR_SET : rVal <<= (sal_Int16)(eTextEncoding); break;
@@ -300,7 +300,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId)
OUString aStr; OUString aStr;
if(!(rVal >>= aStr)) if(!(rVal >>= aStr))
return sal_False; return sal_False;
aFamilyName = aStr.getStr(); aFamilyName = aStr;
} }
break; break;
case MID_FONT_STYLE_NAME: case MID_FONT_STYLE_NAME:
@@ -308,7 +308,7 @@ bool SvxFontItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId)
OUString aStr; OUString aStr;
if(!(rVal >>= aStr)) if(!(rVal >>= aStr))
return sal_False; return sal_False;
aStyleName = aStr.getStr(); aStyleName = aStr;
} }
break; break;
case MID_FONT_FAMILY : case MID_FONT_FAMILY :

View File

@@ -1248,11 +1248,11 @@ void OutlinerView::RemoveAttribs( sal_Bool bRemoveParaAttribs, sal_uInt16 nWhich
// ====================================================================== // ======================================================================
void OutlinerView::InsertText( const XubString& rNew, sal_Bool bSelect ) void OutlinerView::InsertText( const OUString& rNew, sal_Bool bSelect )
{ {
DBG_CHKTHIS(OutlinerView,0); DBG_CHKTHIS(OutlinerView,0);
if( pOwner->bFirstParaIsEmpty ) if( pOwner->bFirstParaIsEmpty )
pOwner->Insert( String() ); pOwner->Insert( OUString() );
pEditView->InsertText( rNew, bSelect ); pEditView->InsertText( rNew, bSelect );
} }
@@ -1330,7 +1330,7 @@ Rectangle OutlinerView::GetOutputArea() const
} }
XubString OutlinerView::GetSelected() const OUString OutlinerView::GetSelected() const
{ {
DBG_CHKTHIS(OutlinerView,0); DBG_CHKTHIS(OutlinerView,0);
return pEditView->GetSelected(); return pEditView->GetSelected();

View File

@@ -35,9 +35,9 @@ class SvXMLUnitConverter;
class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem class EDITENG_DLLPUBLIC SvxFontItem : public SfxPoolItem
{ {
String aFamilyName; OUString aFamilyName;
String aStyleName; OUString aStyleName;
FontFamily eFamily; FontFamily eFamily;
FontPitch ePitch; FontPitch ePitch;
rtl_TextEncoding eTextEncoding; rtl_TextEncoding eTextEncoding;
@@ -47,8 +47,8 @@ public:
TYPEINFO(); TYPEINFO();
explicit SvxFontItem( const sal_uInt16 nId ); explicit SvxFontItem( const sal_uInt16 nId );
SvxFontItem( const FontFamily eFam, const String& rFamilyName, SvxFontItem( const FontFamily eFam, const OUString& rFamilyName,
const String& rStyleName, const OUString& rStyleName,
const FontPitch eFontPitch /*= PITCH_DONTKNOW*/, const FontPitch eFontPitch /*= PITCH_DONTKNOW*/,
const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/, const rtl_TextEncoding eFontTextEncoding /*= RTL_TEXTENCODING_DONTKNOW*/,
const sal_uInt16 nId ); const sal_uInt16 nId );
@@ -67,21 +67,21 @@ public:
OUString &rText, const IntlWrapper * = 0 ) const; OUString &rText, const IntlWrapper * = 0 ) const;
// Access methods: // Access methods:
void SetFamilyName( const String& rFamilyName ) { aFamilyName = rFamilyName; } void SetFamilyName( const OUString& rFamilyName ) { aFamilyName = rFamilyName; }
inline const String &GetFamilyName() const { return aFamilyName; } const OUString &GetFamilyName() const { return aFamilyName; }
void SetStyleName(const String &rStyleName ) { aStyleName = rStyleName; } void SetStyleName(const OUString &rStyleName ) { aStyleName = rStyleName; }
inline const String &GetStyleName() const { return aStyleName; } const OUString &GetStyleName() const { return aStyleName; }
void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; } void SetFamily( FontFamily _eFamily ) { eFamily = _eFamily; }
inline FontFamily GetFamily() const { return eFamily; } FontFamily GetFamily() const { return eFamily; }
void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; } void SetPitch(FontPitch _ePitch ) { ePitch = _ePitch; }
inline FontPitch GetPitch() const { return ePitch; } FontPitch GetPitch() const { return ePitch; }
void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; } void SetCharSet(rtl_TextEncoding _eEncoding) { eTextEncoding = _eEncoding; }
inline rtl_TextEncoding GetCharSet() const { return eTextEncoding; } rtl_TextEncoding GetCharSet() const { return eTextEncoding; }
SvxFontItem& operator=(const SvxFontItem& rFont); SvxFontItem& operator=(const SvxFontItem& rFont);

View File

@@ -266,7 +266,7 @@ public:
sal_Bool bSelect=sal_True, sal_Bool bSelect=sal_True,
sal_Bool bWChildren=sal_True); sal_Bool bWChildren=sal_True);
String GetSelected() const; OUString GetSelected() const;
void SelectRange( sal_Int32 nFirst, sal_Int32 nCount ); void SelectRange( sal_Int32 nFirst, sal_Int32 nCount );
void SetAttribs( const SfxItemSet& ); void SetAttribs( const SfxItemSet& );
void Indent( short nDiff ); void Indent( short nDiff );
@@ -276,7 +276,7 @@ public:
sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL ); sal_uLong Read( SvStream& rInput, const String& rBaseURL, EETextFormat eFormat, sal_Bool bSelect = sal_False, SvKeyValueIterator* pHTTPHeaderAttrs = NULL );
void InsertText( const String& rNew, sal_Bool bSelect = sal_False ); void InsertText( const OUString& rNew, sal_Bool bSelect = sal_False );
void InsertText( const OutlinerParaObject& rParaObj ); void InsertText( const OutlinerParaObject& rParaObj );
void Expand(); void Expand();
void Collapse(); void Collapse();

View File

@@ -657,7 +657,7 @@ void ScAutoFormatData::FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, S
rItemSet.Put( rField.GetPosture() ); rItemSet.Put( rField.GetPosture() );
// do not insert empty CJK font // do not insert empty CJK font
const SvxFontItem& rCJKFont = rField.GetCJKFont(); const SvxFontItem& rCJKFont = rField.GetCJKFont();
if( rCJKFont.GetStyleName().Len() ) if (!rCJKFont.GetStyleName().isEmpty())
{ {
rItemSet.Put( rCJKFont ); rItemSet.Put( rCJKFont );
rItemSet.Put( rField.GetCJKHeight() ); rItemSet.Put( rField.GetCJKHeight() );
@@ -672,7 +672,7 @@ void ScAutoFormatData::FillToItemSet( sal_uInt16 nIndex, SfxItemSet& rItemSet, S
} }
// do not insert empty CTL font // do not insert empty CTL font
const SvxFontItem& rCTLFont = rField.GetCTLFont(); const SvxFontItem& rCTLFont = rField.GetCTLFont();
if( rCTLFont.GetStyleName().Len() ) if (rCTLFont.GetStyleName().isEmpty())
{ {
rItemSet.Put( rCTLFont ); rItemSet.Put( rCTLFont );
rItemSet.Put( rField.GetCTLHeight() ); rItemSet.Put( rField.GetCTLHeight() );

View File

@@ -253,7 +253,7 @@ Selection AnnotationTextWindow::GetSurroundingTextSelection() const
if( mpOutlinerView ) if( mpOutlinerView )
{ {
if( mpOutlinerView->HasSelection() ) if( mpOutlinerView->HasSelection() )
return Selection( 0, mpOutlinerView->GetSelected().Len() ); return Selection( 0, mpOutlinerView->GetSelected().getLength() );
else else
{ {
ESelection aSelection = mpOutlinerView->GetEditView().GetSelection(); ESelection aSelection = mpOutlinerView->GetEditView().GetSelection();

View File

@@ -943,7 +943,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if (pOlView) if (pOlView)
{ {
if ( pOlView->GetSelected().Len() == 0 ) if (pOlView->GetSelected().isEmpty())
{ {
rSet.DisableItem( SID_CUT ); rSet.DisableItem( SID_CUT );
rSet.DisableItem( SID_COPY ); rSet.DisableItem( SID_COPY );

View File

@@ -779,7 +779,7 @@ sal_Bool DrawViewShell::HasSelection(sal_Bool bText) const
{ {
OutlinerView* pOlView = mpDrawView->GetTextEditOutlinerView(); OutlinerView* pOlView = mpDrawView->GetTextEditOutlinerView();
if (pOlView && pOlView->GetSelected().Len() != 0) if (pOlView && !pOlView->GetSelected().isEmpty())
{ {
bReturn = sal_True; bReturn = sal_True;
} }

View File

@@ -1504,7 +1504,7 @@ sal_Bool OutlineViewShell::HasSelection(sal_Bool bText) const
{ {
OutlinerView* pOutlinerView = pOlView->GetViewByWindow( GetActiveWindow() ); OutlinerView* pOutlinerView = pOlView->GetViewByWindow( GetActiveWindow() );
if (pOutlinerView && pOutlinerView->GetSelected().Len() != 0) if (pOutlinerView && !pOutlinerView->GetSelected().isEmpty())
{ {
bReturn = sal_True; bReturn = sal_True;
} }

View File

@@ -34,7 +34,7 @@ friend class ImpItemEdit;
std::vector<ImpItemListRow*> aList; std::vector<ImpItemListRow*> aList;
long nAktPaintRow; long nAktPaintRow;
Edit* pEditControl; Edit* pEditControl;
XubString aWNamMerk; OUString aWNamMerk;
Link aEntryChangedHdl; Link aEntryChangedHdl;
Link aSetDirtyHdl; Link aSetDirtyHdl;
ImpItemListRow* pAktChangeEntry; ImpItemListRow* pAktChangeEntry;
@@ -87,7 +87,7 @@ public:
virtual OUString GetCellText(long _nRow, sal_uInt16 _nColId) const; virtual OUString GetCellText(long _nRow, sal_uInt16 _nColId) const;
const ImpItemListRow* GetAktChangeEntry() const { return pAktChangeEntry; } const ImpItemListRow* GetAktChangeEntry() const { return pAktChangeEntry; }
XubString GetNewEntryValue() const { return pEditControl->GetText(); } OUString GetNewEntryValue() const { return pEditControl->GetText(); }
void SetEntryChangedHdl(const Link& rLink) { aEntryChangedHdl=rLink; } void SetEntryChangedHdl(const Link& rLink) { aEntryChangedHdl=rLink; }
const Link& GetEntryChangedHdl() const { return aEntryChangedHdl; } const Link& GetEntryChangedHdl() const { return aEntryChangedHdl; }
void SetSetDirtyHdl(const Link& rLink) { aSetDirtyHdl=rLink; } void SetSetDirtyHdl(const Link& rLink) { aSetDirtyHdl=rLink; }

View File

@@ -767,7 +767,7 @@ void SwTableAutoFmt::UpdateToSet(sal_uInt8 nPos, SfxItemSet& rSet,
rSet.Put( rChg.GetPosture() ); rSet.Put( rChg.GetPosture() );
// do not insert empty CJK font // do not insert empty CJK font
const SvxFontItem& rCJKFont = rChg.GetCJKFont(); const SvxFontItem& rCJKFont = rChg.GetCJKFont();
if( rCJKFont.GetStyleName().Len() ) if (!rCJKFont.GetStyleName().isEmpty())
{ {
rSet.Put( rChg.GetCJKFont() ); rSet.Put( rChg.GetCJKFont() );
rSet.Put( rChg.GetCJKHeight() ); rSet.Put( rChg.GetCJKHeight() );
@@ -782,7 +782,7 @@ void SwTableAutoFmt::UpdateToSet(sal_uInt8 nPos, SfxItemSet& rSet,
} }
// do not insert empty CTL font // do not insert empty CTL font
const SvxFontItem& rCTLFont = rChg.GetCTLFont(); const SvxFontItem& rCTLFont = rChg.GetCTLFont();
if( rCTLFont.GetStyleName().Len() ) if (!rCTLFont.GetStyleName().isEmpty())
{ {
rSet.Put( rChg.GetCTLFont() ); rSet.Put( rChg.GetCTLFont() );
rSet.Put( rChg.GetCTLHeight() ); rSet.Put( rChg.GetCTLHeight() );

View File

@@ -2771,7 +2771,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( WW8ReadFieldParams& rReadParam)
{ {
const SvxFontItem &rF = ItemGet<SvxFontItem>(*(*aIter), const SvxFontItem &rF = ItemGet<SvxFontItem>(*(*aIter),
GetWhichOfScript(RES_CHRATR_FONT,nScript)); GetWhichOfScript(RES_CHRATR_FONT,nScript));
if (rF.GetFamilyName().Equals(sFontName)) if (rF.GetFamilyName().equals(sFontName))
{ {
pCharFmt=*aIter; pCharFmt=*aIter;
break; break;