summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-12-14 09:51:23 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-12-14 11:37:22 +0000
commit4409350a017bb0c455593fbb08270f4783e5c28e (patch)
tree52a94ff6612ab7ce026606532f08f5221dc1bcd3 /sw
parent55b379495007d3d694fb3533baa0d607c710d582 (diff)
merge NONE strings
Change-Id: I4a2babc74c39579c26ac89445769a6f52ae68221
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/globals.hrc1
-rw-r--r--sw/source/ui/app/app.src7
-rw-r--r--sw/source/ui/frmdlg/cption.cxx27
-rw-r--r--sw/source/ui/inc/cption.hxx2
4 files changed, 17 insertions, 20 deletions
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index 1b7946649292..2d87edffe2b5 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -73,7 +73,6 @@
#define STR_CAPTION_END (RC_GLOBALS_BEGIN + 43)
#define STR_CAPTION_ABOVE (RC_GLOBALS_BEGIN + 44)
#define STR_CAPTION_BELOW (RC_GLOBALS_BEGIN + 45)
-#define STR_CAPTION_NONE (RC_GLOBALS_BEGIN + 46)
// DIALOGS -----------------------------------------------------------
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index 0239ddffef52..236af107e82d 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -244,22 +244,21 @@ String STR_CAPTION_BEGINNING
{
Text [ en-US ] = "Start" ;
};
+
String STR_CAPTION_END
{
Text [ en-US ] = "End" ;
};
+
String STR_CAPTION_ABOVE
{
Text [ en-US ] = "Above" ;
};
+
String STR_CAPTION_BELOW
{
Text [ en-US ] = "Below" ;
};
-String STR_CAPTION_NONE
-{
- Text [ en-US ] = "<None>" ;
-};
InfoBox MSG_ERROR_SEND_MAIL
{
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 3585dedfba57..5751aca74b75 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -88,7 +88,7 @@ String SwCaptionDialog::our_aSepTextSave = rtl::OUString(": "); // Caption separ
SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
SvxStandardDialog( pParent, "InsertCaptionDialog", "modules/swriter/ui/insertcaption.ui" ),
- sNone( SW_RES( STR_CAPTION_NONE )),
+ m_sNone( SW_RESSTR(SW_STR_NONE) ),
rView( rV ),
pMgr( new SwFldMgr(rView.GetWrtShellPtr()) ),
bCopyAttributes( sal_False ),
@@ -134,7 +134,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
m_pOptionButton->SetClickHdl( LINK( this, SwCaptionDialog, OptionHdl ) );
m_pAutoCaptionButton->SetClickHdl(LINK(this, SwCaptionDialog, CaptionHdl));
- m_pCategoryBox->InsertEntry( sNone );
+ m_pCategoryBox->InsertEntry( m_sNone );
sal_uInt16 i, nCount = pMgr->GetFldTypeCount();
for (i = 0; i < nCount; i++)
{
@@ -256,8 +256,8 @@ void SwCaptionDialog::Apply()
{
InsCaptionOpt aOpt;
aOpt.UseCaption() = sal_True;
- String aName( m_pCategoryBox->GetText() );
- if ( aName == sNone )
+ OUString aName( m_pCategoryBox->GetText() );
+ if ( aName == m_sNone )
{
aOpt.SetCategory( aEmptyStr );
aOpt.SetNumSeparator( aEmptyStr );
@@ -280,8 +280,8 @@ void SwCaptionDialog::Apply()
IMPL_LINK_INLINE_START( SwCaptionDialog, OptionHdl, Button*, pButton )
{
- String sFldTypeName = m_pCategoryBox->GetText();
- if(sFldTypeName == sNone)
+ OUString sFldTypeName = m_pCategoryBox->GetText();
+ if(sFldTypeName == m_sNone)
sFldTypeName = aEmptyStr;
SwSequenceOptionDialog aDlg( pButton, rView, sFldTypeName );
aDlg.SetApplyBorderAndShadow(bCopyAttributes);
@@ -312,16 +312,15 @@ IMPL_LINK_NOARG_INLINE_END(SwCaptionDialog, SelectHdl)
IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl)
{
SwWrtShell &rSh = rView.GetWrtShell();
- String sFldTypeName = m_pCategoryBox->GetText();
- sal_Bool bCorrectFldName = sFldTypeName.Len() > 0;
- sal_Bool bNone = sFldTypeName == sNone;
+ OUString sFldTypeName = m_pCategoryBox->GetText();
+ bool bCorrectFldName = !sFldTypeName.isEmpty();
+ bool bNone = sFldTypeName == m_sNone;
SwFieldType* pType = (bCorrectFldName && !bNone)
? rSh.GetFldType( RES_SETEXPFLD, sFldTypeName )
: 0;
m_pOKButton->Enable( bCorrectFldName &&
(!pType ||
- ((SwSetExpFieldType*)pType)->GetType() == nsSwGetSetExpType::GSE_SEQ)
- && 0 != sFldTypeName.Len() );
+ ((SwSetExpFieldType*)pType)->GetType() == nsSwGetSetExpType::GSE_SEQ) );
m_pOptionButton->Enable( m_pOKButton->IsEnabled() && !bNone );
m_pNumberingSeparatorFT->Enable( bOrderNumberingFirst && !bNone );
m_pNumberingSeparatorED->Enable( bOrderNumberingFirst && !bNone );
@@ -348,8 +347,8 @@ void SwCaptionDialog::DrawSample()
String sCaption = m_pTextEdit->GetText();
// number
- String sFldTypeName = m_pCategoryBox->GetText();
- sal_Bool bNone = sFldTypeName == sNone;
+ OUString sFldTypeName = m_pCategoryBox->GetText();
+ bool bNone = sFldTypeName == m_sNone;
if( !bNone )
{
sal_uInt16 nNumFmt = (sal_uInt16)(sal_uIntPtr)m_pFormatBox->GetEntryData(
@@ -428,7 +427,7 @@ SwSequenceOptionDialog::SwSequenceOptionDialog( Window *pParent, SwView &rV,
SwWrtShell &rSh = rView.GetWrtShell();
- String sNone(SW_RES(STR_CAPTION_NONE));
+ OUString sNone(SW_RESSTR(SW_STR_NONE));
m_pLbLevel->InsertEntry(sNone);
for( sal_uInt16 n = 0; n < MAXLEVEL; ++n )
diff --git a/sw/source/ui/inc/cption.hxx b/sw/source/ui/inc/cption.hxx
index ca73685ab337..487cf26870d3 100644
--- a/sw/source/ui/inc/cption.hxx
+++ b/sw/source/ui/inc/cption.hxx
@@ -79,7 +79,7 @@ class SwCaptionDialog : public SvxStandardDialog
SwCaptionPreview* m_pPreview;
- String sNone;
+ OUString m_sNone;
SwView &rView; // search per active, avoid ::com::sun::star::sdbcx::View
SwFldMgr *pMgr; // pointer to save the include