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