diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-08-14 09:53:04 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-08-14 21:05:28 +0000 |
commit | cb34d10ec875cb538d9d8d41faa995f7469ae89f (patch) | |
tree | 63f277faab3a6b0806310e8c41b5c37e9a2d8aa1 | |
parent | a21b793383d8484a95f695d2f708600b471b8a4b (diff) |
String to OUString + prefix for data member
Change-Id: I11c106cedc3346dbe129fe7c4cecf59f559680aa
Reviewed-on: https://gerrit.libreoffice.org/5405
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/source/ui/inc/insfnote.hxx | 13 | ||||
-rw-r--r-- | sw/source/ui/misc/insfnote.cxx | 19 |
2 files changed, 15 insertions, 17 deletions
diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx index 71ee27acd303..cb65e5211a2e 100644 --- a/sw/source/ui/inc/insfnote.hxx +++ b/sw/source/ui/inc/insfnote.hxx @@ -16,8 +16,8 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef _INSFNOTE_HXX -#define _INSFNOTE_HXX +#ifndef INSFNOTE_HXX +#define INSFNOTE_HXX #include <svx/stddlg.hxx> @@ -35,7 +35,7 @@ class SwInsFootNoteDlg: public SvxStandardDialog SwWrtShell &rSh; // everything for the character(s) - String aFontName; + OUString m_aFontName; CharSet eCharSet; sal_Bool bExtCharAvailable; sal_Bool bEdit; @@ -70,14 +70,13 @@ public: CharSet GetCharSet() { return eCharSet; } sal_Bool IsExtCharAvailable() { return bExtCharAvailable; } - String GetFontName() { return aFontName; } + OUString GetFontName() { return m_aFontName; } sal_Bool IsEndNote() { return m_pEndNoteBtn->IsChecked(); } - String GetStr() + OUString GetStr() { if ( m_pNumberCharBtn->IsChecked() ) return m_pNumberCharEdit->GetText(); - else - return String(); + return OUString(); } }; diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index ad8327e06c15..8a848c31b5f2 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -46,7 +46,7 @@ static sal_Bool bFootnote = sal_True; void SwInsFootNoteDlg::Apply() { - String aStr; + OUString aStr; if ( m_pNumberCharBtn->IsChecked() ) aStr = m_pNumberCharEdit->GetText(); @@ -65,7 +65,7 @@ void SwInsFootNoteDlg::Apply() SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); - SvxFontItem aFont( rFont.GetFamily(), aFontName, + SvxFontItem aFont( rFont.GetFamily(), m_aFontName, rFont.GetStyleName(), rFont.GetPitch(), eCharSet, RES_CHRATR_FONT ); aSet.Put( aFont ); @@ -129,14 +129,13 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl) SFX_ITEMSET_ARG( pDlg->GetOutputItemSet(), pFontItem, SvxFontItem, SID_ATTR_CHAR_FONT, sal_False ); if ( pItem ) { - String sExtChars(pItem->GetValue()); - m_pNumberCharEdit->SetText( sExtChars ); + m_pNumberCharEdit->SetText( pItem->GetValue() ); if ( pFontItem ) { - aFontName = pFontItem->GetFamilyName(); + m_aFontName = pFontItem->GetFamilyName(); eCharSet = pFontItem->GetCharSet(); - Font aFont( aFontName, pFontItem->GetStyleName(), m_pNumberCharEdit->GetFont().GetSize() ); + Font aFont( m_aFontName, pFontItem->GetStyleName(), m_pNumberCharEdit->GetFont().GetSize() ); aFont.SetCharSet( pFontItem->GetCharSet() ); aFont.SetPitch( pFontItem->GetPitch() ); m_pNumberCharEdit->SetFont( aFont ); @@ -216,7 +215,7 @@ SwInsFootNoteDlg::~SwInsFootNoteDlg() void SwInsFootNoteDlg::Init() { SwFmtFtn aFtnNote; - String sNumStr; + OUString sNumStr; Font aFont; bExtCharAvailable = sal_False; @@ -234,9 +233,9 @@ void SwInsFootNoteDlg::Init() const SvxFontItem &rFont = (SvxFontItem &) aSet.Get( RES_CHRATR_FONT ); aFont = m_pNumberCharEdit->GetFont(); - aFontName = rFont.GetFamilyName(); + m_aFontName = rFont.GetFamilyName(); eCharSet = rFont.GetCharSet(); - aFont.SetName(aFontName); + aFont.SetName(m_aFontName); aFont.SetCharSet(eCharSet); bExtCharAvailable = sal_True; rSh.Left( CRSR_SKIP_CHARS, sal_False, 1, sal_False ); @@ -245,7 +244,7 @@ void SwInsFootNoteDlg::Init() } m_pNumberCharEdit->SetFont(aFont); - bool bNumChar = sNumStr.Len() != 0; + const bool bNumChar = !sNumStr.isEmpty(); m_pNumberCharEdit->SetText(sNumStr); m_pNumberCharBtn->Check(bNumChar); |