Kaydet (Commit) 0d68db26 authored tarafından Noel Grandin's avatar Noel Grandin

convert sw/source/ui/inc/f*.hxx from String to OUString

Change-Id: Ia4c5d157bab7cce5aaaa78bad48f5083bc3ff8c9
üst e8d04825
......@@ -225,7 +225,7 @@ bool SwStdFontConfig::IsFontDefault(sal_uInt16 nFontType) const
return bSame;
}
String SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
OUString SwStdFontConfig::GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang)
{
sal_uInt16 nFontId;
switch( nFontType )
......
......@@ -56,12 +56,12 @@
class SW_DLLPUBLIC SwStdFontConfig : public utl::ConfigItem
{
String sDefaultFonts[DEF_FONT_COUNT];
OUString sDefaultFonts[DEF_FONT_COUNT];
sal_Int32 nDefaultFontHeight[DEF_FONT_COUNT];
SW_DLLPRIVATE com::sun::star::uno::Sequence<OUString> GetPropertyNames();
void ChangeString(sal_uInt16 nFontType, const String& rSet)
void ChangeString(sal_uInt16 nFontType, const OUString& rSet)
{
if(sDefaultFonts[nFontType] != rSet)
{
......@@ -79,25 +79,25 @@ public:
virtual void Commit();
virtual void Notify( const ::com::sun::star::uno::Sequence< OUString >& aPropertyNames );
const String& GetFontStandard(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_STANDARD + FONT_PER_GROUP * nFontGroup];}
const String& GetFontOutline(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_OUTLINE + FONT_PER_GROUP * nFontGroup];}
const String& GetFontList (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_LIST + FONT_PER_GROUP * nFontGroup];}
const String& GetFontCaption(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_CAPTION + FONT_PER_GROUP * nFontGroup];}
const String& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];}
const OUString& GetFontStandard(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_STANDARD + FONT_PER_GROUP * nFontGroup];}
const OUString& GetFontOutline(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_OUTLINE + FONT_PER_GROUP * nFontGroup];}
const OUString& GetFontList (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_LIST + FONT_PER_GROUP * nFontGroup];}
const OUString& GetFontCaption(sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_CAPTION + FONT_PER_GROUP * nFontGroup];}
const OUString& GetFontIndex (sal_uInt8 nFontGroup) const {return sDefaultFonts[FONT_INDEX + FONT_PER_GROUP * nFontGroup];}
const String& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];}
const OUString& GetFontFor(sal_uInt16 nFontType) const {return sDefaultFonts[nFontType];}
bool IsFontDefault(sal_uInt16 nFontType) const;
void SetFontStandard(const String& rSet, sal_uInt8 nFontGroup)
void SetFontStandard(const OUString& rSet, sal_uInt8 nFontGroup)
{ChangeString(FONT_STANDARD + FONT_PER_GROUP * nFontGroup, rSet);}
void SetFontOutline(const String& rSet, sal_uInt8 nFontGroup)
void SetFontOutline(const OUString& rSet, sal_uInt8 nFontGroup)
{ ChangeString(FONT_OUTLINE + FONT_PER_GROUP * nFontGroup, rSet);}
void SetFontList (const String& rSet, sal_uInt8 nFontGroup)
void SetFontList (const OUString& rSet, sal_uInt8 nFontGroup)
{ ChangeString(FONT_LIST + FONT_PER_GROUP * nFontGroup, rSet);}
void SetFontCaption(const String& rSet, sal_uInt8 nFontGroup)
void SetFontCaption(const OUString& rSet, sal_uInt8 nFontGroup)
{ ChangeString(FONT_CAPTION + FONT_PER_GROUP * nFontGroup, rSet);}
void SetFontIndex (const String& rSet, sal_uInt8 nFontGroup)
void SetFontIndex (const OUString& rSet, sal_uInt8 nFontGroup)
{ ChangeString(FONT_INDEX + FONT_PER_GROUP * nFontGroup, rSet);}
void SetFontHeight( sal_Int32 nHeight, sal_uInt8 nFont, sal_uInt8 nScriptType )
......@@ -105,7 +105,7 @@ public:
sal_Int32 GetFontHeight( sal_uInt8 nFont, sal_uInt8 nScriptType, LanguageType eLang );
static String GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang);
static OUString GetDefaultFor(sal_uInt16 nFontType, LanguageType eLang);
static sal_Int32 GetDefaultHeightFor(sal_uInt16 nFontType, LanguageType eLang);
};
#endif
......
......@@ -82,9 +82,9 @@ private:
SfxItemSet* m_pTableItemSet;
/** name of the character format (if it exist) */
String m_aCharStyle;
OUString m_aCharStyle;
/** name of the paragraph format (if it exist) */
String m_aParaStyle;
OUString m_aParaStyle;
//no frame style because it contains position information
/** specify if the Paste function have to clear the current object */
......
......@@ -79,7 +79,6 @@ public:
SwIdxFormDlg( Window* pParent, SwWrtShell &rShell, const SwForm& rForm );
~SwIdxFormDlg();
static sal_Bool IsNoNum(SwWrtShell& rSh, const String& rName);
const SwForm& GetTOXForm();
};
......
......@@ -213,8 +213,8 @@ class SwGrfExtPage: public SfxTabPage
Edit* m_pConnectED;
PushButton* m_pBrowseBT;
String aFilterName;
String aGrfName, aNewGrfName;
OUString aFilterName;
OUString aGrfName, aNewGrfName;
::sfx2::FileDialogHelper* pGrfDlg;
......
......@@ -244,8 +244,8 @@ bool SwFormatClipboard::HasContent() const
return m_pItemSet_TxtAttr!=0
|| m_pItemSet_ParAttr!=0
|| m_pTableItemSet != 0
|| m_aCharStyle.Len()
|| m_aParaStyle.Len()
|| !m_aCharStyle.isEmpty()
|| !m_aParaStyle.isEmpty()
;
}
bool SwFormatClipboard::HasContentForThisType( int nSelectionType ) const
......@@ -479,7 +479,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
if( pPool )
{
// if there is a named text format recorded and the user wants to apply it
if(m_aCharStyle.Len() && !bNoCharacterFormats )
if(!m_aCharStyle.isEmpty() && !bNoCharacterFormats )
{
// look for the named text format in the pool
SwDocStyleSheet* pStyle = static_cast<SwDocStyleSheet*>(pPool->Find(m_aCharStyle, SFX_STYLE_FAMILY_CHAR));
......@@ -498,7 +498,7 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
}
// if there is a named paragraph format recorded and the user wants to apply it
if(m_aParaStyle.Len() && !bNoParagraphFormats )
if(!m_aParaStyle.isEmpty() && !bNoParagraphFormats )
{
// look for the named pragraph format in the pool
SwDocStyleSheet* pStyle = static_cast<SwDocStyleSheet*>(pPool->Find(m_aParaStyle, SFX_STYLE_FAMILY_PARA));
......@@ -599,10 +599,10 @@ void SwFormatClipboard::Erase()
delete m_pTableItemSet;
m_pTableItemSet = 0;
if( m_aCharStyle.Len() )
m_aCharStyle.Erase();
if( m_aParaStyle.Len() )
m_aParaStyle.Erase();
if( !m_aCharStyle.isEmpty() )
m_aCharStyle = "";
if( !m_aParaStyle.isEmpty() )
m_aParaStyle = "";
m_bPersistentCopy = false;
}
......
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