summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChr. Rossmanith <ChrRossmanith@gmx.de>2013-01-21 14:32:09 +0100
committerMichael Stahl <mstahl@redhat.com>2013-01-21 20:48:35 +0000
commite3f11c10d8cc759d01afa4b8fd8bd98c81a03119 (patch)
tree36191c6d90da559009161a1199d1176cf6a2bbba
parent87f9d7da00857c649784a7d9eca046bf6e71ae3c (diff)
Changed SetText() / GetText() to take/return OUString
replaced lots of Len() with isEmpty() Change-Id: I6b82d48245ee2a0782e05a326f7934e9357227d0 Reviewed-on: https://gerrit.libreoffice.org/1795 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--avmedia/source/framework/mediacontrol.cxx8
-rw-r--r--basctl/source/basicide/brkdlg.cxx2
-rw-r--r--basctl/source/basicide/macrodlg.cxx4
-rw-r--r--basctl/source/basicide/moduldl2.cxx2
-rw-r--r--basic/source/runtime/inputbox.cxx12
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx5
-rw-r--r--chart2/source/controller/dialogs/res_Titles.cxx14
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx4
-rw-r--r--cui/source/customize/cfg.cxx2
-rw-r--r--cui/source/dialogs/SpellDialog.cxx16
-rw-r--r--cui/source/dialogs/commonlingui.cxx4
-rw-r--r--cui/source/dialogs/commonlingui.hxx4
-rw-r--r--cui/source/dialogs/cuicharmap.cxx2
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx6
-rw-r--r--cui/source/dialogs/hangulhanjadlg.cxx4
-rw-r--r--cui/source/dialogs/hlinettp.cxx4
-rw-r--r--cui/source/dialogs/hlmailtp.cxx2
-rw-r--r--cui/source/dialogs/insdlg.cxx6
-rw-r--r--cui/source/dialogs/passwdomdlg.cxx14
-rw-r--r--cui/source/dialogs/thesdlg.cxx8
-rw-r--r--cui/source/factory/dlgfact.cxx24
-rw-r--r--cui/source/factory/dlgfact.hxx24
-rw-r--r--cui/source/inc/SpellDialog.hxx2
-rw-r--r--cui/source/inc/cuicharmap.hxx2
-rw-r--r--cui/source/inc/thesdlg.hxx10
-rw-r--r--cui/source/options/doclinkdialog.cxx6
-rw-r--r--cui/source/options/fontsubs.cxx2
-rw-r--r--cui/source/options/optdict.cxx6
-rw-r--r--cui/source/options/optgdlg.cxx4
-rw-r--r--cui/source/options/optgenrl.cxx2
-rw-r--r--cui/source/options/opthtml.cxx14
-rw-r--r--cui/source/options/optinet2.cxx22
-rw-r--r--cui/source/options/optmemory.cxx2
-rw-r--r--cui/source/options/optsave.cxx2
-rw-r--r--cui/source/tabpages/autocdlg.cxx8
-rw-r--r--cui/source/tabpages/backgrnd.cxx2
-rw-r--r--cui/source/tabpages/border.cxx12
-rw-r--r--cui/source/tabpages/chardlg.cxx6
-rw-r--r--cui/source/tabpages/connect.cxx14
-rw-r--r--cui/source/tabpages/grfpage.cxx8
-rw-r--r--cui/source/tabpages/measure.cxx12
-rw-r--r--cui/source/tabpages/numfmt.cxx6
-rw-r--r--cui/source/tabpages/page.cxx26
-rw-r--r--cui/source/tabpages/paragrph.cxx6
-rw-r--r--cui/source/tabpages/tabstpge.cxx2
-rw-r--r--cui/source/tabpages/textattr.cxx8
-rw-r--r--cui/source/tabpages/tparea.cxx6
-rw-r--r--cui/source/tabpages/tpcolor.cxx2
-rw-r--r--cui/source/tabpages/tphatch.cxx4
-rw-r--r--cui/source/tabpages/tpline.cxx10
-rw-r--r--cui/source/tabpages/tplnedef.cxx10
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.cxx4
-rw-r--r--dbaccess/source/ui/control/curledit.cxx8
-rw-r--r--dbaccess/source/ui/control/sqledit.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx8
-rw-r--r--dbaccess/source/ui/dlg/ConnectionPage.cxx10
-rw-r--r--dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx22
-rw-r--r--dbaccess/source/ui/dlg/TextConnectionHelper.cxx16
-rw-r--r--dbaccess/source/ui/dlg/UserAdmin.cxx2
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.cxx10
-rw-r--r--dbaccess/source/ui/dlg/adminpages.cxx2
-rw-r--r--dbaccess/source/ui/dlg/detailpages.cxx8
-rw-r--r--dbaccess/source/ui/dlg/directsql.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx6
-rw-r--r--dbaccess/source/ui/inc/FieldControls.hxx6
-rw-r--r--dbaccess/source/ui/inc/curledit.hxx6
-rw-r--r--dbaccess/source/ui/inc/sqledit.hxx2
-rw-r--r--dbaccess/source/ui/misc/WCPage.cxx2
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx2
-rw-r--r--editeng/inc/editeng/editeng.hxx4
-rw-r--r--editeng/source/editeng/editeng.cxx6
-rw-r--r--editeng/source/editeng/editundo.hxx2
-rw-r--r--extensions/source/abpilot/abpfinalpage.cxx4
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx2
-rw-r--r--extensions/source/propctrlr/inspectorhelpwindow.cxx2
-rw-r--r--extensions/source/propctrlr/inspectorhelpwindow.hxx2
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx12
-rw-r--r--extensions/source/propctrlr/usercontrol.cxx6
-rw-r--r--filter/source/pdf/impdialog.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagebasic.cxx8
-rw-r--r--forms/source/solar/control/navtoolbar.cxx4
-rw-r--r--formula/source/ui/dlg/formula.cxx2
-rw-r--r--fpicker/source/office/iodlg.cxx4
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx2
-rw-r--r--framework/source/services/license.cxx2
-rw-r--r--framework/source/uielement/comboboxtoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/edittoolbarcontroller.cxx2
-rw-r--r--framework/source/uielement/spinfieldtoolbarcontroller.cxx2
-rw-r--r--padmin/source/adddlg.cxx4
-rw-r--r--padmin/source/cmddlg.cxx4
-rw-r--r--padmin/source/newppdlg.cxx2
-rw-r--r--padmin/source/titlectrl.cxx2
-rw-r--r--padmin/source/titlectrl.hxx4
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx2
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx2
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx2
-rw-r--r--sc/inc/editutil.hxx2
-rw-r--r--sc/source/core/tool/editutil.cxx2
-rw-r--r--sc/source/ui/app/inputwin.cxx10
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.cxx4
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx4
-rw-r--r--sc/source/ui/condformat/colorformat.cxx4
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/dbnamdlg.cxx12
-rw-r--r--sc/source/ui/dbgui/fieldwnd.cxx5
-rw-r--r--sc/source/ui/dbgui/scuiasciiopt.cxx2
-rw-r--r--sc/source/ui/inc/inputwin.hxx6
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx2
-rw-r--r--sc/source/ui/miscdlgs/simpref.cxx2
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx12
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx2
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx4
-rw-r--r--sc/source/ui/optdlg/tpusrlst.cxx2
-rw-r--r--sc/source/ui/optdlg/tpview.cxx2
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx2
-rw-r--r--sc/source/ui/pagedlg/tptable.cxx10
-rw-r--r--sd/inc/sdabstdlg.hxx2
-rw-r--r--sd/source/filter/html/pubdlg.cxx2
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx2
-rw-r--r--sd/source/ui/dlg/paragr.cxx2
-rw-r--r--sd/source/ui/dlg/sddlgfact.cxx18
-rw-r--r--sd/source/ui/dlg/sddlgfact.hxx18
-rw-r--r--sd/source/ui/dlg/tpoption.cxx2
-rw-r--r--sd/source/ui/func/fuinsfil.cxx4
-rw-r--r--sfx2/inc/sfx2/controlwrapper.hxx2
-rw-r--r--sfx2/inc/sfx2/progress.hxx3
-rw-r--r--sfx2/inc/sfx2/sfxdlg.hxx4
-rw-r--r--sfx2/inc/sfx2/titledockwin.hxx4
-rw-r--r--sfx2/source/appl/impldde.cxx6
-rw-r--r--sfx2/source/appl/lnkbase2.cxx4
-rw-r--r--sfx2/source/appl/newhelp.cxx2
-rw-r--r--sfx2/source/bastyp/progress.cxx5
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx8
-rw-r--r--sfx2/source/dialog/passwd.cxx6
-rw-r--r--sfx2/source/dialog/srchdlg.cxx2
-rw-r--r--sfx2/source/dialog/titledockwin.cxx6
-rw-r--r--sfx2/source/dialog/versdlg.cxx4
-rw-r--r--starmath/inc/document.hxx4
-rw-r--r--starmath/inc/edit.hxx4
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx6
-rw-r--r--starmath/source/dialog.cxx2
-rw-r--r--starmath/source/document.cxx8
-rw-r--r--starmath/source/edit.cxx6
-rw-r--r--starmath/source/view.cxx4
-rw-r--r--svtools/inc/svtools/ctrlbox.hxx4
-rw-r--r--svtools/inc/svtools/editbrowsebox.hxx6
-rw-r--r--svtools/inc/svtools/editimplementation.hxx2
-rw-r--r--svtools/inc/svtools/editsyntaxhighlighter.hxx4
-rw-r--r--svtools/inc/svtools/filectrl.hxx4
-rw-r--r--svtools/inc/svtools/fmtfield.hxx6
-rw-r--r--svtools/inc/svtools/ivctrl.hxx12
-rw-r--r--svtools/inc/svtools/svxbox.hxx2
-rw-r--r--svtools/inc/svtools/treelistbox.hxx2
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx6
-rw-r--r--svtools/source/contnr/DocumentInfoPreview.cxx2
-rw-r--r--svtools/source/contnr/treelistbox.cxx2
-rw-r--r--svtools/source/control/filectrl.cxx4
-rw-r--r--svtools/source/control/fmtfield.cxx24
-rw-r--r--svtools/source/control/inettbc.cxx10
-rw-r--r--svtools/source/control/tabbar.cxx2
-rw-r--r--svtools/source/dialogs/addresstemplate.cxx2
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx7
-rw-r--r--svtools/source/edit/editsyntaxhighlighter.cxx2
-rw-r--r--svtools/source/uno/unoiface.cxx2
-rw-r--r--svx/inc/svx/paraprev.hxx4
-rw-r--r--svx/inc/svx/srchdlg.hxx4
-rw-r--r--svx/inc/svx/svxdlg.hxx8
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx2
-rw-r--r--svx/source/dialog/ctredlin.cxx8
-rw-r--r--svx/source/dialog/imapdlg.cxx4
-rw-r--r--svx/source/dialog/rubydialog.cxx4
-rw-r--r--svx/source/dialog/srchdlg.cxx34
-rw-r--r--svx/source/fmcomp/gridcell.cxx2
-rw-r--r--svx/source/fmcomp/gridctrl.cxx2
-rw-r--r--svx/source/form/tbxform.cxx4
-rw-r--r--svx/source/gallery2/galbrws2.cxx4
-rw-r--r--svx/source/tbxctrls/grafctrl.cxx8
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx2
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx2
-rw-r--r--svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx2
-rw-r--r--sw/inc/swabstdlg.hxx4
-rw-r--r--sw/source/ui/cctrl/actctrl.cxx4
-rw-r--r--sw/source/ui/cctrl/swlbox.cxx4
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx4
-rw-r--r--sw/source/ui/chrdlg/drpcps.cxx10
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx4
-rw-r--r--sw/source/ui/config/mailconfigpage.cxx8
-rw-r--r--sw/source/ui/config/optload.cxx10
-rw-r--r--sw/source/ui/config/optpage.cxx10
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx4
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.cxx8
-rw-r--r--sw/source/ui/dbui/mmaddressblockpage.hxx2
-rw-r--r--sw/source/ui/dbui/mmgreetingspage.cxx8
-rw-r--r--sw/source/ui/dbui/mmoutputpage.cxx12
-rw-r--r--sw/source/ui/dialog/swdlgfact.cxx20
-rw-r--r--sw/source/ui/dialog/swdlgfact.hxx20
-rw-r--r--sw/source/ui/docvw/SidebarWin.cxx16
-rw-r--r--sw/source/ui/envelp/envlop1.cxx2
-rw-r--r--sw/source/ui/envelp/labfmt.cxx2
-rw-r--r--sw/source/ui/fldui/flddb.cxx6
-rw-r--r--sw/source/ui/fldui/flddok.cxx12
-rw-r--r--sw/source/ui/fldui/fldfunc.cxx18
-rw-r--r--sw/source/ui/fldui/fldref.cxx4
-rw-r--r--sw/source/ui/fldui/fldvar.cxx16
-rw-r--r--sw/source/ui/frmdlg/cption.cxx4
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx14
-rw-r--r--sw/source/ui/inc/dbinsdlg.hxx2
-rw-r--r--sw/source/ui/inc/swlbox.hxx2
-rw-r--r--sw/source/ui/index/cnttab.cxx16
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx30
-rw-r--r--sw/source/ui/misc/bookmark.cxx7
-rw-r--r--sw/source/ui/misc/glossary.cxx8
-rw-r--r--sw/source/ui/misc/insfnote.cxx6
-rw-r--r--sw/source/ui/misc/linenum.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx2
-rw-r--r--sw/source/ui/ribbar/inputwin.cxx4
-rw-r--r--sw/source/ui/table/convert.cxx4
-rw-r--r--sw/source/ui/table/tabledlg.cxx6
-rw-r--r--toolkit/source/awt/vclxwindows.cxx2
-rw-r--r--uui/source/logindlg.cxx2
-rw-r--r--uui/source/masterpasscrtdlg.cxx2
-rw-r--r--uui/source/passworddlg.cxx2
-rw-r--r--vcl/inc/helpwin.hxx2
-rw-r--r--vcl/inc/vcl/combobox.hxx4
-rw-r--r--vcl/inc/vcl/ctrl.hxx4
-rw-r--r--vcl/inc/vcl/edit.hxx6
-rw-r--r--vcl/inc/vcl/fixedhyper.hxx2
-rw-r--r--vcl/inc/vcl/longcurr.hxx2
-rw-r--r--vcl/inc/vcl/menu.hxx6
-rw-r--r--vcl/inc/vcl/morebtn.hxx6
-rw-r--r--vcl/inc/vcl/status.hxx2
-rw-r--r--vcl/inc/vcl/texteng.hxx2
-rw-r--r--vcl/inc/vcl/toolbox.hxx2
-rw-r--r--vcl/inc/vcl/vclmedit.hxx8
-rw-r--r--vcl/inc/vcl/window.hxx6
-rw-r--r--vcl/source/app/help.cxx2
-rw-r--r--vcl/source/control/button.cxx10
-rw-r--r--vcl/source/control/combobox.cxx6
-rw-r--r--vcl/source/control/ctrl.cxx6
-rw-r--r--vcl/source/control/edit.cxx8
-rw-r--r--vcl/source/control/field.cxx20
-rw-r--r--vcl/source/control/field2.cxx28
-rw-r--r--vcl/source/control/fixedhyper.cxx2
-rw-r--r--vcl/source/control/longcurr.cxx2
-rw-r--r--vcl/source/control/morebtn.cxx4
-rw-r--r--vcl/source/edit/texteng.cxx8
-rw-r--r--vcl/source/edit/vclmedit.cxx14
-rw-r--r--vcl/source/window/floatwin.cxx2
-rw-r--r--vcl/source/window/msgbox.cxx8
-rw-r--r--vcl/source/window/status.cxx2
-rw-r--r--vcl/source/window/toolbox2.cxx4
-rw-r--r--vcl/source/window/window.cxx8
-rw-r--r--vcl/unx/generic/app/i18n_status.cxx4
257 files changed, 774 insertions, 778 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index ca2c9da2adc3..38d947a7279b 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -409,14 +409,14 @@ void MediaControl::implUpdateTimeField( double fCurTime )
{
if( !maItem.getURL().isEmpty() )
{
- String aTimeString;
+ OUString aTimeString;
SvtSysLocale aSysLocale;
const LocaleDataWrapper& rLocaleData = aSysLocale.GetLocaleData();
- aTimeString += rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( fCurTime ) ) ) );
- aTimeString.AppendAscii( " / " );
- aTimeString += rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( maItem.getDuration() ) )) );
+ aTimeString += rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( fCurTime ) ) ) ) +
+ " / " +
+ rLocaleData.getDuration( Time( 0, 0, static_cast< sal_uInt32 >( floor( maItem.getDuration() ) )) );
if( maTimeEdit.GetText() != aTimeString )
maTimeEdit.SetText( aTimeString );
diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx
index 9be73f16ef33..6f424ce8c9b3 100644
--- a/basctl/source/basicide/brkdlg.cxx
+++ b/basctl/source/basicide/brkdlg.cxx
@@ -174,7 +174,7 @@ IMPL_LINK( BreakPointDialog, EditModifyHdl, Edit *, pEdit )
{
BreakPoint* pBrk = GetSelectedBreakPoint();
if ( pBrk )
- pBrk->nStopAfter = pEdit->GetText().ToInt32();
+ pBrk->nStopAfter = pEdit->GetText().toInt32();
}
return 0;
}
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index c4d16253a4d1..cb843d621c50 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -632,7 +632,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
- m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().Len() ) );
+ m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) );
m_pMacroNameEdit->GrabFocus();
return 0;
}
@@ -700,7 +700,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
if ( !IsValidSbxName(m_pMacroNameEdit->GetText()) )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
- m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().Len() ) );
+ m_pMacroNameEdit->SetSelection( Selection( 0, m_pMacroNameEdit->GetText().getLength() ) );
m_pMacroNameEdit->GrabFocus();
return 1;
}
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index d846bf32a09e..68b459ea14b5 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -459,7 +459,7 @@ IMPL_LINK_NOARG(GotoLineDialog, OkButtonHandler)
if ( GetLineNumber() )
EndDialog(1);
else
- aEdit.SetText( aEdit.GetText(), Selection(0, aEdit.GetText().Len() ));
+ aEdit.SetText( aEdit.GetText(), Selection(0, aEdit.GetText().getLength() ));
return 0;
}
diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx
index 8a03001ef4f6..14fe7f103154 100644
--- a/basic/source/runtime/inputbox.cxx
+++ b/basic/source/runtime/inputbox.cxx
@@ -33,7 +33,7 @@ class SvRTLInputBox : public ModalDialog
OKButton aOk;
CancelButton aCancel;
FixedText aPromptText;
- String aText;
+ OUString aText;
void PositionDialog( long nXTwips, long nYTwips, const Size& rDlgSize );
void InitButtons( const Size& rDlgSize );
@@ -45,7 +45,7 @@ class SvRTLInputBox : public ModalDialog
public:
SvRTLInputBox( Window* pParent, const String& rPrompt, const String& rTitle,
const String& rDefault, long nXTwips = -1, long nYTwips = -1 );
- String GetText() const { return aText; }
+ OUString GetText() const { return aText; }
};
SvRTLInputBox::SvRTLInputBox( Window* pParent, const String& rPrompt,
@@ -65,12 +65,12 @@ SvRTLInputBox::SvRTLInputBox( Window* pParent, const String& rPrompt,
aCancel.Show();
aEdit.Show();
aPromptText.Show();
- SetText( rTitle );
+ SetText( OUString(rTitle) );
Font aFont( GetFont());
Color aColor( GetBackground().GetColor() );
aFont.SetFillColor( aColor );
aEdit.SetFont( aFont );
- aEdit.SetText( rDefault );
+ aEdit.SetText( OUString(rDefault) );
aEdit.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
}
@@ -109,7 +109,7 @@ void SvRTLInputBox::PositionPrompt(const String& rPrompt,const Size& rDlgSize)
return;
String aText_(convertLineEnd(rPrompt, LINEEND_CR));
aPromptText.SetPosPixel( LogicToPixel(Point(5,5)));
- aPromptText.SetText( aText_ );
+ aPromptText.SetText( OUString(aText_) );
Size aSize( rDlgSize );
aSize.Width() -= 70;
aSize.Height() -= 50;
@@ -131,7 +131,7 @@ IMPL_LINK_INLINE_START( SvRTLInputBox, CancelHdl, Button *, pButton )
{
(void)pButton;
- aText.Erase();
+ aText="";
EndDialog( 0 );
return 0;
}
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index 377c7dd282af..3b1fb4fe52e1 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -393,9 +393,8 @@ IMPL_LINK( ErrorBarResources, CategoryChosen, void *, )
eOldError != CHERROR_RANGE )
{
m_aCbSyncPosNeg.Check(
- (m_aEdRangePositive.GetText().Len() > 0) &&
- m_aEdRangePositive.GetText().Equals(
- m_aEdRangeNegative.GetText()));
+ (!m_aEdRangePositive.GetText().isEmpty()) &&
+ m_aEdRangePositive.GetText() == m_aEdRangeNegative.GetText());
}
// changed from range
else if( m_eErrorKind != CHERROR_RANGE &&
diff --git a/chart2/source/controller/dialogs/res_Titles.cxx b/chart2/source/controller/dialogs/res_Titles.cxx
index e2845b7566ab..ee1b2391e87a 100644
--- a/chart2/source/controller/dialogs/res_Titles.cxx
+++ b/chart2/source/controller/dialogs/res_Titles.cxx
@@ -188,13 +188,13 @@ void TitleResources::writeToResources( const TitleDialogData& rInput )
void TitleResources::readFromResources( TitleDialogData& rOutput )
{
- rOutput.aExistenceList[0] = static_cast<sal_Bool>(m_aEd_Main.GetText().Len()!=0);
- rOutput.aExistenceList[1] = static_cast<sal_Bool>(m_aEd_Sub.GetText().Len()!=0);
- rOutput.aExistenceList[2] = static_cast<sal_Bool>(m_aEd_XAxis.GetText().Len()!=0);
- rOutput.aExistenceList[3] = static_cast<sal_Bool>(m_aEd_YAxis.GetText().Len()!=0);
- rOutput.aExistenceList[4] = static_cast<sal_Bool>(m_aEd_ZAxis.GetText().Len()!=0);
- rOutput.aExistenceList[5] = static_cast<sal_Bool>(m_aEd_SecondaryXAxis.GetText().Len()!=0);
- rOutput.aExistenceList[6] = static_cast<sal_Bool>(m_aEd_SecondaryYAxis.GetText().Len()!=0);
+ rOutput.aExistenceList[0] = static_cast<sal_Bool>(!m_aEd_Main.GetText().isEmpty());
+ rOutput.aExistenceList[1] = static_cast<sal_Bool>(!m_aEd_Sub.GetText().isEmpty());
+ rOutput.aExistenceList[2] = static_cast<sal_Bool>(!m_aEd_XAxis.GetText().isEmpty());
+ rOutput.aExistenceList[3] = static_cast<sal_Bool>(!m_aEd_YAxis.GetText().isEmpty());
+ rOutput.aExistenceList[4] = static_cast<sal_Bool>(!m_aEd_ZAxis.GetText().isEmpty());
+ rOutput.aExistenceList[5] = static_cast<sal_Bool>(!m_aEd_SecondaryXAxis.GetText().isEmpty());
+ rOutput.aExistenceList[6] = static_cast<sal_Bool>(!m_aEd_SecondaryYAxis.GetText().isEmpty());
rOutput.aTextList[0] = m_aEd_Main.GetText();
rOutput.aTextList[1] = m_aEd_Sub.GetText();
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 9f4dd121a0f8..11a98c6efe2f 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -454,7 +454,7 @@ IMPL_LINK_NOARG(AxisPositionsTabPage, CrossesAtSelectHdl)
m_aED_CrossesAt.Show( (2==nPos) && !m_bCrossingAxisIsCategoryAxis );
m_aED_CrossesAtCategory.Show( (2==nPos) && m_bCrossingAxisIsCategoryAxis );
- if(! m_aED_CrossesAt.GetText().Len() )
+ if( m_aED_CrossesAt.GetText().isEmpty() )
m_aED_CrossesAt.SetValue(0.0);
if( 0 == m_aED_CrossesAtCategory.GetSelectEntryCount() )
m_aED_CrossesAtCategory.SelectEntryPos(0);
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index bb5ef2ae63a2..257a2773d809 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -629,7 +629,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl)
{
OSL_ASSERT( m_pCurrentRangeChoosingField == 0 );
m_pCurrentRangeChoosingField = & m_aEDT_RANGE;
- if( m_aEDT_RANGE.GetText().Len() > 0 &&
+ if( !m_aEDT_RANGE.GetText().isEmpty() &&
! updateModelFromControl( m_pCurrentRangeChoosingField ))
return 0;
@@ -673,7 +673,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, CategoriesRangeButtonClickedHdl)
{
OSL_ASSERT( m_pCurrentRangeChoosingField == 0 );
m_pCurrentRangeChoosingField = & m_aEDT_CATEGORIES;
- if( m_aEDT_CATEGORIES.GetText().Len() > 0 &&
+ if( !m_aEDT_CATEGORIES.GetText().isEmpty() &&
! updateModelFromControl( m_pCurrentRangeChoosingField ))
return 0;
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 3b4e49f6f572..5ecfba5cbc63 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2876,7 +2876,7 @@ IMPL_LINK(SvxMainMenuOrganizerDialog, ModifyHdl, Edit*, pEdit)
(void)pEdit;
// if the Edit control is empty do not change the name
- if ( aMenuNameEdit.GetText().Equals( String() ) )
+ if ( aMenuNameEdit.GetText() == "" )
{
return 0;
}
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index c3e3f4fdeeea..135e9c0c84ba 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -364,7 +364,7 @@ void SpellDialog::UpdateBoxes_Impl()
m_pCheckGrammarCB->Show(rParent.HasGrammarChecking());
m_pExplainLink->Show(!m_pExplainLink->GetURL().isEmpty());
- if (m_pExplainFT->GetText().Len() == 0)
+ if (m_pExplainFT->GetText().isEmpty())
{
m_pExplainFT->Hide();
m_pExplainLink->Hide();
@@ -706,7 +706,7 @@ void SpellDialog::Impl_Restore()
//clear the "ChangeAllList"
SvxGetChangeAllList()->clear();
//get a new sentence
- m_pSentenceED->SetText(rtl::OUString());
+ m_pSentenceED->SetText(OUString());
m_pSentenceED->ResetModified();
//Resolves: fdo#39348 refill the dialog with the currently spelled sentence
SpellContinue_Impl(true);
@@ -959,7 +959,7 @@ IMPL_LINK(SpellDialog, ModifyHdl, SentenceEditWindow_Impl*, pEd)
bModified = true;
m_pSuggestionLB->SetNoSelection();
m_pSuggestionLB->Disable();
- String sNewText( m_pSentenceED->GetText() );
+ OUString sNewText( m_pSentenceED->GetText() );
m_pAutoCorrPB->Enable( sNewText != m_pSentenceED->GetText() );
SpellUndoAction_Impl* pSpellAction = new SpellUndoAction_Impl(SPELLUNDO_CHANGE_TEXTENGINE, aDialogUndoLink);
if(!m_pChangeAllPB->IsEnabled())
@@ -1447,7 +1447,7 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
break;
}
//save the current paragraph
- sal_uInt16 nCurrentLen = GetText().Len();
+ sal_Int32 nCurrentLen = GetText().getLength();
if(nAction != ACTION_SELECTFIELD)
pTextView->GetWindow()->KeyInput(rKeyEvt);
else
@@ -1485,11 +1485,11 @@ long SentenceEditWindow_Impl::PreNotify( NotifyEvent& rNEvt )
else if(pErrorAttr)
{
//determine the change
- sal_uInt16 nAddedChars = GetText().Len() - nCurrentLen;
+ sal_Int32 nAddedChars = GetText().getLength() - nCurrentLen;
TextAttrib* pNewError = pErrorAttr->GetAttr().Clone();
- sal_uInt16 nStart = pErrorAttr->GetStart();
- sal_uInt16 nEnd = pErrorAttr->GetEnd();
+ sal_Int32 nStart = pErrorAttr->GetStart();
+ sal_Int32 nEnd = pErrorAttr->GetEnd();
pTextEngine->RemoveAttrib( 0, *pErrorAttr );
nStart = nStart - (sal_uInt16)nAddedChars;
SetAttrib( *pNewError, 0, nStart - nAddedChars, nEnd );
@@ -1772,7 +1772,7 @@ void SentenceEditWindow_Impl::SetAttrib( const TextAttrib& rAttr, sal_uLong nPar
}
//-----------------------------------------------------------------------
-void SentenceEditWindow_Impl::SetText( const String& rStr )
+void SentenceEditWindow_Impl::SetText( const OUString& rStr )
{
m_nErrorStart = m_nErrorEnd = 0;
GetTextEngine()->SetText(rStr);
diff --git a/cui/source/dialogs/commonlingui.cxx b/cui/source/dialogs/commonlingui.cxx
index e6b3d0000563..d94a074b655f 100644
--- a/cui/source/dialogs/commonlingui.cxx
+++ b/cui/source/dialogs/commonlingui.cxx
@@ -57,13 +57,13 @@ long SvxClickInfoCtr::PreNotify( NotifyEvent& rNEvt )
}
//-----------------------------------------------------------------------------
-void SvxClickInfoCtr::SetText( const XubString& rStr )
+void SvxClickInfoCtr::SetText( const OUString& rStr )
{
aFixedInfo.SetText(rStr );
}
//-----------------------------------------------------------------------------
-XubString SvxClickInfoCtr::GetText() const
+OUString SvxClickInfoCtr::GetText() const
{
return aFixedInfo.GetText();
}
diff --git a/cui/source/dialogs/commonlingui.hxx b/cui/source/dialogs/commonlingui.hxx
index 47e309a16cf7..90c3f4ec8644 100644
--- a/cui/source/dialogs/commonlingui.hxx
+++ b/cui/source/dialogs/commonlingui.hxx
@@ -41,8 +41,8 @@ public:
SvxClickInfoCtr( Window* pParent, const ResId& rResId );
~SvxClickInfoCtr();
- virtual void SetText( const XubString& rStr );
- virtual XubString GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
void SetActivateHdl( const Link& rLink ) { aActivateLink = rLink; }
const Link& GetActivateHdl() const { return aActivateLink; }
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 2bf01396e655..0b06b97292e9 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -264,7 +264,7 @@ void SvxShowText::Resize()
// -----------------------------------------------------------------------
-void SvxShowText::SetText( const String& rText )
+void SvxShowText::SetText( const OUString& rText )
{
Control::SetText( rText );
Invalidate();
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 665643c91376..9d0fc46d0ab0 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -427,7 +427,7 @@ IMPL_LINK(FmSearchDialog, OnClickedSpecialSettings, Button*, pButton )
//------------------------------------------------------------------------
IMPL_LINK_NOARG(FmSearchDialog, OnSearchTextModified)
{
- if ((m_cmbSearchText.GetText().Len() != 0) || !m_rbSearchForText.IsChecked())
+ if ((!m_cmbSearchText.GetText().isEmpty()) || !m_rbSearchForText.IsChecked())
m_pbSearchAgain.Enable();
else
m_pbSearchAgain.Disable();
@@ -668,7 +668,7 @@ void FmSearchDialog::EnableSearchUI(sal_Bool bEnable)
if ( WINDOW_EDIT == m_pPreSearchFocus->GetType() )
{
Edit* pEdit = static_cast< Edit* >( m_pPreSearchFocus );
- pEdit->SetSelection( Selection( 0, pEdit->GetText().Len() ) );
+ pEdit->SetSelection( Selection( 0, pEdit->GetText().getLength() ) );
}
}
m_pPreSearchFocus = NULL;
@@ -680,7 +680,7 @@ void FmSearchDialog::EnableSearchUI(sal_Bool bEnable)
void FmSearchDialog::EnableSearchForDependees(sal_Bool bEnable)
{
sal_Bool bSearchingForText = m_rbSearchForText.IsChecked();
- m_pbSearchAgain.Enable(bEnable && (!bSearchingForText || (m_cmbSearchText.GetText().Len() != 0)));
+ m_pbSearchAgain.Enable(bEnable && (!bSearchingForText || (!m_cmbSearchText.GetText().isEmpty())));
bEnable = bEnable && bSearchingForText;
diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx
index 6e8337723efa..024e140504b3 100644
--- a/cui/source/dialogs/hangulhanjadlg.cxx
+++ b/cui/source/dialogs/hangulhanjadlg.cxx
@@ -701,9 +701,9 @@ namespace svx
//-------------------------------------------------------------------------
IMPL_LINK_NOARG(HangulHanjaConversionDialog, OnSuggestionModified)
{
- m_aFind.Enable( m_pPlayground->GetWordInputControl().GetSavedValue() != m_pPlayground->GetWordInputControl().GetText() );
+ m_aFind.Enable( OUString(m_pPlayground->GetWordInputControl().GetSavedValue()) != m_pPlayground->GetWordInputControl().GetText() );
- bool bSameLen = m_pPlayground->GetWordInputControl().GetText().Len() == m_pPlayground->GetCurrentText().Len();
+ bool bSameLen = m_pPlayground->GetWordInputControl().GetText().getLength() == m_pPlayground->GetCurrentText().Len();
m_pPlayground->EnableButton( SvxCommonLinguisticControl::eChange, m_bDocumentMode && bSameLen );
m_pPlayground->EnableButton( SvxCommonLinguisticControl::eChangeAll, m_bDocumentMode && bSameLen );
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index 1e538a7eea68..319e68dc36dd 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -193,7 +193,7 @@ String SvxHyperlinkInternetTp::CreateAbsoluteURL() const
}
// username and password for ftp-url
- if( aURL.GetProtocol() == INET_PROT_FTP && maEdLogin.GetText().Len()!=0 )
+ if( aURL.GetProtocol() == INET_PROT_FTP && !maEdLogin.GetText().isEmpty() )
aURL.SetUserAndPass ( maEdLogin.GetText(), maEdPassword.GetText() );
if ( aURL.GetProtocol() != INET_PROT_NOT_VALID )
@@ -374,7 +374,7 @@ IMPL_LINK_NOARG(SvxHyperlinkInternetTp, ClickAnonymousHdl_Impl)
// disable login-editfields if checked
if ( maCbAnonymous.IsChecked() )
{
- if ( maEdLogin.GetText().ToLowerAscii().SearchAscii ( sAnonymous ) == 0 )
+ if ( maEdLogin.GetText().toAsciiLowerCase().indexOf ( sAnonymous ) == 0 )
{
maStrOldUser = aEmptyStr;
maStrOldPassword = aEmptyStr;
diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx
index 3134196fa3db..1899ed9c895b 100644
--- a/cui/source/dialogs/hlmailtp.cxx
+++ b/cui/source/dialogs/hlmailtp.cxx
@@ -159,7 +159,7 @@ String SvxHyperlinkMailTp::CreateAbsoluteURL() const
// subject for EMail-url
if( aURL.GetProtocol() == INET_PROT_MAILTO )
{
- if ( maEdSubject.GetText() != aEmptyStr )
+ if ( maEdSubject.GetText() != OUString(aEmptyStr) )
{
String aQuery = rtl::OUString("subject=");
aQuery.Append( maEdSubject.GetText() );
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 4d9c80863282..54495d50e50a 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -643,7 +643,7 @@ short SfxInsertFloatingFrameDialog::Execute()
if ( bOK && ( nRet = Dialog::Execute() ) == RET_OK )
{
::rtl::OUString aURL;
- if ( m_pEDURL->GetText().Len() )
+ if ( !m_pEDURL->GetText().isEmpty() )
{
// URL can be a valid and absolute URL or a system file name
INetURLObject aObj;
@@ -684,13 +684,13 @@ short SfxInsertFloatingFrameDialog::Execute()
long lMarginWidth;
if ( !m_pCBMarginWidthDefault->IsChecked() )
- lMarginWidth = (long) m_pNMMarginWidth->GetText().ToInt32();
+ lMarginWidth = (long) m_pNMMarginWidth->GetText().toInt32();
else
lMarginWidth = SIZE_NOT_SET;
long lMarginHeight;
if ( !m_pCBMarginHeightDefault->IsChecked() )
- lMarginHeight = (long) m_pNMMarginHeight->GetText().ToInt32();
+ lMarginHeight = (long) m_pNMMarginHeight->GetText().toInt32();
else
lMarginHeight = SIZE_NOT_SET;
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index 11c05b4a5b16..9c7ce0cfb4ff 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -64,7 +64,7 @@ PasswordReenterEdit_Impl::~PasswordReenterEdit_Impl()
void PasswordReenterEdit_Impl::Paint( const Rectangle& rRect )
{
- if (GetText().Len() == 0)
+ if (GetText().isEmpty())
{
Push( PUSH_TEXTCOLOR );
SetTextColor( Color( COL_GRAY ) );
@@ -174,8 +174,8 @@ PasswordToOpenModifyDialog_Impl::~PasswordToOpenModifyDialog_Impl()
IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG /*pBtn*/ )
{
bool bInvalidState = !m_aOpenReadonlyCB.IsChecked() &&
- m_aPasswdToOpenED.GetText().Len() == 0 &&
- m_aPasswdToModifyED.GetText().Len() == 0;
+ m_aPasswdToOpenED.GetText().isEmpty() &&
+ m_aPasswdToModifyED.GetText().isEmpty();
if (bInvalidState)
{
ErrorBox aErrorBox( m_pParent, WB_OK,
@@ -243,18 +243,18 @@ PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog()
String PasswordToOpenModifyDialog::GetPasswordToOpen() const
{
const bool bPasswdOk =
- m_pImpl->m_aPasswdToOpenED.GetText().Len() > 0 &&
+ !m_pImpl->m_aPasswdToOpenED.GetText().isEmpty() &&
m_pImpl->m_aPasswdToOpenED.GetText() == m_pImpl->m_aReenterPasswdToOpenED.GetText();
- return bPasswdOk ? m_pImpl->m_aPasswdToOpenED.GetText() : String();
+ return bPasswdOk ? m_pImpl->m_aPasswdToOpenED.GetText() : OUString();
}
String PasswordToOpenModifyDialog::GetPasswordToModify() const
{
const bool bPasswdOk =
- m_pImpl->m_aPasswdToModifyED.GetText().Len() > 0 &&
+ !m_pImpl->m_aPasswdToModifyED.GetText().isEmpty() &&
m_pImpl->m_aPasswdToModifyED.GetText() == m_pImpl->m_aReenterPasswdToModifyED.GetText();
- return bPasswdOk ? m_pImpl->m_aPasswdToModifyED.GetText() : String();
+ return bPasswdOk ? m_pImpl->m_aPasswdToModifyED.GetText() : OUString();
}
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index e94cbedc54be..8480b2398aae 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -113,16 +113,16 @@ ReplaceEdit::~ReplaceEdit()
void ReplaceEdit::Modify()
{
if (m_pBtn)
- m_pBtn->Enable( GetText().Len() > 0 );
+ m_pBtn->Enable( !GetText().isEmpty() );
}
-void ReplaceEdit::SetText( const XubString& rStr )
+void ReplaceEdit::SetText( const OUString& rStr )
{
Edit::SetText( rStr );
Modify();
}
-void ReplaceEdit::SetText( const XubString& rStr, const Selection& rNewSelection )
+void ReplaceEdit::SetText( const OUString& rStr, const Selection& rNewSelection )
{
Edit::SetText( rStr, rNewSelection );
Modify();
@@ -324,7 +324,7 @@ bool SvxThesaurusDialog::UpdateAlternativesBox_Impl()
void SvxThesaurusDialog::LookUp( const String &rText )
{
- if (rText != m_pWordCB->GetText()) // avoid moving of the cursor if the text is the same
+ if (OUString(rText) != m_pWordCB->GetText()) // avoid moving of the cursor if the text is the same
m_pWordCB->SetText( rText );
LookUp_Impl();
}
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 8664374846e9..09005d39a502 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -216,11 +216,11 @@ void CuiAbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
pDlg->SetInputSet( pInSet );
}
//From class Window.
-void CuiAbstractTabDialog_Impl::SetText( const XubString& rStr )
+void CuiAbstractTabDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String CuiAbstractTabDialog_Impl::GetText() const
+OUString CuiAbstractTabDialog_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -231,12 +231,12 @@ const SfxItemSet* CuiAbstractSfxDialog_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-void CuiAbstractSfxDialog_Impl::SetText( const XubString& rStr )
+void CuiAbstractSfxDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String CuiAbstractSfxDialog_Impl::GetText() const
+OUString CuiAbstractSfxDialog_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -643,11 +643,11 @@ void AbstractSvxTransformTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
pDlg->SetInputSet( pInSet );
}
//From class Window.
-void AbstractSvxTransformTabDialog_Impl::SetText( const XubString& rStr )
+void AbstractSvxTransformTabDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String AbstractSvxTransformTabDialog_Impl::GetText() const
+OUString AbstractSvxTransformTabDialog_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -682,11 +682,11 @@ void AbstractSvxCaptionDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
pDlg->SetInputSet( pInSet );
}
//From class Window.
-void AbstractSvxCaptionDialog_Impl::SetText( const XubString& rStr )
+void AbstractSvxCaptionDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String AbstractSvxCaptionDialog_Impl::GetText() const
+OUString AbstractSvxCaptionDialog_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -737,7 +737,7 @@ void AbstractSvxNameDialog_Impl::SetHelpId( const rtl::OString& aHelpId )
{
pDlg->SetHelpId( aHelpId );
}
-void AbstractSvxNameDialog_Impl::SetText( const XubString& rStr )
+void AbstractSvxNameDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
@@ -907,16 +907,16 @@ void AbstractSvxAreaTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
pDlg->SetInputSet( pInSet );
}
//From class Window.
-void AbstractSvxAreaTabDialog_Impl::SetText( const XubString& rStr )
+void AbstractSvxAreaTabDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String AbstractSvxAreaTabDialog_Impl::GetText() const
+OUString AbstractSvxAreaTabDialog_Impl::GetText() const
{
return pDlg->GetText();
}
-void AbstractSvxPostItDialog_Impl::SetText( const XubString& rStr )
+void AbstractSvxPostItDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 080d8b760460..dd4c37a4802e 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -115,8 +115,8 @@ class CuiAbstractSfxDialog_Impl : public SfxAbstractDialog
virtual const SfxItemSet* GetOutputItemSet() const;
//From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const ;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const ;
};
class CuiAbstractTabDialog_Impl : public SfxAbstractTabDialog
@@ -128,8 +128,8 @@ class CuiAbstractTabDialog_Impl : public SfxAbstractTabDialog
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
//for SvxDistributeDialog begin
@@ -346,8 +346,8 @@ class AbstractSvxTransformTabDialog_Impl : public AbstractSvxTransformTabDialog
virtual const SfxItemSet* GetOutputItemSet() const;
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
class AbstractSvxCaptionDialog_Impl : public AbstractSvxCaptionDialog
{
@@ -358,8 +358,8 @@ class AbstractSvxCaptionDialog_Impl : public AbstractSvxCaptionDialog
virtual const SfxItemSet* GetOutputItemSet() const;
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
//for FmInputRecordNoDialog end
@@ -391,7 +391,7 @@ class AbstractSvxNameDialog_Impl :public AbstractSvxNameDialog
virtual void SetEditHelpId(const rtl::OString&) ;
//from class Window
virtual void SetHelpId( const rtl::OString& ) ;
- virtual void SetText( const XubString& rStr ) ;
+ virtual void SetText( const OUString& rStr ) ;
private:
Link aCheckNameHdl;
DECL_LINK(CheckNameHdl, void *);
@@ -506,8 +506,8 @@ class AbstractSvxAreaTabDialog_Impl :public AbstractSvxAreaTabDialog
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
// From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
// add for SvxAreaTabDialog end
@@ -542,7 +542,7 @@ class SvxPostItDialog;
class AbstractSvxPostItDialog_Impl :public AbstractSvxPostItDialog
{
DECL_ABSTDLG_BASE( AbstractSvxPostItDialog_Impl, SvxPostItDialog )
- virtual void SetText( const XubString& rStr ); //From class Window
+ virtual void SetText( const OUString& rStr ); //From class Window
virtual const SfxItemSet* GetOutputItemSet() const;
virtual void SetPrevHdl( const Link& rLink ) ;
virtual void SetNextHdl( const Link& rLink ) ;
diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx
index b7b4ef066724..10ce9b28b3fa 100644
--- a/cui/source/inc/SpellDialog.hxx
+++ b/cui/source/inc/SpellDialog.hxx
@@ -81,7 +81,7 @@ public:
void SetModifyHdl(const Link& rLink) { m_aModifyLink = rLink;}
void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd );
- void SetText( const String& rStr );
+ void SetText( const OUString& rStr );
bool MarkNextError( bool bIgnoreCurrentError );
void ChangeMarkedWord(const String& rNewWord, LanguageType eLanguage);
diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx
index d9db58c24a3a..27b0d0f7d50b 100644
--- a/cui/source/inc/cuicharmap.hxx
+++ b/cui/source/inc/cuicharmap.hxx
@@ -44,7 +44,7 @@ public:
~SvxShowText();
void SetFont( const Font& rFont );
- void SetText( const String& rText );
+ void SetText( const OUString& rText );
void SetCentered(bool bCenter) { mbCenter = bCenter; }
virtual void Resize();
diff --git a/cui/source/inc/thesdlg.hxx b/cui/source/inc/thesdlg.hxx
index f8353ef17713..5ab74b046251 100644
--- a/cui/source/inc/thesdlg.hxx
+++ b/cui/source/inc/thesdlg.hxx
@@ -58,8 +58,8 @@ public:
class AlternativesExtraData
{
- String sText;
- bool bHeader;
+ OUString sText;
+ bool bHeader;
public:
AlternativesExtraData() : bHeader( false ) {}
@@ -70,7 +70,7 @@ public:
}
bool IsHeader() const { return bHeader; }
- const String& GetText() const { return sText; }
+ const OUString& GetText() const { return sText; }
};
class ThesaurusAlternativesCtrl
@@ -118,8 +118,8 @@ public:
// Edit
virtual void Modify();
- virtual void SetText( const XubString& rStr );
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
+ virtual void SetText( const OUString& rStr );
+ virtual void SetText( const OUString& rStr, const Selection& rNewSelection );
};
class SvxThesaurusDialog : public SvxStandardDialog
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index 98b550069b38..d38b872ab27d 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -96,7 +96,7 @@ namespace svx
void ODocumentLinkDialog::validate( )
{
- m_aOK.Enable( (0 != m_aName.GetText().Len()) && ( 0 != m_aURL.GetText().Len() ) );
+ m_aOK.Enable( ( !m_aName.GetText().isEmpty()) && ( !m_aURL.GetText().isEmpty() ) );
}
//------------------------------------------------------------------
@@ -179,7 +179,7 @@ namespace svx
if (0 != aFileDlg.Execute())
return 0L;
- if (0 == m_aName.GetText().Len())
+ if (m_aName.GetText().isEmpty())
{ // default the name to the base of the chosen URL
INetURLObject aParser;
@@ -188,7 +188,7 @@ namespace svx
m_aName.SetText(aParser.getBase(INetURLObject::LAST_SEGMENT, true, INetURLObject::DECODE_WITH_CHARSET));
- m_aName.SetSelection(Selection(0,m_aName.GetText().Len()));
+ m_aName.SetSelection(Selection(0,m_aName.GetText().getLength()));
m_aName.GrabFocus();
}
else
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index e511a3f9302b..1ce2e89c4281 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -385,7 +385,7 @@ void SvxFontSubstTabPage::CheckEnable()
sEntry += aFont2CB.GetText();
// because of OS/2 optimization error (Bug #56267) a bit more intricate:
- if (!aFont1CB.GetText().Len() || !aFont2CB.GetText().Len())
+ if (aFont1CB.GetText().isEmpty() || aFont2CB.GetText().isEmpty())
bApply = sal_False;
else if(aFont1CB.GetText() == aFont2CB.GetText())
bApply = sal_False;
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 9855c8a31fb5..e8d3f4850ae0 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -194,7 +194,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl)
IMPL_LINK_NOARG_INLINE_START(SvxNewDictionaryDialog, ModifyHdl_Impl)
{
- if ( aNameEdit.GetText().Len() )
+ if ( !aNameEdit.GetText().isEmpty() )
aOKBtn.Enable();
else
aOKBtn.Disable();
@@ -552,7 +552,7 @@ IMPL_LINK(SvxEditDictionaryDialog, SelectHdl, SvTabListBox*, pBox)
if(!bFirstSelect)
{
SvTreeListEntry* pEntry = pBox->FirstSelected();
- String sTmpShort(pBox->GetEntryText(pEntry, 0));
+ OUString sTmpShort(pBox->GetEntryText(pEntry, 0));
// without this the curser is always at the beginning of a word, if the text
// is set over the ModifyHdl, although you're editing there at the moment
if(aWordED.GetText() != sTmpShort)
@@ -761,7 +761,7 @@ IMPL_LINK(SvxEditDictionaryDialog, ModifyHdl, Edit*, pEdt)
sal_Bool bIsChange =
CDE_EQUAL != cmpDicEntry_Impl(aWordED.GetText(), aWordText)
|| CDE_EQUAL != cmpDicEntry_Impl(aReplaceED.GetText(), aReplaceText);
- if (aWordED.GetText().Len() && bIsChange)
+ if (!aWordED.GetText().isEmpty() && bIsChange)
bEnableNewReplace = sal_True;
}
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 6b7f6ec496db..9bbfab856e90 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -350,7 +350,7 @@ sal_Bool OfaMiscTabPage::FillItemSet( SfxItemSet& rSet )
const SfxUInt16Item* pUInt16Item =
PTR_CAST( SfxUInt16Item, GetOldItem( rSet, SID_ATTR_YEAR2000 ) );
- sal_uInt16 nNum = (sal_uInt16)aYearValueField.GetText().ToInt32();
+ sal_uInt16 nNum = (sal_uInt16)aYearValueField.GetText().toInt32();
if ( pUInt16Item && pUInt16Item->GetValue() != nNum )
{
bModified = sal_True;
@@ -1480,7 +1480,7 @@ sal_Bool OfaLanguagesTabPage::FillItemSet( SfxItemSet& rSet )
// Configured date acceptance patterns, for example Y-M-D;M-D or empty for
// locale default.
- if (aDatePatternsED.GetText() != aDatePatternsED.GetSavedValue())
+ if (aDatePatternsED.GetText() != OUString(aDatePatternsED.GetSavedValue()))
pLangConfig->aSysLocaleOptions.SetDatePatternsConfigString( aDatePatternsED.GetText());
SfxObjectShell* pCurrentDocShell = SfxObjectShell::Current();
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 5a1438b2073d..21278cf8b4d0 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -483,7 +483,7 @@ sal_Bool SvxGeneralTabPage::GetAddress_Impl()
// modified?
for (unsigned i = 0; i != vFields.size(); ++i)
- if (vFields[i]->aEdit.GetSavedValue() != vFields[i]->aEdit.GetText())
+ if (OUString(vFields[i]->aEdit.GetSavedValue()) != vFields[i]->aEdit.GetText())
return true;
return false;
}
diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index 999303046d8c..49a57fcba5dd 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -111,19 +111,19 @@ SfxTabPage* OfaHtmlTabPage::Create( Window* pParent,
sal_Bool OfaHtmlTabPage::FillItemSet( SfxItemSet& )
{
SvxHtmlOptions& rHtmlOpt = SvxHtmlOptions::Get();
- if(aSize1NF.GetSavedValue() != aSize1NF.GetText())
+ if(OUString(aSize1NF.GetSavedValue()) != aSize1NF.GetText())
rHtmlOpt.SetFontSize(0, (sal_uInt16)aSize1NF.GetValue());
- if(aSize2NF.GetSavedValue() != aSize2NF.GetText())
+ if(OUString(aSize2NF.GetSavedValue()) != aSize2NF.GetText())
rHtmlOpt.SetFontSize(1, (sal_uInt16)aSize2NF.GetValue());
- if(aSize3NF.GetSavedValue() != aSize3NF.GetText())
+ if(OUString(aSize3NF.GetSavedValue()) != aSize3NF.GetText())
rHtmlOpt.SetFontSize(2, (sal_uInt16)aSize3NF.GetValue());
- if(aSize4NF.GetSavedValue() != aSize4NF.GetText())
+ if(OUString(aSize4NF.GetSavedValue()) != aSize4NF.GetText())
rHtmlOpt.SetFontSize(3, (sal_uInt16)aSize4NF.GetValue());
- if(aSize5NF.GetSavedValue() != aSize5NF.GetText())
+ if(OUString(aSize5NF.GetSavedValue()) != aSize5NF.GetText())
rHtmlOpt.SetFontSize(4, (sal_uInt16)aSize5NF.GetValue());
- if(aSize6NF.GetSavedValue() != aSize6NF.GetText())
+ if(OUString(aSize6NF.GetSavedValue()) != aSize6NF.GetText())
rHtmlOpt.SetFontSize(5, (sal_uInt16)aSize6NF.GetValue());
- if(aSize7NF.GetSavedValue() != aSize7NF.GetText())
+ if(OUString(aSize7NF.GetSavedValue()) != aSize7NF.GetText())
rHtmlOpt.SetFontSize(6, (sal_uInt16)aSize7NF.GetValue());
if(aNumbersEnglishUSCB.IsChecked() != aNumbersEnglishUSCB.GetSavedValue())
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 240cb876684a..37a4c63d0e7f 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -414,49 +414,49 @@ sal_Bool SvxProxyTabPage::FillItemSet(SfxItemSet& )
bModified = sal_True;
}
- if(aHttpProxyED.GetSavedValue() != aHttpProxyED.GetText())
+ if(OUString(aHttpProxyED.GetSavedValue()) != aHttpProxyED.GetText())
{
xPropertySet->setPropertyValue( aHttpProxyPN,
makeAny(rtl::OUString(aHttpProxyED.GetText())));
bModified = sal_True;
}
- if ( aHttpPortED.GetSavedValue() != aHttpPortED.GetText() )
+ if ( OUString(aHttpPortED.GetSavedValue()) != aHttpPortED.GetText() )
{
xPropertySet->setPropertyValue( aHttpPortPN,
- makeAny(aHttpPortED.GetText().ToInt32()));
+ makeAny(aHttpPortED.GetText().toInt32()));
bModified = sal_True;
}
- if(aHttpsProxyED.GetSavedValue() != aHttpsProxyED.GetText())
+ if(OUString(aHttpsProxyED.GetSavedValue()) != aHttpsProxyED.GetText())
{
xPropertySet->setPropertyValue( aHttpsProxyPN,
makeAny(rtl::OUString(aHttpsProxyED.GetText())));
bModified = sal_True;
}
- if ( aHttpsPortED.GetSavedValue() != aHttpsPortED.GetText() )
+ if ( OUString(aHttpsPortED.GetSavedValue()) != aHttpsPortED.GetText() )
{
xPropertySet->setPropertyValue( aHttpsPortPN,
- makeAny(aHttpsPortED.GetText().ToInt32()));
+ makeAny(aHttpsPortED.GetText().toInt32()));
bModified = sal_True;
}
- if(aFtpProxyED.GetSavedValue() != aFtpProxyED.GetText())
+ if(OUString(aFtpProxyED.GetSavedValue()) != aFtpProxyED.GetText())
{
xPropertySet->setPropertyValue( aFtpProxyPN,
makeAny( rtl::OUString(aFtpProxyED.GetText())));
bModified = sal_True;
}
- if ( aFtpPortED.GetSavedValue() != aFtpPortED.GetText() )
+ if ( OUString(aFtpPortED.GetSavedValue()) != aFtpPortED.GetText() )
{
xPropertySet->setPropertyValue( aFtpPortPN,
- makeAny(aFtpPortED.GetText().ToInt32()));
+ makeAny(aFtpPortED.GetText().toInt32()));
bModified = sal_True;
}
- if ( aNoProxyForED.GetSavedValue() != aNoProxyForED.GetText() )
+ if ( OUString(aNoProxyForED.GetSavedValue()) != aNoProxyForED.GetText() )
{
xPropertySet->setPropertyValue( aNoProxyDescPN,
makeAny( rtl::OUString(aNoProxyForED.GetText())));
@@ -1386,7 +1386,7 @@ SfxTabPage* SvxEMailTabPage::Create( Window* pParent, const SfxItemSet& rAttrSe
sal_Bool SvxEMailTabPage::FillItemSet( SfxItemSet& )
{
sal_Bool bMailModified = sal_False;
- if(!pImpl->aMailConfig.bROProgram && aMailerURLED.GetSavedValue() != aMailerURLED.GetText())
+ if(!pImpl->aMailConfig.bROProgram && OUString(aMailerURLED.GetSavedValue()) != aMailerURLED.GetText())
{
pImpl->aMailConfig.sProgram = aMailerURLED.GetText();
bMailModified = sal_True;
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index e5c43f79cf11..48e120fe7159 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -176,7 +176,7 @@ sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet )
boost::shared_ptr< comphelper::ConfigurationChanges > batch(
comphelper::ConfigurationChanges::create());
- if ( aUndoEdit.GetText() != aUndoEdit.GetSavedValue() )
+ if ( aUndoEdit.GetText() != OUString(aUndoEdit.GetSavedValue()) )
officecfg::Office::Common::Undo::Steps::set(
aUndoEdit.GetValue(), batch);
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index d818d9199aa0..394ece1bd0eb 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -310,7 +310,7 @@ sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet )
bModified |= sal_True;
}
- if ( aAutoSaveEdit.GetText() != aAutoSaveEdit.GetSavedValue() )
+ if ( aAutoSaveEdit.GetText() != OUString(aAutoSaveEdit.GetSavedValue()) )
{
rSet.Put( SfxUInt16Item( GetWhich( SID_ATTR_AUTOSAVEMINUTE ),
(sal_uInt16)aAutoSaveEdit.GetValue() ) );
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 48bd0c7de2b5..b64619feacd1 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -1095,7 +1095,7 @@ IMPL_LINK(OfaAutocorrReplacePage, SelectHdl, SvTabListBox*, pBox)
if(!bFirstSelect || !bHasSelectionText)
{
SvTreeListEntry* pEntry = pBox->FirstSelected();
- String sTmpShort(pBox->GetEntryText(pEntry, 0));
+ OUString sTmpShort(pBox->GetEntryText(pEntry, 0));
// if the text is set via ModifyHdl, the cursor is always at the beginning
// of a word, although you're editing here
sal_Bool bSameContent = 0 == pCompareClass->compareString( sTmpShort, aShortED.GetText() );
@@ -1197,7 +1197,7 @@ IMPL_LINK(OfaAutocorrReplacePage, NewDelHdl, PushButton*, pBtn)
{
SvTreeListEntry* _pNewEntry = aReplaceTLB.FirstSelected();
String sEntry(aShortED.GetText());
- if(sEntry.Len() && ( aReplaceED.GetText().Len() ||
+ if(sEntry.Len() && ( !aReplaceED.GetText().isEmpty() ||
( bHasSelectionText && bSWriter ) ))
{
NewEntry(aShortED.GetText(), aReplaceED.GetText());
@@ -1630,7 +1630,7 @@ void OfaAutocorrExceptPage::Reset( const SfxItemSet& )
IMPL_LINK(OfaAutocorrExceptPage, NewDelHdl, PushButton*, pBtn)
{
if((pBtn == &aNewAbbrevPB || pBtn == (PushButton*)&aAbbrevED )
- && aAbbrevED.GetText().Len())
+ && !aAbbrevED.GetText().isEmpty())
{
aAbbrevLB.InsertEntry(aAbbrevED.GetText());
ModifyHdl(&aAbbrevED);
@@ -1641,7 +1641,7 @@ IMPL_LINK(OfaAutocorrExceptPage, NewDelHdl, PushButton*, pBtn)
ModifyHdl(&aAbbrevED);
}
else if((pBtn == &aNewDoublePB || pBtn == (PushButton*)&aDoubleCapsED )
- && aDoubleCapsED.GetText().Len())
+ && !aDoubleCapsED.GetText().isEmpty())
{
aDoubleCapsLB.InsertEntry(aDoubleCapsED.GetText());
ModifyHdl(&aDoubleCapsED);
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 1151fb5dcdde..afad498a15fc 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -763,7 +763,7 @@ sal_Bool SvxBackgroundTabPage::FillItemSet( SfxItemSet& rCoreSet )
SfxItemState eOldItemState = rCoreSet.GetItemState(nSlot, sal_False);
const SfxItemSet& rOldSet = GetItemSet();
- sal_Bool bGraphTransparencyChanged = bGraphTransparency && (m_pGraphTransMF->GetText() != m_pGraphTransMF->GetSavedValue());
+ sal_Bool bGraphTransparencyChanged = bGraphTransparency && (m_pGraphTransMF->GetText() != OUString(m_pGraphTransMF->GetSavedValue()));
if ( pOld )
{
const SvxBrushItem& rOldItem = (const SvxBrushItem&)*pOld;
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 2bd6766faa64..960eaa3481e6 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -602,8 +602,8 @@ sal_Bool SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs )
if( !mbUseMarginItem )
{
// #106224# all edits empty: do nothing
- if( m_pLeftMF->GetText().Len() || m_pRightMF->GetText().Len() ||
- m_pTopMF->GetText().Len() || m_pBottomMF->GetText().Len() )
+ if( !m_pLeftMF->GetText().isEmpty() || !m_pRightMF->GetText().isEmpty() ||
+ !m_pTopMF->GetText().isEmpty() || !m_pBottomMF->GetText().isEmpty() )
{
if ( ((mbHorEnabled || mbVerEnabled || (nSWMode & SW_BORDER_MODE_TABLE)) &&
(m_pLeftMF->IsModified()||m_pRightMF->IsModified()||
@@ -617,10 +617,10 @@ sal_Bool SvxBorderTabPage::FillItemSet( SfxItemSet& rCoreAttrs )
rCoreAttrs, SID_ATTR_BORDER_INNER );
if (
!pOldBoxItem ||
- m_pLeftMF->GetText() != m_pLeftMF->GetSavedValue() ||
- m_pRightMF->GetText() != m_pRightMF->GetSavedValue() ||
- m_pTopMF->GetText() != m_pTopMF->GetSavedValue() ||
- m_pBottomMF->GetText() != m_pBottomMF->GetSavedValue() ||
+ m_pLeftMF->GetText() != OUString(m_pLeftMF->GetSavedValue()) ||
+ m_pRightMF->GetText() != OUString(m_pRightMF->GetSavedValue()) ||
+ m_pTopMF->GetText() != OUString(m_pTopMF->GetSavedValue()) ||
+ m_pBottomMF->GetText() != OUString(m_pBottomMF->GetSavedValue()) ||
nMinValue == m_pLeftMF->GetValue() ||
nMinValue == m_pRightMF->GetValue() ||
nMinValue == m_pTopMF->GetValue() ||
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 9d444d45a3a2..9c35affa4f1f 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -483,7 +483,7 @@ namespace
aSize.Height() =
ItemToControl( nHeight, _pPage->GetItemSet().GetPool()->GetMetric( _nFontHeightWhich ), SFX_FUNIT_TWIP );
}
- else if ( _pFontSizeLB->GetText().Len() )
+ else if ( !_pFontSizeLB->GetText().isEmpty() )
aSize.Height() = PointToTwips( static_cast<long>(_pFontSizeLB->GetValue() / 10) );
else
aSize.Height() = 200; // default 10pt
@@ -1021,7 +1021,7 @@ sal_Bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLan
// FontSize
long nSize = static_cast<long>(pSizeBox->GetValue());
- if ( !pSizeBox->GetText().Len() ) // GetValue() returns the min-value
+ if ( pSizeBox->GetText().isEmpty() ) // GetValue() returns the min-value
nSize = 0;
long nSavedSize = pSizeBox->GetSavedValue().ToInt32();
bool bRel = true;
@@ -3223,7 +3223,7 @@ sal_Bool SvxCharPositionPage::FillItemSet( SfxItemSet& rSet )
// Scale Width
nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH );
- if ( m_pScaleWidthMF->GetText() != m_pScaleWidthMF->GetSavedValue() )
+ if ( m_pScaleWidthMF->GetText() != OUString(m_pScaleWidthMF->GetSavedValue()) )
{
rSet.Put( SvxCharScaleWidthItem( (sal_uInt16)m_pScaleWidthMF->GetValue(), nWhich ) );
bModified = sal_True;
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index f1d088d2ec39..1b2eb4779d87 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -324,49 +324,49 @@ sal_Bool SvxConnectionPage::FillItemSet( SfxItemSet& rAttrs)
sal_Bool bModified = sal_False;
sal_Int32 nValue;
- if( aMtrFldHorz1.GetText() != aMtrFldHorz1.GetSavedValue() )
+ if( aMtrFldHorz1.GetText() != OUString(aMtrFldHorz1.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldHorz1, eUnit );
rAttrs.Put( SdrEdgeNode1HorzDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldHorz2.GetText() != aMtrFldHorz2.GetSavedValue() )
+ if( aMtrFldHorz2.GetText() != OUString(aMtrFldHorz2.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldHorz2, eUnit );
rAttrs.Put( SdrEdgeNode2HorzDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldVert1.GetText() != aMtrFldVert1.GetSavedValue() )
+ if( aMtrFldVert1.GetText() != OUString(aMtrFldVert1.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldVert1, eUnit );
rAttrs.Put( SdrEdgeNode1VertDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldVert2.GetText() != aMtrFldVert2.GetSavedValue() )
+ if( aMtrFldVert2.GetText() != OUString(aMtrFldVert2.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldVert2, eUnit );
rAttrs.Put( SdrEdgeNode2VertDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldLine1.GetText() != aMtrFldLine1.GetSavedValue() )
+ if( aMtrFldLine1.GetText() != OUString(aMtrFldLine1.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldLine1, eUnit );
rAttrs.Put( SdrEdgeLine1DeltaItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldLine2.GetText() != aMtrFldLine2.GetSavedValue() )
+ if( aMtrFldLine2.GetText() != OUString(aMtrFldLine2.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldLine2, eUnit );
rAttrs.Put( SdrEdgeLine2DeltaItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldLine3.GetText() != aMtrFldLine3.GetSavedValue() )
+ if( aMtrFldLine3.GetText() != OUString(aMtrFldLine3.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldLine3, eUnit );
rAttrs.Put( SdrEdgeLine3DeltaItem( nValue ) );
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 1d3694b22a65..bbe07837e139 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -237,8 +237,8 @@ sal_Bool SvxGrfCropPage::FillItemSet(SfxItemSet &rSet)
{
const SfxItemPool& rPool = *rSet.GetPool();
sal_Bool bModified = sal_False;
- if( aWidthMF.GetSavedValue() != aWidthMF.GetText() ||
- aHeightMF.GetSavedValue() != aHeightMF.GetText() )
+ if( OUString(aWidthMF.GetSavedValue()) != aWidthMF.GetText() ||
+ OUString(aHeightMF.GetSavedValue()) != aHeightMF.GetText() )
{
sal_uInt16 nW = rPool.GetWhich( SID_ATTR_GRAF_FRMSIZE );
FieldUnit eUnit = MapToFieldUnit( rSet.GetPool()->GetMetric( nW ));
@@ -256,9 +256,9 @@ sal_Bool SvxGrfCropPage::FillItemSet(SfxItemSet &rSet)
aSz = (const SvxSizeItem&)GetItemSet().Get( nW );
Size aTmpSz( aSz.GetSize() );
- if( aWidthMF.GetText() != aWidthMF.GetSavedValue() )
+ if( aWidthMF.GetText() != OUString(aWidthMF.GetSavedValue()) )
aTmpSz.Width() = lcl_GetValue( aWidthMF, eUnit );
- if( aHeightMF.GetText() != aHeightMF.GetSavedValue() )
+ if( aHeightMF.GetText() != OUString(aHeightMF.GetSavedValue()) )
aTmpSz.Height() = lcl_GetValue( aHeightMF, eUnit );
aSz.SetSize( aTmpSz );
aWidthMF.SaveValue();
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 215ba1b75820..edf5eda7159d 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -438,35 +438,35 @@ sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs)
sal_Int32 nValue;
TriState eState;
- if( aMtrFldLineDist.GetText() != aMtrFldLineDist.GetSavedValue() )
+ if( aMtrFldLineDist.GetText() != OUString(aMtrFldLineDist.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldLineDist, eUnit );
rAttrs.Put( SdrMeasureLineDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldHelplineOverhang.GetText() != aMtrFldHelplineOverhang.GetSavedValue() )
+ if( aMtrFldHelplineOverhang.GetText() != OUString(aMtrFldHelplineOverhang.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldHelplineOverhang, eUnit );
rAttrs.Put( SdrMeasureHelplineOverhangItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldHelplineDist.GetText() != aMtrFldHelplineDist.GetSavedValue() )
+ if( aMtrFldHelplineDist.GetText() != OUString(aMtrFldHelplineDist.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldHelplineDist, eUnit );
rAttrs.Put( SdrMeasureHelplineDistItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldHelpline1Len.GetText() != aMtrFldHelpline1Len.GetSavedValue() )
+ if( aMtrFldHelpline1Len.GetText() != OUString(aMtrFldHelpline1Len.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldHelpline1Len, eUnit );
rAttrs.Put( SdrMeasureHelpline1LenItem( nValue ) );
bModified = sal_True;
}
- if( aMtrFldHelpline2Len.GetText() != aMtrFldHelpline2Len.GetSavedValue() )
+ if( aMtrFldHelpline2Len.GetText() != OUString(aMtrFldHelpline2Len.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldHelpline2Len, eUnit );
rAttrs.Put( SdrMeasureHelpline2LenItem( nValue ) );
@@ -480,7 +480,7 @@ sal_Bool SvxMeasurePage::FillItemSet( SfxItemSet& rAttrs)
bModified = sal_True;
}
- if( aMtrFldDecimalPlaces.GetText() != aMtrFldDecimalPlaces.GetSavedValue() )
+ if( aMtrFldDecimalPlaces.GetText() != OUString(aMtrFldDecimalPlaces.GetSavedValue()) )
{
nValue = static_cast<sal_Int32>(aMtrFldDecimalPlaces.GetValue());
rAttrs.Put(
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 4dad881a70d3..09ea455a1a0d 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1348,7 +1348,7 @@ IMPL_LINK( SvxNumberFormatTabPage, ClickHdl_Impl, PushButton*, pIB)
SetCategory(nCatLbSelPos );
FillFormatListBox_Impl( aEntryList );
- if(m_pEdComment->GetText()!=m_pLbCategory->GetEntry(1))
+ if(m_pEdComment->GetText()!=OUString(m_pLbCategory->GetEntry(1)))
{
pNumFmtShell->SetComment4Entry(nFmtLbSelPos,
m_pEdComment->GetText());
@@ -1459,12 +1459,12 @@ IMPL_LINK( SvxNumberFormatTabPage, EditHdl_Impl, Edit*, pEdFormat )
{
sal_uInt32 nCurKey = NUMKEY_UNDEFINED;
- if ( m_pEdFormat->GetText().Len() == 0 )
+ if ( m_pEdFormat->GetText().isEmpty() )
{
m_pIbAdd->Enable(sal_False );
m_pIbRemove->Enable(sal_False );
m_pIbInfo->Enable(sal_False );
- m_pFtComment->SetText(String());
+ m_pFtComment->SetText(OUString());
}
else
{
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 50b6a5746657..daaf17ea2b2f 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -685,13 +685,13 @@ sal_Bool SvxPageDescPage::FillItemSet( SfxItemSet& rSet )
nWhich = GetWhich( SID_ATTR_ULSPACE );
SvxULSpaceItem aTopMargin( (const SvxULSpaceItem&)rOldSet.Get( nWhich ) );
- if ( aLeftMarginEdit.GetText() != aLeftMarginEdit.GetSavedValue() )
+ if ( aLeftMarginEdit.GetText() != OUString(aLeftMarginEdit.GetSavedValue()) )
{
aMargin.SetLeft( (sal_uInt16)GetCoreValue( aLeftMarginEdit, eUnit ) );
bModified |= sal_True;
}
- if ( aRightMarginEdit.GetText() != aRightMarginEdit.GetSavedValue() )
+ if ( aRightMarginEdit.GetText() != OUString(aRightMarginEdit.GetSavedValue()) )
{
aMargin.SetRight( (sal_uInt16)GetCoreValue( aRightMarginEdit, eUnit ) );
bModified |= sal_True;
@@ -710,13 +710,13 @@ sal_Bool SvxPageDescPage::FillItemSet( SfxItemSet& rSet )
sal_Bool bMod = sal_False;
- if ( aTopMarginEdit.GetText() != aTopMarginEdit.GetSavedValue() )
+ if ( aTopMarginEdit.GetText() != OUString(aTopMarginEdit.GetSavedValue()) )
{
aTopMargin.SetUpper( (sal_uInt16)GetCoreValue( aTopMarginEdit, eUnit ) );
bMod |= sal_True;
}
- if ( aBottomMarginEdit.GetText() != aBottomMarginEdit.GetSavedValue() )
+ if ( aBottomMarginEdit.GetText() != OUString(aBottomMarginEdit.GetSavedValue()) )
{
aTopMargin.SetLower( (sal_uInt16)GetCoreValue( aBottomMarginEdit, eUnit ) );
bMod |= sal_True;
@@ -900,18 +900,18 @@ IMPL_LINK_NOARG(SvxPageDescPage, LayoutHdl_Impl)
if ( nPos == SVX_PAGE_MIRROR )
{
- if ( aLeftMarginLbl.GetText() != aInsideText )
+ if ( aLeftMarginLbl.GetText() != OUString(aInsideText) )
aLeftMarginLbl.SetText( aInsideText );
- if ( aRightMarginLbl.GetText() != aOutsideText )
+ if ( aRightMarginLbl.GetText() != OUString(aOutsideText) )
aRightMarginLbl.SetText( aOutsideText );
}
else
{
- if ( aLeftMarginLbl.GetText() != aLeftText )
+ if ( aLeftMarginLbl.GetText() != OUString(aLeftText) )
aLeftMarginLbl.SetText( aLeftText );
- if ( aRightMarginLbl.GetText() != aRightText )
+ if ( aRightMarginLbl.GetText() != OUString(aRightText) )
aRightMarginLbl.SetText( aRightText );
}
UpdateExample_Impl( true );
@@ -1630,7 +1630,7 @@ bool SvxPageDescPage::IsPrinterRangeOverflow(
long nValue = static_cast<long>(rField.GetValue());
if ( bCheck &&
( nValue < nFirstMargin || nValue > nLastMargin ) &&
- rField.GetText() != rField.GetSavedValue() )
+ rField.GetText() != OUString(rField.GetSavedValue()) )
{
rField.SetValue( nValue < nFirstMargin ? nFirstMargin : nLastMargin );
bRet = true;
@@ -1664,19 +1664,19 @@ void SvxPageDescPage::CheckMarginEdits( bool _bClear )
bool SvxPageDescPage::IsMarginOutOfRange()
{
bool bRet = ( ( ( !( pImpl->m_nPos & MARGIN_LEFT ) &&
- ( aLeftMarginEdit.GetText() != aLeftMarginEdit.GetSavedValue() ) ) &&
+ ( aLeftMarginEdit.GetText() != OUString(aLeftMarginEdit.GetSavedValue()) ) ) &&
( aLeftMarginEdit.GetValue() < nFirstLeftMargin ||
aLeftMarginEdit.GetValue() > nLastLeftMargin ) ) ||
( ( !( pImpl->m_nPos & MARGIN_RIGHT ) &&
- ( aRightMarginEdit.GetText() != aRightMarginEdit.GetSavedValue() ) ) &&
+ ( aRightMarginEdit.GetText() != OUString(aRightMarginEdit.GetSavedValue()) ) ) &&
( aRightMarginEdit.GetValue() < nFirstRightMargin ||
aRightMarginEdit.GetValue() > nLastRightMargin ) ) ||
( ( !( pImpl->m_nPos & MARGIN_TOP ) &&
- ( aTopMarginEdit.GetText() != aTopMarginEdit.GetSavedValue() ) ) &&
+ ( aTopMarginEdit.GetText() != OUString(aTopMarginEdit.GetSavedValue()) ) ) &&
( aTopMarginEdit.GetValue() < nFirstTopMargin ||
aTopMarginEdit.GetValue() > nLastTopMargin ) ) ||
( ( !( pImpl->m_nPos & MARGIN_BOTTOM ) &&
- ( aBottomMarginEdit.GetText() != aBottomMarginEdit.GetSavedValue() ) ) &&
+ ( aBottomMarginEdit.GetText() != OUString(aBottomMarginEdit.GetSavedValue()) ) ) &&
( aBottomMarginEdit.GetValue() < nFirstBottomMargin ||
aBottomMarginEdit.GetValue() > nLastBottomMargin ) ) );
return bRet;
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 91a376cf4e85..6f992318f2de 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -802,7 +802,7 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox )
aLineDistAtMetricBox.SetMin(0);
- if ( !aLineDistAtMetricBox.GetText().Len() )
+ if ( aLineDistAtMetricBox.GetText().isEmpty() )
aLineDistAtMetricBox.SetValue(
aLineDistAtMetricBox.Normalize( 1 ) );
aLineDistAtPercentBox.Hide();
@@ -816,7 +816,7 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox )
pActLineDistFld = &aLineDistAtMetricBox;
aLineDistAtMetricBox.SetMin(0);
- if ( !aLineDistAtMetricBox.GetText().Len() )
+ if ( aLineDistAtMetricBox.GetText().isEmpty() )
aLineDistAtMetricBox.SetValue(
aLineDistAtMetricBox.Normalize( 10 ), FUNIT_TWIP );
aLineDistAtPercentBox.Hide();
@@ -829,7 +829,7 @@ IMPL_LINK( SvxStdParagraphTabPage, LineDistHdl_Impl, ListBox *, pBox )
aLineDistAtMetricBox.Hide();
pActLineDistFld = &aLineDistAtPercentBox;
- if ( !aLineDistAtPercentBox.GetText().Len() )
+ if ( aLineDistAtPercentBox.GetText().isEmpty() )
aLineDistAtPercentBox.SetValue(
aLineDistAtPercentBox.Normalize( 100 ), FUNIT_TWIP );
aLineDistAtMetricBox.Hide();
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index ef6d44b9a5fc..dc5431959274 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -536,7 +536,7 @@ IMPL_LINK( SvxTabulatorTabPage, NewHdl_Impl, Button *, pBtn )
// If no RadioButton was clicked, we need to put anyway
bCheck |= sal_True;
// Set the selection into the position Edit
- aTabBox.SetSelection(Selection(0, aTabBox.GetText().Len()));
+ aTabBox.SetSelection(Selection(0, aTabBox.GetText().getLength()));
return 0;
}
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 32e0448fc2ba..7eb291109b2d 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -343,25 +343,25 @@ sal_Bool SvxTextAttrPage::FillItemSet( SfxItemSet& rAttrs)
sal_Int32 nValue;
TriState eState;
- if( aMtrFldLeft.GetText() != aMtrFldLeft.GetSavedValue() )
+ if( aMtrFldLeft.GetText() != OUString(aMtrFldLeft.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldLeft, eUnit );
rAttrs.Put( SdrTextLeftDistItem( nValue ) );
}
- if( aMtrFldRight.GetText() != aMtrFldRight.GetSavedValue() )
+ if( aMtrFldRight.GetText() != OUString(aMtrFldRight.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldRight, eUnit );
rAttrs.Put( SdrTextRightDistItem( nValue ) );
}
- if( aMtrFldTop.GetText() != aMtrFldTop.GetSavedValue() )
+ if( aMtrFldTop.GetText() != OUString(aMtrFldTop.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldTop, eUnit );
rAttrs.Put( SdrTextUpperDistItem( nValue ) );
}
- if( aMtrFldBottom.GetText() != aMtrFldBottom.GetSavedValue() )
+ if( aMtrFldBottom.GetText() != OUString(aMtrFldBottom.GetSavedValue()) )
{
nValue = GetCoreValue( aMtrFldBottom, eUnit );
rAttrs.Put( SdrTextLowerDistItem( nValue ) );
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 87b410fff68c..08d15d630016 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -1165,7 +1165,7 @@ sal_Bool SvxAreaTabPage::FillItemSet( SfxItemSet& rAttrs )
else
{
// condition != Disabled ?
- if( aNumFldStepCount.GetText().Len() > 0 )
+ if( !aNumFldStepCount.GetText().isEmpty() )
{
nValue = (sal_uInt16) aNumFldStepCount.GetValue();
if( nValue != (sal_uInt16) aNumFldStepCount.GetSavedValue().ToInt32() )
@@ -2234,7 +2234,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p )
{
if( aTsbStepCount.GetState() == STATE_NOCHECK )
{
- if( aNumFldStepCount.GetText().Len() == 0 )
+ if( aNumFldStepCount.GetText().isEmpty() )
aNumFldStepCount.SetText(rtl::OUString("64"));
aNumFldStepCount.Enable();
@@ -2247,7 +2247,7 @@ IMPL_LINK( SvxAreaTabPage, ModifyStepCountHdl_Impl, void *, p )
if( aTsbStepCount.GetState() != STATE_CHECK )
{
// condition != Disabled ?
- if( aNumFldStepCount.GetText().Len() > 0 )
+ if( !aNumFldStepCount.GetText().isEmpty() )
nValue = (sal_uInt16) aNumFldStepCount.GetValue();
}
rXFSet.Put( XGradientStepCountItem( nValue ) );
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 896899728b9b..25c394fdb9c6 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -513,7 +513,7 @@ long SvxColorTabPage::CheckChanges_Impl()
if( nPos != LISTBOX_ENTRY_NOTFOUND )
{
Color aColor = pColorList->GetColor( nPos )->GetColor();
- String aString = aLbColor.GetSelectEntry();
+ OUString aString = aLbColor.GetSelectEntry();
// aNewColor, because COL_USER != COL_something, even if RGB values are the same
// Color aNewColor( aColor.GetRed(), aColor.GetGreen(), aColor.GetBlue() );
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index 07d7267c3fc9..9fb4d89b3a75 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -230,8 +230,8 @@ int SvxHatchTabPage::DeactivatePage( SfxItemSet* _pSet )
long SvxHatchTabPage::CheckChanges_Impl()
{
- if( aMtrDistance.GetText() != aMtrDistance.GetSavedValue() ||
- aMtrAngle.GetText() != aMtrAngle.GetSavedValue() ||
+ if( aMtrDistance.GetText() != OUString(aMtrDistance.GetSavedValue()) ||
+ aMtrAngle.GetText() != OUString(aMtrAngle.GetSavedValue()) ||
aLbLineType.GetSelectEntryPos() != aLbLineType.GetSavedValue() ||
aLbLineColor.GetSelectEntryPos() != aLbLineColor.GetSavedValue() ||
aLbHatchings.GetSelectEntryPos() != aLbHatchings.GetSavedValue() )
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 8e65d47ff9ae..fbd083b4c759 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -753,7 +753,7 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
}
// Line width
// GetSavedValue() returns String!
- if( aMtrLineWidth.GetText() != aMtrLineWidth.GetSavedValue() )
+ if( aMtrLineWidth.GetText() != OUString(aMtrLineWidth.GetSavedValue()) )
{
XLineWidthItem aItem( GetCoreValue( aMtrLineWidth, ePoolUnit ) );
pOld = GetOldItem( rAttrs, XATTR_LINEWIDTH );
@@ -764,7 +764,7 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
}
}
// Width line start
- if( aMtrStartWidth.GetText() != aMtrStartWidth.GetSavedValue() )
+ if( aMtrStartWidth.GetText() != OUString(aMtrStartWidth.GetSavedValue()) )
{
XLineStartWidthItem aItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) );
pOld = GetOldItem( rAttrs, XATTR_LINESTARTWIDTH );
@@ -775,7 +775,7 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
}
}
// Width line end
- if( aMtrEndWidth.GetText() != aMtrEndWidth.GetSavedValue() )
+ if( aMtrEndWidth.GetText() != OUString(aMtrEndWidth.GetSavedValue()) )
{
XLineEndWidthItem aItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) );
pOld = GetOldItem( rAttrs, XATTR_LINEENDWIDTH );
@@ -868,7 +868,7 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
}
// Width line start
- if( aMtrStartWidth.GetText() != aMtrStartWidth.GetSavedValue() )
+ if( aMtrStartWidth.GetText() != OUString(aMtrStartWidth.GetSavedValue()) )
{
XLineStartWidthItem aItem( GetCoreValue( aMtrStartWidth, ePoolUnit ) );
pOld = GetOldItem( rAttrs, XATTR_LINESTARTWIDTH );
@@ -879,7 +879,7 @@ sal_Bool SvxLineTabPage::FillItemSet( SfxItemSet& rAttrs )
}
}
// Width line end
- if( aMtrEndWidth.GetText() != aMtrEndWidth.GetSavedValue() )
+ if( aMtrEndWidth.GetText() != OUString(aMtrEndWidth.GetSavedValue()) )
{
XLineEndWidthItem aItem( GetCoreValue( aMtrEndWidth, ePoolUnit ) );
pOld = GetOldItem( rAttrs, XATTR_LINEENDWIDTH );
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 4718ec5d13c8..6108aaaa5606 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -222,13 +222,13 @@ void SvxLineDefTabPage::CheckChanges_Impl()
// is here used to NOT lose changes
//XDashStyle eXDS;
- if( aNumFldNumber1.GetText() != aNumFldNumber1.GetSavedValue() ||
- aMtrLength1.GetText() != aMtrLength1.GetSavedValue() ||
+ if( aNumFldNumber1.GetText() != OUString(aNumFldNumber1.GetSavedValue()) ||
+ aMtrLength1.GetText() != OUString(aMtrLength1.GetSavedValue()) ||
aLbType1.GetSelectEntryPos() != aLbType1.GetSavedValue() ||
- aNumFldNumber2.GetText() != aNumFldNumber2.GetSavedValue() ||
- aMtrLength2.GetText() != aMtrLength2.GetSavedValue() ||
+ aNumFldNumber2.GetText() != OUString(aNumFldNumber2.GetSavedValue()) ||
+ aMtrLength2.GetText() != OUString(aMtrLength2.GetSavedValue()) ||
aLbType2.GetSelectEntryPos() != aLbType2.GetSavedValue() ||
- aMtrDistance.GetText() != aMtrDistance.GetSavedValue() )
+ aMtrDistance.GetText() != OUString(aMtrDistance.GetSavedValue()) )
{
ResMgr& rMgr = CUI_MGR();
Image aWarningBoxImage = WarningBox::GetStandardImage();
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index 0bd39fe8f1ef..18ae6c65d725 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -131,7 +131,7 @@ namespace dbmm
void SaveDBDocPage::impl_updateLocationDependentItems()
{
updateDialogTravelUI();
- m_aStartMigration.Show( m_aSaveAsLocation.GetText().Len() > 0 );
+ m_aStartMigration.Show( !m_aSaveAsLocation.GetText().isEmpty() );
}
//--------------------------------------------------------------------
@@ -172,7 +172,7 @@ namespace dbmm
if ( !MacroMigrationPage::canAdvance() )
return false;
- return m_aSaveAsLocation.GetText().Len() > 0;
+ return !m_aSaveAsLocation.GetText().isEmpty();
}
//--------------------------------------------------------------------
diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx
index be08a4104981..9ed5523e1552 100644
--- a/dbaccess/source/ui/control/curledit.cxx
+++ b/dbaccess/source/ui/control/curledit.cxx
@@ -67,14 +67,14 @@ String OConnectionURLEdit::GetTextNoPrefix() const
}
//-------------------------------------------------------------------------
-void OConnectionURLEdit::SetText(const String& _rStr)
+void OConnectionURLEdit::SetText(const OUString& _rStr)
{
Selection aNoSelection(0,0);
SetText(_rStr, aNoSelection);
}
//-------------------------------------------------------------------------
-void OConnectionURLEdit::SetText(const String& _rStr, const Selection& /*_rNewSelection*/)
+void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/)
{
// create new sub controls, if necessary
if (!GetSubEdit())
@@ -90,7 +90,7 @@ void OConnectionURLEdit::SetText(const String& _rStr, const Selection& /*_rNewSe
m_pForcedPrefix->Show(m_bShowPrefix);
- sal_Bool bIsEmpty = 0 == _rStr.Len();
+ sal_Bool bIsEmpty = _rStr.isEmpty();
// calc the prefix
String sPrefix;
if (!bIsEmpty)
@@ -126,7 +126,7 @@ void OConnectionURLEdit::SetText(const String& _rStr, const Selection& /*_rNewSe
}
//-------------------------------------------------------------------------
-String OConnectionURLEdit::GetText() const
+OUString OConnectionURLEdit::GetText() const
{
if ( m_pForcedPrefix )
return m_pForcedPrefix->GetText() += Edit::GetText();
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 4154c280e403..feee0a084aab 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -204,7 +204,7 @@ IMPL_LINK(OSqlEdit, ModifyHdl, void*, /*EMPTYTAG*/)
return 0;
}
-void OSqlEdit::SetText(const String& rNewText)
+void OSqlEdit::SetText(const OUString& rNewText)
{
DBG_CHKTHIS(OSqlEdit,NULL);
if (m_timerUndoActionCreation.IsActive())
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 8bac6979cff1..9193dbc8533e 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -391,16 +391,16 @@ DBG_NAME(OConnectionHelper)
String OConnectionHelper::impl_getURL( sal_Bool _bPrefix ) const
{
// get the pure text
- String sURL = _bPrefix ? m_aConnectionURL.GetText() : m_aConnectionURL.GetTextNoPrefix();
+ OUString sURL = _bPrefix ? m_aConnectionURL.GetText() : OUString(m_aConnectionURL.GetTextNoPrefix());
OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" );
- if ( m_pCollection && sURL.Len() )
+ if ( m_pCollection && !sURL.isEmpty() )
{
if ( m_pCollection->isFileSystemBased( m_eType ) )
{
// get the two parts: prefix and file URL
- String sTypePrefix, sFileURLDecoded;
+ OUString sTypePrefix, sFileURLDecoded;
if ( _bPrefix )
{
sTypePrefix = m_pCollection->getPrefix( m_eType );
@@ -412,7 +412,7 @@ DBG_NAME(OConnectionHelper)
}
sURL = sTypePrefix;
- if ( sFileURLDecoded.Len() )
+ if ( !sFileURLDecoded.isEmpty() )
{
OFileNotation aFileNotation( sFileURLDecoded, OFileNotation::N_SYSTEM );
sURL += String( aFileNotation.get( OFileNotation::N_URL ) );
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index eb33e8e6f028..2076a1c46311 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -252,7 +252,7 @@ namespace dbaui
m_aJavaDriverLabel.Show(bEnableJDBC);
m_aJavaDriver.Show(bEnableJDBC);
m_aTestJavaDriver.Show(bEnableJDBC);
- m_aTestJavaDriver.Enable( m_aJavaDriver.GetText().Len() != 0);
+ m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().isEmpty() );
m_aFL3.Show(bEnableJDBC);
checkTestConnection();
@@ -291,7 +291,7 @@ namespace dbaui
{
sal_Bool bChangedSomething = sal_False;
- if (m_aUserName.GetText() != m_aUserName.GetSavedValue())
+ if (m_aUserName.GetText() != OUString(m_aUserName.GetSavedValue()))
{
_rSet.Put(SfxStringItem(DSID_USER, m_aUserName.GetText()));
_rSet.Put(SfxStringItem(DSID_PASSWORD, String()));
@@ -316,7 +316,7 @@ namespace dbaui
sal_Bool bSuccess = sal_False;
try
{
- if ( m_aJavaDriver.GetText().Len() )
+ if ( !m_aJavaDriver.GetText().isEmpty() )
{
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( Reference<XMultiServiceFactory>(m_pAdminDialog->getORB()->getServiceManager(), UNO_QUERY_THROW) );
bSuccess = ::connectivity::existsJavaClassByName(xJVM,m_aJavaDriver.GetText());
@@ -338,7 +338,7 @@ namespace dbaui
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
if ( m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC )
- bEnableTestConnection = bEnableTestConnection && (m_aJavaDriver.GetText().Len() != 0);
+ bEnableTestConnection = bEnableTestConnection && (!m_aJavaDriver.GetText().isEmpty());
m_aTestConnection.Enable(bEnableTestConnection);
return true;
}
@@ -346,7 +346,7 @@ namespace dbaui
IMPL_LINK(OConnectionTabPage, OnEditModified, Edit*, _pEdit)
{
if ( _pEdit == &m_aJavaDriver )
- m_aTestJavaDriver.Enable( m_aJavaDriver.GetText().Len() != 0 );
+ m_aTestJavaDriver.Enable( !m_aJavaDriver.GetText().isEmpty() );
checkTestConnection();
// tell the listener we were modified
diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
index f84b37c1b89c..ef5cd570d584 100644
--- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
+++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx
@@ -182,7 +182,7 @@ DBG_NAME(OTextConnectionPageSetup)
fillString(_rSet,&m_aETBaseDN,DSID_CONN_LDAP_BASEDN, bChangedSomething);
fillInt32(_rSet,&m_aNFPortNumber,DSID_CONN_LDAP_PORTNUMBER,bChangedSomething);
- if ( m_aETHostServer.GetText() != m_aETHostServer.GetSavedValue() )
+ if ( m_aETHostServer.GetText() != OUString(m_aETHostServer.GetSavedValue()) )
{
DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rSet.GetItem(DSID_TYPECOLLECTION));
::dbaccess::ODsnTypeCollection* pCollection = NULL;
@@ -239,7 +239,7 @@ DBG_NAME(OTextConnectionPageSetup)
// -----------------------------------------------------------------------
IMPL_LINK(OLDAPConnectionPageSetup, OnEditModified, Edit*, /*_pEdit*/)
{
- sal_Bool bRoadmapState = ((m_aETHostServer.GetText().Len() != 0 ) && ( m_aETBaseDN.GetText().Len() != 0 ) && (m_aFTPortNumber.GetText().Len() != 0 ));
+ sal_Bool bRoadmapState = ((!m_aETHostServer.GetText().isEmpty() ) && ( !m_aETBaseDN.GetText().isEmpty() ) && (!m_aFTPortNumber.GetText().isEmpty() ));
SetRoadmapStateValue(bRoadmapState);
callModifiedHdl();
return 0L;
@@ -535,14 +535,14 @@ DBG_NAME(OMySQLIntroPageSetup)
OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
// to get the correct value when saveValue was called by base class
- if ( !m_aETDriverClass.GetText().Len() )
+ if ( m_aETDriverClass.GetText().isEmpty() )
{
m_aETDriverClass.SetText(m_sDefaultJdbcDriverName);
m_aETDriverClass.SetModifyFlag();
}
callModifiedHdl();
- sal_Bool bRoadmapState = ((m_aETDatabasename.GetText().Len() != 0 ) && ( m_aETHostname.GetText().Len() != 0 ) && (m_aNFPortNumber.GetText().Len() != 0 ) && ( m_aETDriverClass.GetText().Len() != 0 ));
+ sal_Bool bRoadmapState = ((!m_aETDatabasename.GetText().isEmpty() ) && (!m_aETHostname.GetText().isEmpty()) && (!m_aNFPortNumber.GetText().isEmpty() ) && ( !m_aETDriverClass.GetText().isEmpty() ));
SetRoadmapStateValue(bRoadmapState);
}
@@ -554,7 +554,7 @@ DBG_NAME(OMySQLIntroPageSetup)
sal_Bool bSuccess = sal_False;
try
{
- if ( m_aETDriverClass.GetText().Len() )
+ if ( !m_aETDriverClass.GetText().isEmpty() )
{
// TODO change jvmaccess
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( uno::Reference<lang::XMultiServiceFactory>(m_pAdminDialog->getORB()->getServiceManager(), uno::UNO_QUERY_THROW) );
@@ -576,8 +576,8 @@ DBG_NAME(OMySQLIntroPageSetup)
IMPL_LINK(OGeneralSpecialJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit)
{
if ( _pEdit == &m_aETDriverClass )
- m_aPBTestJavaDriver.Enable( m_aETDriverClass.GetText().Len() != 0 );
- sal_Bool bRoadmapState = ((m_aETDatabasename.GetText().Len() != 0 ) && ( m_aETHostname.GetText().Len() != 0 ) && (m_aNFPortNumber.GetText().Len() != 0 ) && ( m_aETDriverClass.GetText().Len() != 0 ));
+ m_aPBTestJavaDriver.Enable( !m_aETDriverClass.GetText().isEmpty() );
+ sal_Bool bRoadmapState = ((!m_aETDatabasename.GetText().isEmpty() ) && ( !m_aETHostname.GetText().isEmpty() ) && (!m_aNFPortNumber.GetText().isEmpty() ) && ( !m_aETDriverClass.GetText().isEmpty() ));
SetRoadmapStateValue(bRoadmapState);
callModifiedHdl();
return 0L;
@@ -662,7 +662,7 @@ DBG_NAME(OMySQLIntroPageSetup)
{
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
sal_Bool bEnableTestConnection = !m_aConnectionURL.IsVisible() || (m_aConnectionURL.GetTextNoPrefix().Len() != 0);
- bEnableTestConnection = bEnableTestConnection && (m_aETDriverClass.GetText().Len() != 0);
+ bEnableTestConnection = bEnableTestConnection && (!m_aETDriverClass.GetText().isEmpty());
return bEnableTestConnection;
}
@@ -674,7 +674,7 @@ DBG_NAME(OMySQLIntroPageSetup)
sal_Bool bSuccess = sal_False;
try
{
- if ( m_aETDriverClass.GetText().Len() )
+ if ( !m_aETDriverClass.GetText().isEmpty() )
{
// TODO change jvmaccess
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( uno::Reference<lang::XMultiServiceFactory>(m_pAdminDialog->getORB()->getServiceManager(), uno::UNO_QUERY_THROW) );
@@ -695,7 +695,7 @@ DBG_NAME(OMySQLIntroPageSetup)
IMPL_LINK(OJDBCConnectionPageSetup, OnEditModified, Edit*, _pEdit)
{
if ( _pEdit == &m_aETDriverClass )
- m_aPBTestJavaDriver.Enable( m_aETDriverClass.GetText().Len() != 0 );
+ m_aPBTestJavaDriver.Enable( !m_aETDriverClass.GetText().isEmpty() );
SetRoadmapStateValue(checkTestConnection());
// tell the listener we were modified
callModifiedHdl();
@@ -825,7 +825,7 @@ DBG_NAME(OAuthentificationPageSetup)
{
sal_Bool bChangedSomething = sal_False;
- if (m_aETUserName.GetText() != m_aETUserName.GetSavedValue())
+ if (m_aETUserName.GetText() != OUString(m_aETUserName.GetSavedValue()))
{
_rSet.Put(SfxStringItem(DSID_USER, m_aETUserName.GetText()));
_rSet.Put(SfxStringItem(DSID_PASSWORD, String()));
diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
index ff38363b20f5..f979b51d4a14 100644
--- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx
@@ -300,7 +300,7 @@ DBG_NAME(OTextConnectionHelper)
aErrorText.SearchAndReplaceAscii("#1",m_aFieldSeparatorLabel.GetText());
pErrorWin = &m_aFieldSeparator;
}
- else if (!m_aDecimalSeparator.GetText().Len())
+ else if (m_aDecimalSeparator.GetText().isEmpty())
{ // No DecimalSeparator
aErrorText = String(ModuleRes(STR_AUTODELIMITER_MISSING));
aErrorText.SearchAndReplaceAscii("#1",m_aDecimalSeparatorLabel.GetText());
@@ -386,25 +386,25 @@ DBG_NAME(OTextConnectionHelper)
if ( ( m_nAvailableSections & TC_SEPARATORS ) != 0 )
{
- if( m_aFieldSeparator.GetText() != m_aFieldSeparator.GetSavedValue() )
+ if( m_aFieldSeparator.GetText() != OUString(m_aFieldSeparator.GetSavedValue()) )
{
rSet.Put( SfxStringItem(DSID_FIELDDELIMITER, GetSeparator( m_aFieldSeparator, m_aFieldSeparatorList) ) );
bChangedSomething = sal_True;
}
- if( m_aTextSeparator.GetText() != m_aTextSeparator.GetSavedValue() )
+ if( m_aTextSeparator.GetText() != OUString(m_aTextSeparator.GetSavedValue()) )
{
rSet.Put( SfxStringItem(DSID_TEXTDELIMITER, GetSeparator( m_aTextSeparator, m_aTextSeparatorList) ) );
bChangedSomething = sal_True;
}
- if( m_aDecimalSeparator.GetText() != m_aDecimalSeparator.GetSavedValue() )
+ if( m_aDecimalSeparator.GetText() != OUString(m_aDecimalSeparator.GetSavedValue()) )
{
- rSet.Put( SfxStringItem(DSID_DECIMALDELIMITER, m_aDecimalSeparator.GetText().Copy(0, 1) ) );
+ rSet.Put( SfxStringItem(DSID_DECIMALDELIMITER, m_aDecimalSeparator.GetText().copy(0, 1) ) );
bChangedSomething = sal_True;
}
- if( m_aThousandsSeparator.GetText() != m_aThousandsSeparator.GetSavedValue() )
+ if( m_aThousandsSeparator.GetText() != OUString(m_aThousandsSeparator.GetSavedValue()) )
{
- rSet.Put( SfxStringItem(DSID_THOUSANDSDELIMITER, m_aThousandsSeparator.GetText().Copy(0,1) ) );
+ rSet.Put( SfxStringItem(DSID_THOUSANDSDELIMITER, m_aThousandsSeparator.GetText().copy(0,1) ) );
bChangedSomething = sal_True;
}
}
@@ -453,7 +453,7 @@ DBG_NAME(OTextConnectionHelper)
xub_StrLen nPos(rBox.GetEntryPos( rBox.GetText() ));
if( nPos == COMBOBOX_ENTRY_NOTFOUND )
- return rBox.GetText().Copy(0);
+ return rBox.GetText().copy(0);
if ( !( &m_aTextSeparator == &rBox && nPos == (rBox.GetEntryCount()-1) ) )
return rtl::OUString(
diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx
index a79399a009fc..a0d074e87aa9 100644
--- a/dbaccess/source/ui/dlg/UserAdmin.cxx
+++ b/dbaccess/source/ui/dlg/UserAdmin.cxx
@@ -122,7 +122,7 @@ IMPL_LINK_NOARG(OPasswordDialog, OKHdl_Impl)
// -----------------------------------------------------------------------------
IMPL_LINK( OPasswordDialog, ModifiedHdl, Edit *, pEdit )
{
- aOKBtn.Enable(pEdit->GetText().Len() != 0);
+ aOKBtn.Enable(!pEdit->GetText().isEmpty());
return 0;
}
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index 097cde222c66..250a431d6f86 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -272,23 +272,23 @@ namespace dbaui
//--------------------------------------------------------------------
bool MySQLNativeSettings::canAdvance() const
{
- if ( m_aDatabaseName.GetText().Len() == 0 )
+ if ( m_aDatabaseName.GetText().isEmpty() )
return false;
if ( m_aHostPortRadio.IsChecked()
- && ( ( m_aHostName.GetText().Len() == 0 )
- || ( m_aPort.GetText().Len() == 0 )
+ && ( ( m_aHostName.GetText().isEmpty() )
+ || ( m_aPort.GetText().isEmpty() )
)
)
return false;
#ifdef UNX
if ( ( m_aSocketRadio.IsChecked() )
- && ( m_aSocket.GetText().Len() == 0 )
+ && ( m_aSocket.GetText().isEmpty() )
)
#else
if ( ( m_aNamedPipeRadio.IsChecked() )
- && ( m_aNamedPipe.GetText().Len() == 0 )
+ && ( m_aNamedPipe.GetText().isEmpty() )
)
#endif
return false;
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index f0e4af33ac97..fcdb61c091c8 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -237,7 +237,7 @@ namespace dbaui
// -----------------------------------------------------------------------
void OGenericAdministrationPage::fillString(SfxItemSet& _rSet,Edit* _pEdit,sal_uInt16 _nID,sal_Bool& _bChangedSomething)
{
- if( (_pEdit != NULL) && (_pEdit->GetText() != _pEdit->GetSavedValue()) )
+ if( (_pEdit != NULL) && (_pEdit->GetText() != OUString(_pEdit->GetSavedValue())) )
{
_rSet.Put(SfxStringItem(_nID, _pEdit->GetText()));
_bChangedSomething = sal_True;
diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx
index ff3e679c97da..45831a6d99c9 100644
--- a/dbaccess/source/ui/dlg/detailpages.cxx
+++ b/dbaccess/source/ui/dlg/detailpages.cxx
@@ -609,7 +609,7 @@ namespace dbaui
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
// to get the correcxt value when saveValue was called by base class
- if ( m_bUseClass && !m_aEDDriverClass.GetText().Len() )
+ if ( m_bUseClass && m_aEDDriverClass.GetText().isEmpty() )
{
m_aEDDriverClass.SetText(m_sDefaultJdbcDriverName);
m_aEDDriverClass.SetModifyFlag();
@@ -624,7 +624,7 @@ namespace dbaui
sal_Bool bSuccess = sal_False;
try
{
- if ( m_aEDDriverClass.GetText().Len() )
+ if ( !m_aEDDriverClass.GetText().isEmpty() )
{
// TODO change jvmaccess
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( Reference<XMultiServiceFactory>(m_pAdminDialog->getORB()->getServiceManager(), UNO_QUERY_THROW) );
@@ -645,7 +645,7 @@ namespace dbaui
IMPL_LINK(OGeneralSpecialJDBCDetailsPage, OnEditModified, Edit*, _pEdit)
{
if ( m_bUseClass && _pEdit == &m_aEDDriverClass )
- m_aTestJavaDriver.Enable( m_aEDDriverClass.GetText().Len() != 0 );
+ m_aTestJavaDriver.Enable( !m_aEDDriverClass.GetText().isEmpty() );
// tell the listener we were modified
callModifiedHdl();
@@ -705,7 +705,7 @@ namespace dbaui
bChangedSomething |= m_aMySQLSettings.FillItemSet( _rSet );
- if ( m_aUserName.GetText() != m_aUserName.GetSavedValue() )
+ if ( m_aUserName.GetText() != OUString(m_aUserName.GetSavedValue()) )
{
_rSet.Put( SfxStringItem( DSID_USER, m_aUserName.GetText() ) );
_rSet.Put( SfxStringItem( DSID_PASSWORD, String()));
diff --git a/dbaccess/source/ui/dlg/directsql.cxx b/dbaccess/source/ui/dlg/directsql.cxx
index 2f57720b2591..9ce1968fed68 100644
--- a/dbaccess/source/ui/dlg/directsql.cxx
+++ b/dbaccess/source/ui/dlg/directsql.cxx
@@ -356,7 +356,7 @@ DBG_NAME(DirectSQLDialog)
//--------------------------------------------------------------------
IMPL_LINK( DirectSQLDialog, OnStatementModified, void*, /*NOTINTERESTEDIN*/ )
{
- m_aExecute.Enable(0 != m_aSQL.GetText().Len());
+ m_aExecute.Enable(!m_aSQL.GetText().isEmpty());
return 0L;
}
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index b3258add6b31..bcb599f97952 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -355,7 +355,7 @@ IMPL_LINK(OSaveAsDlg, ButtonClickHdl, Button *, pButton)
IMPL_LINK(OSaveAsDlg, EditModifyHdl, Edit *, pEdit )
{
if (pEdit == &m_pImpl->m_aTitle)
- m_pImpl->m_aPB_OK.Enable(0 != m_pImpl->m_aTitle.GetText().Len());
+ m_pImpl->m_aPB_OK.Enable(!m_pImpl->m_aTitle.GetText().isEmpty());
return 0;
}
// -----------------------------------------------------------------------------
@@ -429,7 +429,7 @@ void OSaveAsDlg::implInit()
}
// -----------------------------------------------------------------------------
String OSaveAsDlg::getName() const { return m_pImpl->m_aName; }
-String OSaveAsDlg::getCatalog() const { return m_pImpl->m_aCatalog.IsVisible() ? m_pImpl->m_aCatalog.GetText() : String(); }
-String OSaveAsDlg::getSchema() const { return m_pImpl->m_aSchema.IsVisible() ? m_pImpl->m_aSchema.GetText() : String(); }
+String OSaveAsDlg::getCatalog() const { return m_pImpl->m_aCatalog.IsVisible() ? m_pImpl->m_aCatalog.GetText() : OUString(); }
+String OSaveAsDlg::getSchema() const { return m_pImpl->m_aSchema.IsVisible() ? m_pImpl->m_aSchema.GetText() : OUString(); }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/FieldControls.hxx b/dbaccess/source/ui/inc/FieldControls.hxx
index c571a111c8ca..2e1087836888 100644
--- a/dbaccess/source/ui/inc/FieldControls.hxx
+++ b/dbaccess/source/ui/inc/FieldControls.hxx
@@ -48,7 +48,7 @@ namespace dbaui
public:
inline OPropColumnEditCtrl(Window* pParent, ::rtl::OUString& _rAllowedChars, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
- inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); }
+ inline sal_Bool IsModified() const { return GetText() != OUString(GetSavedValue()); }
short GetPos() const { return m_nPos; }
String GetHelp() const { return m_strHelpText; }
@@ -80,7 +80,7 @@ namespace dbaui
inline OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
inline OPropEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1);
- inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); }
+ inline sal_Bool IsModified() const { return GetText() != OUString(GetSavedValue()); }
short GetPos() const { return m_nPos; }
String GetHelp() const { return m_strHelpText; }
@@ -115,7 +115,7 @@ namespace dbaui
inline OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, short nPosition = -1, WinBits nWinStyle = 0);
inline OPropNumericEditCtrl(Window* pParent, sal_uInt16 nHelpId, const ResId& _rRes,short nPosition = -1);
- inline sal_Bool IsModified() const { return GetText() != GetSavedValue(); }
+ inline sal_Bool IsModified() const { return GetText() != OUString(GetSavedValue()); }
short GetPos() const { return m_nPos; }
String GetHelp() const { return m_strHelpText; }
diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx
index 522a1e880eef..981d790b8dc4 100644
--- a/dbaccess/source/ui/inc/curledit.hxx
+++ b/dbaccess/source/ui/inc/curledit.hxx
@@ -51,9 +51,9 @@ public:
public:
// Edit overridables
- virtual void SetText(const String& _rStr);
- virtual void SetText(const String& _rStr, const Selection& _rNewSelection);
- virtual String GetText() const;
+ virtual void SetText(const OUString& _rStr);
+ virtual void SetText(const OUString& _rStr, const Selection& _rNewSelection);
+ virtual OUString GetText() const;
/** Showsthe Prefix
diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx
index a4ac1a39f523..50a5dcb60860 100644
--- a/dbaccess/source/ui/inc/sqledit.hxx
+++ b/dbaccess/source/ui/inc/sqledit.hxx
@@ -70,7 +70,7 @@ namespace dbaui
virtual ~OSqlEdit();
// Edit overridables
- virtual void SetText(const String& rNewText);
+ virtual void SetText(const OUString& rNewText);
using MultiLineEditSyntaxHighlight::SetText;
// own functionality
diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx
index 6e16280bbd99..5205c7ece933 100644
--- a/dbaccess/source/ui/misc/WCPage.cxx
+++ b/dbaccess/source/ui/misc/WCPage.cxx
@@ -167,7 +167,7 @@ sal_Bool OCopyTable::LeavePage()
{
DBG_CHKTHIS(OCopyTable,NULL);
m_pParent->m_bCreatePrimaryKeyColumn = (m_bPKeyAllowed && m_aCB_PrimaryColumn.IsEnabled()) ? m_aCB_PrimaryColumn.IsChecked() : sal_False;
- m_pParent->m_aKeyName = m_pParent->m_bCreatePrimaryKeyColumn ? m_edKeyName.GetText() : String();
+ m_pParent->m_aKeyName = m_pParent->m_bCreatePrimaryKeyColumn ? m_edKeyName.GetText() : OUString();
m_pParent->setUseHeaderLine( m_aCB_UseHeaderLine.IsChecked() );
// first check if the table already exists in the database
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index a55ee7ba7fe7..d9ec94d7be7e 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -355,7 +355,7 @@ IMPL_LINK( OWizTypeSelect, ButtonClickHdl, Button *, /*pButton*/ )
DBG_CHKTHIS(OWizTypeSelect,NULL);
sal_Int32 nBreakPos;
m_pParent->CheckColumns(nBreakPos);
- fillColumnList(m_etAuto.GetText().ToInt32());
+ fillColumnList(m_etAuto.GetText().toInt32());
ActivatePage();
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx
index 0eb4b128c01b..48e236c160e7 100644
--- a/editeng/inc/editeng/editeng.hxx
+++ b/editeng/inc/editeng/editeng.hxx
@@ -244,7 +244,7 @@ public:
const Size& GetMaxAutoPaperSize() const;
void SetMaxAutoPaperSize( const Size& rSz );
- String GetText( LineEnd eEnd = LINEEND_LF ) const;
+ OUString GetText( LineEnd eEnd = LINEEND_LF ) const;
String GetText( const ESelection& rSelection, const LineEnd eEnd = LINEEND_LF ) const;
sal_uInt32 GetTextLen() const;
sal_uInt32 GetTextHeight() const;
@@ -272,7 +272,7 @@ public:
ESelection GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const;
void Clear();
- void SetText( const String& rStr );
+ void SetText( const OUString& rStr );
EditTextObject* CreateTextObject();
EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 );
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 6a42c910ee67..762fcaf8b479 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -606,7 +606,7 @@ void EditEngine::SetMaxAutoPaperSize( const Size& rSz )
pImpEditEngine->SetMaxAutoPaperSize( rSz );
}
-XubString EditEngine::GetText( LineEnd eEnd ) const
+OUString EditEngine::GetText( LineEnd eEnd ) const
{
DBG_CHKTHIS( EditEngine, 0 );
return pImpEditEngine->GetEditDoc().GetText( eEnd );
@@ -1528,11 +1528,11 @@ void EditEngine::Clear()
pImpEditEngine->Clear();
}
-void EditEngine::SetText( const XubString& rText )
+void EditEngine::SetText( const OUString& rText )
{
DBG_CHKTHIS( EditEngine, 0 );
pImpEditEngine->SetText( rText );
- if ( rText.Len() )
+ if ( !rText.isEmpty() )
pImpEditEngine->FormatAndUpdate();
}
diff --git a/editeng/source/editeng/editundo.hxx b/editeng/source/editeng/editundo.hxx
index dbd0e4e3e671..0b1ed791add7 100644
--- a/editeng/source/editeng/editundo.hxx
+++ b/editeng/source/editeng/editundo.hxx
@@ -262,7 +262,7 @@ public:
EditUndoTransliteration(EditEngine* pEE, const ESelection& rESel, sal_Int32 nMode);
virtual ~EditUndoTransliteration();
- void SetText( const String& rText ) { aText = rText; }
+ void SetText( const OUString& rText ) { aText = rText; }
void SetText( EditTextObject* pObj ) { pTxtObj = pObj; }
void SetNewSelection( const ESelection& rSel ) { aNewESel = rSel; }
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx
index bc34737151e5..aa5d46d146c0 100644
--- a/extensions/source/abpilot/abpfinalpage.cxx
+++ b/extensions/source/abpilot/abpfinalpage.cxx
@@ -182,8 +182,8 @@ namespace abp
void FinalPage::implCheckName()
{
sal_Bool bValidName = isValidName();
- sal_Bool bEmptyName = 0 == m_aName.GetText().Len();
- sal_Bool bEmptyLocation = 0 == m_aLocation.GetText().Len();
+ sal_Bool bEmptyName = m_aName.GetText().isEmpty();
+ sal_Bool bEmptyLocation = m_aLocation.GetText().isEmpty();
// enable or disable the finish button
getDialog()->enableButtons( WZB_FINISH, !bEmptyLocation && (!m_aRegisterName.IsChecked() || bValidName) );
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index 904c1c1c2ec1..36ddee11b6f3 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -319,7 +319,7 @@ namespace dbp
{
sal_Bool bHaveSome = (0 != m_aExistingRadios.GetEntryCount());
sal_Bool bSelectedSome = (0 != m_aExistingRadios.GetSelectEntryCount());
- sal_Bool bUnfinishedInput = (0 != m_aRadioName.GetText().Len());
+ sal_Bool bUnfinishedInput = (!m_aRadioName.GetText().isEmpty());
m_aMoveLeft.Enable(bSelectedSome);
m_aMoveRight.Enable(bUnfinishedInput);
diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx
index bbcf8f06d9c1..dfe7c9640122 100644
--- a/extensions/source/propctrlr/inspectorhelpwindow.cxx
+++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx
@@ -52,7 +52,7 @@ namespace pcr
}
//--------------------------------------------------------------------
- void InspectorHelpWindow::SetText( const XubString& _rStr )
+ void InspectorHelpWindow::SetText( const OUString& _rStr )
{
m_aHelpText.SetText( _rStr );
}
diff --git a/extensions/source/propctrlr/inspectorhelpwindow.hxx b/extensions/source/propctrlr/inspectorhelpwindow.hxx
index 886240696221..0bb2eaee3152 100644
--- a/extensions/source/propctrlr/inspectorhelpwindow.hxx
+++ b/extensions/source/propctrlr/inspectorhelpwindow.hxx
@@ -42,7 +42,7 @@ namespace pcr
public:
InspectorHelpWindow( Window* _pParent );
- virtual void SetText( const XubString& rStr );
+ virtual void SetText( const OUString& rStr );
void SetLimits( sal_Int32 _nMinLines, sal_Int32 _nMaxLines );
long GetMinimalHeightPixel();
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index a9f6f9bca84c..eb01b058d209 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -96,7 +96,7 @@ namespace pcr
Any SAL_CALL OTimeControl::getValue() throw (RuntimeException)
{
Any aPropValue;
- if ( getTypedControlWindow()->GetText().Len()>0 )
+ if ( !getTypedControlWindow()->GetText().isEmpty() )
{
::Time aTime( getTypedControlWindow()->GetTime() );
util::Time aUNOTime( aTime.Get100Sec(), aTime.GetSec(), aTime.GetMin(), aTime.GetHour() );
@@ -150,7 +150,7 @@ namespace pcr
Any SAL_CALL ODateControl::getValue() throw (RuntimeException)
{
Any aPropValue;
- if ( getTypedControlWindow()->GetText().Len() > 0 )
+ if ( !getTypedControlWindow()->GetText().isEmpty() )
{
::Date aDate( getTypedControlWindow()->GetDate() );
util::Date aUNODate( aDate.GetDay(), aDate.GetMonth(), aDate.GetYear() );
@@ -294,7 +294,7 @@ namespace pcr
Any SAL_CALL ODateTimeControl::getValue() throw (RuntimeException)
{
Any aPropValue;
- if ( getTypedControlWindow()->GetText().Len() )
+ if ( !getTypedControlWindow()->GetText().isEmpty() )
{
double nValue = getTypedControlWindow()->GetValue();
@@ -387,7 +387,7 @@ namespace pcr
bool HyperlinkInput::impl_textHitTest( const ::Point& _rWindowPos )
{
xub_StrLen nPos = GetCharPos( _rWindowPos );
- return ( ( nPos != STRING_LEN ) && ( nPos < GetText().Len() ) );
+ return ( ( nPos != STRING_LEN ) && ( nPos < GetText().getLength() ) );
}
//--------------------------------------------------------------------
@@ -631,7 +631,7 @@ namespace pcr
Any SAL_CALL ONumericControl::getValue() throw (RuntimeException)
{
Any aPropValue;
- if ( getTypedControlWindow()->GetText().Len() )
+ if ( !getTypedControlWindow()->GetText().isEmpty() )
{
double nValue = impl_fieldValueToApiValue_nothrow( getTypedControlWindow()->GetValue( m_eValueUnit ) );
aPropValue <<= nValue;
@@ -1217,7 +1217,7 @@ namespace pcr
m_pFloatingEdit->Show();
m_pFloatingEdit->getEdit()->GrabFocus();
- m_pFloatingEdit->getEdit()->SetSelection(Selection(m_pFloatingEdit->getEdit()->GetText().Len()));
+ m_pFloatingEdit->getEdit()->SetSelection(Selection(m_pFloatingEdit->getEdit()->GetText().getLength()));
m_bDropdown=sal_True;
if ( m_nOperationMode == eMultiLineText )
m_pFloatingEdit->getEdit()->SetText( m_pImplEdit->GetText() );
diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx
index 6f82fd2cc6bd..7f23e6a00ad7 100644
--- a/extensions/source/propctrlr/usercontrol.cxx
+++ b/extensions/source/propctrlr/usercontrol.cxx
@@ -155,7 +155,7 @@ namespace pcr
Any SAL_CALL OFormatSampleControl::getValue() throw (RuntimeException)
{
Any aPropValue;
- if ( getTypedControlWindow()->GetText().Len() )
+ if ( !getTypedControlWindow()->GetText().isEmpty() )
aPropValue <<= (sal_Int32)getTypedControlWindow()->GetFormatKey();
return aPropValue;
}
@@ -201,7 +201,7 @@ namespace pcr
Any SAL_CALL OFormattedNumericControl::getValue() throw (RuntimeException)
{
Any aPropValue;
- if ( getTypedControlWindow()->GetText().Len() )
+ if ( !getTypedControlWindow()->GetText().isEmpty() )
aPropValue <<= (double)getTypedControlWindow()->GetValue();
return aPropValue;
}
@@ -297,7 +297,7 @@ namespace pcr
Any SAL_CALL OFileUrlControl::getValue() throw (RuntimeException)
{
Any aPropValue;
- if ( getTypedControlWindow()->GetText().Len() )
+ if ( !getTypedControlWindow()->GetText().isEmpty() )
aPropValue <<= (::rtl::OUString)getTypedControlWindow()->GetURL();
return aPropValue;
}
diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx
index 870209fb7bd2..8713b6703c77 100644
--- a/filter/source/pdf/impdialog.cxx
+++ b/filter/source/pdf/impdialog.cxx
@@ -667,7 +667,7 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* paParent )
paParent->mbUseLosslessCompression = maRbLosslessCompression.IsChecked();
paParent->mnQuality = static_cast<sal_Int32>(maNfQuality.GetValue());
paParent->mbReduceImageResolution = maCbReduceImageResolution.IsChecked();
- paParent->mnMaxImageResolution = maCoReduceImageResolution.GetText().ToInt32();
+ paParent->mnMaxImageResolution = maCoReduceImageResolution.GetText().toInt32();
paParent->mbExportNotes = maCbExportNotes.IsChecked();
if ( mbIsPresentation )
paParent->mbExportNotesPages = maCbExportNotesPages.IsChecked();
diff --git a/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx b/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx
index f8b868cc7c35..1848a2f38066 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagebasic.cxx
@@ -86,16 +86,16 @@ bool XMLFilterTabPageBasic::FillInfo( filter_info_impl* pInfo )
{
if( pInfo )
{
- if( maEDFilterName.GetText().Len() )
+ if( !maEDFilterName.GetText().isEmpty() )
pInfo->maFilterName = maEDFilterName.GetText();
- if( maCBApplication.GetText().Len() )
+ if( !maCBApplication.GetText().isEmpty() )
pInfo->maDocumentService = maCBApplication.GetText();
- if( maEDInterfaceName.GetText().Len() )
+ if( !maEDInterfaceName.GetText().isEmpty() )
pInfo->maInterfaceName = maEDInterfaceName.GetText();
- if( maEDExtension.GetText().Len() )
+ if( !maEDExtension.GetText().isEmpty() )
pInfo->maExtension = checkExtensions( maEDExtension.GetText() );
pInfo->maComment = string_encode( maEDDescription.GetText() );
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index 6d29a19c2ce5..a356a7ff6a6b 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -685,7 +685,7 @@ namespace frm
//---------------------------------------------------------------------
void RecordPositionInput::FirePosition( sal_Bool _bForce )
{
- if ( _bForce || ( GetText() != GetSavedValue() ) )
+ if ( _bForce || ( GetText() != OUString(GetSavedValue()) ) )
{
sal_Int64 nRecord = GetValue();
if ( nRecord < GetMin() || nRecord > GetMax() )
@@ -707,7 +707,7 @@ namespace frm
//---------------------------------------------------------------------
void RecordPositionInput::KeyInput( const KeyEvent& rKeyEvent )
{
- if( rKeyEvent.GetKeyCode() == KEY_RETURN && GetText().Len() )
+ if( rKeyEvent.GetKeyCode() == KEY_RETURN && !GetText().isEmpty() )
FirePosition( sal_True );
else
NumericField::KeyInput( rKeyEvent );
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 409059335c30..dc58a5a6310b 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -549,7 +549,7 @@ xub_StrLen FormulaDlg_Impl::GetFunctionPos(xub_StrLen nPos)
{
if ( nBracketCount < 1 )
{
- nFuncPos= pMEdit->GetText().Len();
+ nFuncPos= pMEdit->GetText().getLength();
}
else if ( !bFlag )
{
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 19268a708c35..02c278403547 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -980,7 +980,7 @@ IMPL_STATIC_LINK( SvtFileDialog, OpenHdl_Impl, void*, pVoid )
return 0; // MBA->PB: seems to be called never ?!
// get the URL from from the edit field ( if not empty )
- if ( pThis->_pImp->_pEdFileName->GetText().Len() )
+ if ( !pThis->_pImp->_pEdFileName->GetText().isEmpty() )
{
String aText = pThis->_pImp->_pEdFileName->GetText();
@@ -2458,7 +2458,7 @@ std::vector<OUString> SvtFileDialog::GetPathList() const
if ( ! pEntry )
{
- if ( _pImp->_pEdFileName->GetText().Len() && _bIsInExecute )
+ if ( !_pImp->_pEdFileName->GetText().isEmpty() && _bIsInExecute )
aList.push_back(_pImp->_pEdFileName->GetURL());
else
aList.push_back(_aPath);
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 0b0b4765a7ff..3bf232c9cdb4 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1055,7 +1055,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars()
// Set generic title for add-on toolbar
SolarMutexGuard aGuard;
Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow->GetText().Len() == 0 )
+ if ( pWindow->GetText().isEmpty() )
pWindow->SetText( aGenericAddonTitle );
if ( pWindow->GetType() == WINDOW_TOOLBOX )
{
diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx
index e5c0b3b1f128..f62c7c5ff2ae 100644
--- a/framework/source/services/license.cxx
+++ b/framework/source/services/license.cxx
@@ -458,7 +458,7 @@ IMPL_LINK_NOARG(LicenseDialog, AcceptBtnHdl)
void LicenseDialog::EnableControls()
{
if( !bEndReached &&
- ( aLicenseML.IsEndReached() || !aLicenseML.GetText().Len() ) )
+ ( aLicenseML.IsEndReached() || aLicenseML.GetText().isEmpty() ) )
bEndReached = sal_True;
if ( bEndReached )
diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx
index 524396c92a44..88dc3f30c906 100644
--- a/framework/source/uielement/comboboxtoolbarcontroller.cxx
+++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx
@@ -243,7 +243,7 @@ long ComboboxToolbarController::PreNotify( NotifyEvent& rNEvt )
if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN )
{
// Call execute only with non-empty text
- if ( m_pComboBox->GetText().Len() > 0 )
+ if ( !m_pComboBox->GetText().isEmpty() )
execute( rKeyCode.GetModifier() );
return 1;
}
diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx
index 4cafbe5f2cb0..beea47f79a9e 100644
--- a/framework/source/uielement/edittoolbarcontroller.cxx
+++ b/framework/source/uielement/edittoolbarcontroller.cxx
@@ -206,7 +206,7 @@ long EditToolbarController::PreNotify( NotifyEvent& rNEvt )
if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN )
{
// Call execute only with non-empty text
- if ( m_pEditControl->GetText().Len() > 0 )
+ if ( !m_pEditControl->GetText().isEmpty() )
execute( rKeyCode.GetModifier() );
return 1;
}
diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
index dca6e186b78d..cc15f3fe19bb 100644
--- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx
+++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx
@@ -328,7 +328,7 @@ long SpinfieldToolbarController::PreNotify( NotifyEvent& rNEvt )
if(( rKeyCode.GetModifier() | rKeyCode.GetCode()) == KEY_RETURN )
{
// Call execute only with non-empty text
- if ( m_pSpinfieldControl->GetText().Len() > 0 )
+ if ( !m_pSpinfieldControl->GetText().isEmpty() )
execute( rKeyCode.GetModifier() );
return 1;
}
diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx
index e8b5941b77bb..85372dff4a40 100644
--- a/padmin/source/adddlg.cxx
+++ b/padmin/source/adddlg.cxx
@@ -346,7 +346,7 @@ APNamePage::~APNamePage()
bool APNamePage::check()
{
- return m_aNameEdt.GetText().Len();
+ return !m_aNameEdt.GetText().isEmpty();
}
void APNamePage::fill( PrinterInfo& rInfo )
@@ -455,7 +455,7 @@ IMPL_LINK( APCommandPage, ModifyHdl, ComboBox*, pBox )
{
if( pBox == &m_aCommandBox )
{
- m_pParent->enableNext( m_aCommandBox.GetText().Len() );
+ m_pParent->enableNext( !m_aCommandBox.GetText().isEmpty() );
}
return 0;
}
diff --git a/padmin/source/cmddlg.cxx b/padmin/source/cmddlg.cxx
index ba0691e3122d..17e386332ab7 100644
--- a/padmin/source/cmddlg.cxx
+++ b/padmin/source/cmddlg.cxx
@@ -323,7 +323,7 @@ void RTSCommandPage::save()
String aFeatures;
sal_Int32 nIndex = 0;
- String aOldPdfPath;
+ OUString aOldPdfPath;
bool bOldFaxSwallow = false;
bool bFaxSwallow = m_aFaxSwallowBox.IsChecked() ? true : false;
bool bExternalDialog = m_aExternalCB.IsChecked() ? true : false;
@@ -531,7 +531,7 @@ void RTSCommandPage::UpdateCommands()
void RTSCommandPage::ConnectCommand()
{
- String aString( m_aConnectedTo.GetText().GetToken( 0, ':' ) );
+ String aString( m_aConnectedTo.GetText().getToken( 0, ':' ) );
aString.AppendAscii( ": " );
aString += m_aCommandsCB.GetText();
diff --git a/padmin/source/newppdlg.cxx b/padmin/source/newppdlg.cxx
index cc642ebdac1e..e99eaeb6ae04 100644
--- a/padmin/source/newppdlg.cxx
+++ b/padmin/source/newppdlg.cxx
@@ -82,7 +82,7 @@ PPDImportDialog::PPDImportDialog( Window* pParent ) :
m_aPathBox.SetSelectHdl( LINK( this, PPDImportDialog, SelectHdl ) );
m_aPathBox.SetModifyHdl( LINK( this, PPDImportDialog, ModifyHdl ) );
- if( m_aPathBox.GetText().Len() )
+ if( !m_aPathBox.GetText().isEmpty() )
Import();
}
diff --git a/padmin/source/titlectrl.cxx b/padmin/source/titlectrl.cxx
index 8361b7d925aa..5d2cfb50a984 100644
--- a/padmin/source/titlectrl.cxx
+++ b/padmin/source/titlectrl.cxx
@@ -67,7 +67,7 @@ void TitleImage::Paint( const Rectangle& )
// -----------------------------------------------------------------------
-void TitleImage::SetText( const String& rText )
+void TitleImage::SetText( const OUString& rText )
{
m_aText = rText;
m_bArranged = false;
diff --git a/padmin/source/titlectrl.hxx b/padmin/source/titlectrl.hxx
index 46586177fc12..8ed66cbe132b 100644
--- a/padmin/source/titlectrl.hxx
+++ b/padmin/source/titlectrl.hxx
@@ -46,8 +46,8 @@ public:
void SetImage( const Image& rImage );
const Image& GetImage() const { return m_aImage; }
- virtual void SetText( const String& rText );
- virtual String GetText() const { return m_aText; }
+ virtual void SetText( const OUString& rText );
+ virtual OUString GetText() const { return m_aText; }
void SetBackgroundColor( const Color& rColor );
const Color& GetBackgroundColor() const { return m_aBGColor; }
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index 8fbd4987e889..ed0944ac4668 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -714,7 +714,7 @@ void Condition::setConditionIndex( size_t _nCondIndex, size_t _nCondCount )
// -----------------------------------------------------------------------------
bool Condition::isEmpty() const
{
- return m_aCondLHS.GetText().Len() == 0;
+ return m_aCondLHS.GetText().isEmpty();
}
// =============================================================================
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 7b29560b2787..4173f7de49c4 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -257,7 +257,7 @@ sal_Int8 OFieldExpressionControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt
if ( IsEditing() )
{
sal_uInt16 nPos = m_pComboCell->GetSelectEntryPos();
- if ( COMBOBOX_ENTRY_NOTFOUND != nPos || m_pComboCell->GetText().Len() )
+ if ( COMBOBOX_ENTRY_NOTFOUND != nPos || !m_pComboCell->GetText().isEmpty() )
SaveModified();
DeactivateCell();
}
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index f1bc875946e7..14bc01063820 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -260,7 +260,7 @@ void OStartMarker::showRuler(sal_Bool _bShow)
//------------------------------------------------------------------------------
void OStartMarker::RequestHelp( const HelpEvent& rHEvt )
{
- if( m_aText.GetText().Len())
+ if( !m_aText.GetText().isEmpty())
{
// Hilfe anzeigen
Rectangle aItemRect(rHEvt.GetMousePosPixel(),Size(GetSizePixel().Width(),getMinHeight()));
diff --git a/sc/inc/editutil.hxx b/sc/inc/editutil.hxx
index 5fbf6dc8eb1c..3bdbb322ebae 100644
--- a/sc/inc/editutil.hxx
+++ b/sc/inc/editutil.hxx
@@ -144,7 +144,7 @@ public:
SfxItemSet* pDefaults, sal_Bool bTakeOwnership = sal_True );
/// Overwritten method to be able to apply defaults already set
- void SetText( const String& rText );
+ void SetText( const OUString& rText );
/// Current defaults are not applied, new defaults are applied
void SetTextNewDefaults( const String& rText,
const SfxItemSet& rDefaults, sal_Bool bRememberCopy = sal_True );
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 016124f28bf2..b8053731f187 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -405,7 +405,7 @@ void ScEditEngineDefaulter::SetTextNewDefaults( const EditTextObject& rTextObjec
}
-void ScEditEngineDefaulter::SetText( const String& rText )
+void ScEditEngineDefaulter::SetText( const OUString& rText )
{
sal_Bool bUpdateMode = GetUpdateMode();
if ( bUpdateMode )
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 7ece5d92f669..64be1b4ea7cb 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -678,12 +678,12 @@ void ScInputWindow::SetFormulaMode( sal_Bool bSet )
aTextWindow.SetFormulaMode(bSet);
}
-void ScInputWindow::SetText( const String& rString )
+void ScInputWindow::SetText( const OUString& rString )
{
ToolBox::SetText(rString);
}
-String ScInputWindow::GetText() const
+OUString ScInputWindow::GetText() const
{
return ToolBox::GetText();
}
@@ -1373,7 +1373,7 @@ void ScMultiTextWnd::InitEditEngine()
pEditEngine->SetUpdateMode( sal_True );
// aString ist die Wahrheit...
- if ( bFilled && pEditEngine->GetText() == aString )
+ if ( bFilled && pEditEngine->GetText() == OUString(aString) )
Invalidate(); // Repaint fuer (hinterlegte) Felder
else
pEditEngine->SetText(aString); // dann wenigstens den richtigen Text
@@ -1665,7 +1665,7 @@ void ScTextWnd::LoseFocus()
{
}
-String ScTextWnd::GetText() const
+OUString ScTextWnd::GetText() const
{
// ueberladen, um per Testtool an den Text heranzukommen
@@ -1754,7 +1754,7 @@ void ScTextWnd::StartEditEngine()
pEditEngine->SetUpdateMode( sal_True );
// aString ist die Wahrheit...
- if ( bFilled && pEditEngine->GetText() == aString )
+ if ( bFilled && pEditEngine->GetText() == OUString(aString) )
Invalidate(); // Repaint fuer (hinterlegte) Felder
else
pEditEngine->SetText(aString); // dann wenigstens den richtigen Text
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx
index 642acfcffb50..5062beec2c28 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -141,11 +141,11 @@ void ScAbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
pDlg->SetInputSet( pInSet );
}
//From class Window.
-void ScAbstractTabDialog_Impl::SetText( const XubString& rStr )
+void ScAbstractTabDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String ScAbstractTabDialog_Impl::GetText() const
+OUString ScAbstractTabDialog_Impl::GetText() const
{
return pDlg->GetText();
}
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index b51439b44d9a..2bcebbd2b83e 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -378,8 +378,8 @@ class ScAbstractTabDialog_Impl : public SfxAbstractTabDialog
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
//------------------------------------------------------------------------
diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx
index 353b50ba29b1..45303e61c341 100644
--- a/sc/source/ui/condformat/colorformat.cxx
+++ b/sc/source/ui/condformat/colorformat.cxx
@@ -268,7 +268,7 @@ IMPL_LINK_NOARG( ScDataBarSettingsDlg, TypeSelectHdl )
else
{
maEdMin.Enable();
- if(!maEdMin.GetText().Len())
+ if(maEdMin.GetText().isEmpty())
{
if(nSelectMin == COLORSCALE_PERCENTILE || nSelectMin == COLORSCALE_PERCENT)
maEdMin.SetText(OUString::number(50));
@@ -283,7 +283,7 @@ IMPL_LINK_NOARG( ScDataBarSettingsDlg, TypeSelectHdl )
else
{
maEdMax.Enable();
- if(!maEdMax.GetText().Len())
+ if(maEdMax.GetText().isEmpty())
{
if(nSelectMax == COLORSCALE_PERCENTILE || nSelectMax == COLORSCALE_PERCENT)
maEdMax.SetText(OUString::number(50));
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index a3d367a17a53..b8c8bbb1fcd0 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -459,7 +459,7 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, PushButton*, pBtn )
Close();
else if ( pBtn == &aBtnAdd )
{
- if ( aEdDataArea.GetText().Len() > 0 )
+ if ( !aEdDataArea.GetText().isEmpty() )
{
String aNewEntry( aEdDataArea.GetText() );
ScArea** ppAreas = NULL;
diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx
index 452e0dedcfad..24a1fcefd8d9 100644
--- a/sc/source/ui/dbgui/dbnamdlg.cxx
+++ b/sc/source/ui/dbgui/dbnamdlg.cxx
@@ -595,13 +595,13 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl)
IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl)
{
- String theName = aEdName.GetText();
+ OUString theName = aEdName.GetText();
sal_Bool bNameFound = (COMBOBOX_ENTRY_NOTFOUND
!= aEdName.GetEntryPos( theName ));
- if ( theName.Len() == 0 )
+ if ( theName.isEmpty() )
{
- if ( aBtnAdd.GetText() != aStrAdd )
+ if ( aBtnAdd.GetText() != OUString(aStrAdd) )
aBtnAdd.SetText( aStrAdd );
aBtnAdd .Disable();
aBtnRemove .Disable();
@@ -624,7 +624,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl)
{
if ( bNameFound )
{
- if ( aBtnAdd.GetText() != aStrModify )
+ if ( aBtnAdd.GetText() != OUString(aStrModify) )
aBtnAdd.SetText( aStrModify );
if(!bSaved)
@@ -636,13 +636,13 @@ IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl)
}
else
{
- if ( aBtnAdd.GetText() != aStrAdd )
+ if ( aBtnAdd.GetText() != OUString(aStrAdd) )
aBtnAdd.SetText( aStrAdd );
bSaved=false;
pSaveObj->Restore();
- if ( aEdAssign.GetText().Len() > 0 )
+ if ( !aEdAssign.GetText().isEmpty() )
{
aBtnAdd.Enable();
aBtnHeader.Enable();
diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx
index 5bd76bdb92dc..dce0015bfda7 100644
--- a/sc/source/ui/dbgui/fieldwnd.cxx
+++ b/sc/source/ui/dbgui/fieldwnd.cxx
@@ -581,9 +581,10 @@ void ScDPFieldControlBase::DrawBackground( OutputDevice& rDev )
xub_StrLen nTokenCnt = comphelper::string::getTokenCount(GetText(), '\n');
long nY = (aSize.Height() - nTokenCnt * rDev.GetTextHeight()) / 2;
- for( xub_StrLen nToken = 0, nStringIx = 0; nToken < nTokenCnt; ++nToken )
+ sal_Int32 nStringIx = 0;
+ for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken )
{
- String aLine( GetText().GetToken( 0, '\n', nStringIx ) );
+ String aLine( GetText().getToken( 0, '\n', nStringIx ) );
Point aLinePos( (aSize.Width() - rDev.GetCtrlTextWidth( aLine )) / 2, nY );
rDev.DrawCtrlText( aLinePos, aLine );
nY += rDev.GetTextHeight();
diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx
index d39c2581ee41..cfa4d4e2e3fa 100644
--- a/sc/source/ui/dbgui/scuiasciiopt.cxx
+++ b/sc/source/ui/dbgui/scuiasciiopt.cxx
@@ -670,7 +670,7 @@ IMPL_LINK( ScImportAsciiDlg, SeparatorHdl, Control*, pCtrl )
if( (pCtrl == &aCkbOther) && aCkbOther.IsChecked() )
aEdOther.GrabFocus();
else if( pCtrl == &aEdOther )
- aCkbOther.Check( aEdOther.GetText().Len() > 0 );
+ aCkbOther.Check( !aEdOther.GetText().isEmpty() );
String aOldFldSeps( maFieldSeparators);
maFieldSeparators = GetSeparators();
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index f150d0f8d287..cec8377d8f66 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -103,7 +103,7 @@ protected:
virtual void StartDrag( sal_Int8 nAction, const Point& rPosPixel );
- virtual String GetText() const;
+ virtual OUString GetText() const;
void ImplInitSettings();
void UpdateAutoCorrFlag();
@@ -283,8 +283,8 @@ public:
virtual void MouseMove( const MouseEvent& rMEvt );
bool IsMultiLineInput() { return mbIsMultiLine; }
protected:
- virtual void SetText( const String& rString );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rString );
+ virtual OUString GetText() const;
bool UseSubTotal( ScRangeList* pRangeList ) const;
bool IsPointerAtResizePos();
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 60b67f805ea1..f0ff15580490 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -920,7 +920,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl)
aRangeStr = aLbRange.GetSelectEntry();
}
else if ( nSelectPos > 2 && nSelectPos < nCnt && aRangeStr.Len()
- && aRangeStr == aEdAssign.GetText() )
+ && OUString(aRangeStr) == aEdAssign.GetText() )
{ // nach oben wandern statt nach unten auf die vorherige Position
nSelectPos -= 2;
aLbRange.SelectEntryPos( nSelectPos );
@@ -938,9 +938,9 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl)
}
else
{
- if ( aEdAssign.GetText().Len() > 0 )
+ if ( !aEdAssign.GetText().isEmpty() )
{
- if ( aEdAssign2.GetText().Len() > 0 )
+ if ( !aEdAssign2.GetText().isEmpty() )
aBtnAdd.Enable();
else
aBtnAdd.Disable();
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index d87d5527a861..36fe4096c95d 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -292,7 +292,7 @@ IMPL_LINK_NOARG(ScDataFormDlg, Impl_NewHdl)
boost::ptr_vector<Edit>::iterator itr = maEdits.begin(), itrEnd = maEdits.end();
for(; itr != itrEnd; ++itr)
if (!boost::is_null(itr))
- if ( (*itr).GetText().Len() != 0 )
+ if ( !(*itr).GetText().isEmpty() )
{
bHasData = true;
break;
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index 6882eeaa8a5a..06f540b1e0ea 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -655,7 +655,7 @@ IMPL_LINK_NOARG(ScOptSolverDlg, TargetModifyHdl)
{
// modify handler for the target edit:
// select "Value of" if something is input into the edit
- if ( maEdTargetValue.GetText().Len() )
+ if ( !maEdTargetValue.GetText().isEmpty() )
maRbValue.Check();
return 0;
}
diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx
index 5245fd25d184..8a96e0ecc728 100644
--- a/sc/source/ui/miscdlgs/simpref.cxx
+++ b/sc/source/ui/miscdlgs/simpref.cxx
@@ -193,7 +193,7 @@ void ScSimpleRefDlg::StartRefInput()
if ( bMultiSelection )
{
// initially select the whole string, so it gets replaced by default
- aEdAssign.SetSelection( Selection( 0, aEdAssign.GetText().Len() ) );
+ aEdAssign.SetSelection( Selection( 0, aEdAssign.GetText().getLength() ) );
}
aRbAssign.DoRef();
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index be313f895a70..b5d051ea7e18 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -252,10 +252,10 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn )
// bzw. Einfachreferenz bei beidem?
// 3. Ist mindestens Zeile oder Spalte und Formel voll?
- if (aEdFormulaRange.GetText().Len() == 0)
+ if (aEdFormulaRange.GetText().isEmpty())
nError = TABOPERR_NOFORMULA;
- else if (aEdRowCell.GetText().Len() == 0 &&
- aEdColCell.GetText().Len() == 0)
+ else if (aEdRowCell.GetText().isEmpty() &&
+ aEdColCell.GetText().isEmpty())
nError = TABOPERR_NOCOLROW;
else if ( !lcl_Parse( aEdFormulaRange.GetText(), pDoc, nCurTab,
theFormulaCell, theFormulaEnd ) )
@@ -263,21 +263,21 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn )
else
{
const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
- if (aEdRowCell.GetText().Len() > 0)
+ if (!aEdRowCell.GetText().isEmpty())
{
if (!ConvertSingleRef( pDoc, aEdRowCell.GetText(), nCurTab,
theRowCell, eConv ))
nError = TABOPERR_WRONGROW;
else
{
- if (aEdColCell.GetText().Len() == 0 &&
+ if (aEdColCell.GetText().isEmpty() &&
theFormulaCell.Col() != theFormulaEnd.Col())
nError = TABOPERR_NOCOLFORMULA;
else
nMode = 1;
}
}
- if (aEdColCell.GetText().Len() > 0)
+ if (!aEdColCell.GetText().isEmpty())
{
if (!ConvertSingleRef( pDoc, aEdColCell.GetText(), nCurTab,
theColCell, eConv ))
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index 5020b9ce1b7d..14b7b8800747 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -89,7 +89,7 @@ sal_Bool ScTpDefaultsOptions::FillItemSet(SfxItemSet &rCoreSet)
OUString aSheetPrefix = aEdSheetPrefix.GetText();
- if ( aEdNSheets.GetSavedValue() != aEdNSheets.GetText()
+ if ( OUString(aEdNSheets.GetSavedValue()) != aEdNSheets.GetText()
|| static_cast<OUString>(aEdSheetPrefix.GetSavedValue()) != aSheetPrefix )
{
aOpt.SetInitTabCount( nTabCount );
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 800ab6234928..37cd3d62d57b 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -115,8 +115,8 @@ void ScTpFormulaOptions::OnFocusSeparatorInput(Edit* pEdit)
return;
// Make sure the entire text is selected.
- xub_StrLen nLen = pEdit->GetText().Len();
- Selection aSel(0, nLen);
+ sal_Int32 nLen = pEdit->GetText().getLength();
+ Selection aSel(0, (sal_uInt16)nLen);
pEdit->SetSelection(aSel);
maOldSepValue = pEdit->GetText();
}
diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx
index 95c9e760de47..e6b01070b393 100644
--- a/sc/source/ui/optdlg/tpusrlst.cxx
+++ b/sc/source/ui/optdlg/tpusrlst.cxx
@@ -744,7 +744,7 @@ IMPL_LINK( ScTpUserLists, EdEntriesModHdl, MultiLineEdit*, pEd )
aEdCopyFrom .Disable();
}
- if ( aEdEntries.GetText().Len() > 0 )
+ if ( !aEdEntries.GetText().isEmpty() )
{
if ( !bCancelMode && !bModifyMode )
{
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index cb7b49c787ce..f36e4a6f56e7 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -463,7 +463,7 @@ sal_Bool ScTpLayoutOptions::FillItemSet( SfxItemSet& rCoreSet )
bRet = sal_True;
}
- if(aTabMF.GetText() != aTabMF.GetSavedValue())
+ if(aTabMF.GetText() != OUString(aTabMF.GetSavedValue()))
{
rCoreSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP,
sal::static_int_cast<sal_uInt16>( aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP)) )));
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index f2b0f4910a7d..cc1b78b4c5ed 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -623,7 +623,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb )
// fill edit field according to list box selection
if( (nSelPos == 0) || (nSelPos == nAllSheetPos) )
pEd->SetText( EMPTY_STRING );
- else if( nSelPos == nUserDefPos && !pLb->IsTravelSelect() && pEd->GetText().Len() == 0 )
+ else if( nSelPos == nUserDefPos && !pLb->IsTravelSelect() && pEd->GetText().isEmpty())
pLb->SelectEntryPos( 0 );
else if( nSelPos >= nFirstCustomPos )
pEd->SetText( *static_cast< String* >( pLb->GetEntryData( nSelPos ) ) );
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index d2ee03d9e596..8e13cdeb4421 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -37,7 +37,7 @@
void EmptyNumericField::Modify()
{
- if( GetText().Len() )
+ if( !GetText().isEmpty() )
NumericField::Modify();
else
SetEmptyFieldValue();
@@ -335,7 +335,7 @@ sal_Bool ScTablePage::FillItemSet( SfxItemSet& rCoreSet )
if ( WAS_DEFAULT(nWhichPageNo,rOldSet)
&& ( (!bUseValue && bUseValue == aBtnPageNo.GetSavedValue())
|| ( bUseValue && bUseValue == aBtnPageNo.GetSavedValue()
- && aEdPageNo.GetText() == aEdPageNo.GetSavedValue() ) ) )
+ && aEdPageNo.GetText() == OUString(aEdPageNo.GetSavedValue()) ) ) )
{
rCoreSet.ClearItem( nWhichPageNo );
}
@@ -513,7 +513,7 @@ static sal_Bool lcl_PutScaleItem( sal_uInt16 nWhich,
{
sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
- (rEd.GetSavedValue() != rEd.GetText()) ||
+ (OUString(rEd.GetSavedValue()) != rEd.GetText()) ||
!WAS_DEFAULT( nWhich, rOldSet );
if( bDataChanged )
@@ -537,8 +537,8 @@ static sal_Bool lcl_PutScaleItem2( sal_uInt16 nWhich,
sal_uInt16 nValue2 = (sal_uInt16)rEd2.GetValue();
sal_Bool bIsSel = (rListBox.GetSelectEntryPos() == nLBEntry);
sal_Bool bDataChanged = (rListBox.GetSavedValue() != nLBEntry) ||
- (rEd1.GetSavedValue() != rEd1.GetText()) ||
- (rEd2.GetSavedValue() != rEd2.GetText()) ||
+ (OUString(rEd1.GetSavedValue()) != rEd1.GetText()) ||
+ (OUString(rEd2.GetSavedValue()) != rEd2.GetText()) ||
!WAS_DEFAULT( nWhich, rOldSet );
if( bDataChanged )
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 53dcf43b3a35..b3cde08b122b 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -102,7 +102,7 @@ public:
virtual void HideDeleteBtn() = 0;
virtual void SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY) = 0;
//from class ::Window
- virtual void SetText( const XubString& rStr ) = 0;
+ virtual void SetText( const OUString& rStr ) = 0;
};
class AbstractSdInsertLayerDlg : public VclAbstractDialog //add for SdInsertLayerDlg
diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx
index 71fb02415349..0560040d1ae5 100644
--- a/sd/source/filter/html/pubdlg.cxx
+++ b/sd/source/filter/html/pubdlg.cxx
@@ -1605,7 +1605,7 @@ String SdDesignNameDlg::GetDesignName()
IMPL_LINK_NOARG(SdDesignNameDlg, ModifyHdl)
{
- m_aBtnOK.Enable(m_aEdit.GetText().Len() != 0);
+ m_aBtnOK.Enable(!m_aEdit.GetText().isEmpty());
return 0;
}
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 64dc36ca170e..1dc4e74dcdcb 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -2062,7 +2062,7 @@ void CustomAnimationDurationTabPage::update( STLPropertySet* pSet )
// ---
nPos = mpCBRepeat->GetSelectEntryPos();
- if( (nPos != LISTBOX_ENTRY_NOTFOUND) || (mpCBRepeat->GetText().Len() != 0) )
+ if( (nPos != LISTBOX_ENTRY_NOTFOUND) || (!mpCBRepeat->GetText().isEmpty()) )
{
Any aRepeatCount;
Any aEnd;
diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx
index 7f4a51d933a6..8cb3b77e1c2c 100644
--- a/sd/source/ui/dlg/paragr.cxx
+++ b/sd/source/ui/dlg/paragr.cxx
@@ -97,7 +97,7 @@ sal_Bool SdParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
{
if(maNewStartCB.GetState() != maNewStartCB.GetSavedValue() ||
maNewStartNumberCB.GetState() != maNewStartNumberCB.GetSavedValue()||
- maNewStartNF.GetText() != maNewStartNF.GetSavedValue())
+ maNewStartNF.GetText() != OUString(maNewStartNF.GetSavedValue()))
{
mbModified = true;
sal_Bool bNewStartChecked = STATE_CHECK == maNewStartCB.GetState();
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index c42e17bf067e..e76b6e1283b1 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -114,11 +114,11 @@ void SdAbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
pDlg->SetInputSet( pInSet );
}
//From class Window.
-void SdAbstractTabDialog_Impl::SetText( const XubString& rStr )
+void SdAbstractTabDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String SdAbstractTabDialog_Impl::GetText() const
+OUString SdAbstractTabDialog_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -150,11 +150,11 @@ void AbstractBulletDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetInputSet( pInSet );
}
//From class Window.
-void AbstractBulletDialog_Impl::SetText( const XubString& rStr )
+void AbstractBulletDialog_Impl::SetText( const OUString& rStr )
{
static_cast< ::sd::OutlineBulletDlg*>(pDlg)->SetText( rStr );
}
-String AbstractBulletDialog_Impl::GetText() const
+OUString AbstractBulletDialog_Impl::GetText() const
{
return static_cast< ::sd::OutlineBulletDlg*>(pDlg)->GetText();
}
@@ -187,12 +187,12 @@ void SdPresLayoutTemplateDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
pDlg->SetInputSet( pInSet );
}
-void SdPresLayoutTemplateDlg_Impl::SetText( const XubString& rStr )
+void SdPresLayoutTemplateDlg_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String SdPresLayoutTemplateDlg_Impl::GetText() const
+OUString SdPresLayoutTemplateDlg_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -262,7 +262,7 @@ void AbstractSdSnapLineDlg_Impl::SetInputFields(sal_Bool bEnableX, sal_Bool bEna
{
pDlg->SetInputFields(bEnableX, bEnableY);
}
-void AbstractSdSnapLineDlg_Impl::SetText( const XubString& rStr )
+void AbstractSdSnapLineDlg_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
@@ -344,11 +344,11 @@ const SfxItemSet* SdAbstractSfxDialog_Impl::GetOutputItemSet() const
{
return pDlg->GetOutputItemSet();
}
-void SdAbstractSfxDialog_Impl::SetText( const XubString& rStr )
+void SdAbstractSfxDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String SdAbstractSfxDialog_Impl::GetText() const
+OUString SdAbstractSfxDialog_Impl::GetText() const
{
return pDlg->GetText();
}
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index d1c9ef7726e8..287f7a299a81 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -83,8 +83,8 @@ class SdAbstractTabDialog_Impl : public SfxAbstractTabDialog
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
//add for SdCharDlg end
@@ -100,8 +100,8 @@ class AbstractBulletDialog_Impl : public SfxAbstractTabDialog
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
//add for OutlineBulletDlg end
@@ -115,8 +115,8 @@ class SdPresLayoutTemplateDlg_Impl : public SfxAbstractTabDialog
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
// add for AssistentDlg
@@ -153,7 +153,7 @@ class AbstractSdSnapLineDlg_Impl : public AbstractSdSnapLineDlg
virtual void HideDeleteBtn();
virtual void SetInputFields(sal_Bool bEnableX, sal_Bool bEnableY);
//from class Window
- virtual void SetText( const XubString& rStr );
+ virtual void SetText( const OUString& rStr );
};
// add for SdInsertLayerDlg
@@ -216,8 +216,8 @@ class SdAbstractSfxDialog_Impl : public SfxAbstractDialog
{
DECL_ABSTDLG_BASE(SdAbstractSfxDialog_Impl,SfxModalDialog)
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
// add for SdVectorizeDlg
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 77960f056cc0..83c6d53a933b 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -444,7 +444,7 @@ sal_Bool SdTpOptionsMisc::FillItemSet( SfxItemSet& rAttrs )
}
// Tabulatorabstand
- if( aMtrFldTabstop.GetText() != aMtrFldTabstop.GetSavedValue() )
+ if( aMtrFldTabstop.GetText() != OUString(aMtrFldTabstop.GetSavedValue()) )
{
sal_uInt16 nWh = GetWhich( SID_ATTR_DEFTABSTOP );
SfxMapUnit eUnit = rAttrs.GetPool()->GetMetric( nWh );
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index 0f68a38e283c..ee6305474d9b 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -463,7 +463,7 @@ void FuInsertFile::InsTextOrRTFinDrMode(SfxMedium* pMedium)
sal_uLong nErr = pOutliner->Read( *pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes() );
- if (nErr || !pOutliner->GetEditEngine().GetText().Len())
+ if (nErr || pOutliner->GetEditEngine().GetText().isEmpty())
{
ErrorBox aErrorBox( mpWindow, (WinBits)WB_OK,
String(SdResId(STR_READ_DATA_ERROR)));
@@ -611,7 +611,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
sal_uLong nErr = pOutliner->Read(*pStream, pMedium->GetBaseURL(), nFormat, mpDocSh->GetHeaderAttributes());
- if (nErr || !pOutliner->GetEditEngine().GetText().Len())
+ if (nErr || pOutliner->GetEditEngine().GetText().isEmpty())
{
ErrorBox aErrorBox( mpWindow, (WinBits)WB_OK,
String(SdResId(STR_READ_DATA_ERROR)));
diff --git a/sfx2/inc/sfx2/controlwrapper.hxx b/sfx2/inc/sfx2/controlwrapper.hxx
index c6fb432d3012..0a429b906638 100644
--- a/sfx2/inc/sfx2/controlwrapper.hxx
+++ b/sfx2/inc/sfx2/controlwrapper.hxx
@@ -580,7 +580,7 @@ void NumericFieldWrapper< ValueT >::SetControlValue( ValueT nValue )
template< typename ValueT >
bool MetricFieldWrapper< ValueT >::IsControlDontKnow() const
{
- return this->GetControl().GetText().Len() == 0;
+ return this->GetControl().GetText().isEmpty();
}
template< typename ValueT >
diff --git a/sfx2/inc/sfx2/progress.hxx b/sfx2/inc/sfx2/progress.hxx
index 124e2293e01f..285360272d30 100644
--- a/sfx2/inc/sfx2/progress.hxx
+++ b/sfx2/inc/sfx2/progress.hxx
@@ -24,6 +24,7 @@
#include "sal/types.h"
#include <tools/solar.h>
#include <tools/link.hxx>
+#include <rtl/ustring.hxx>
class String;
class SfxObjectShell;
@@ -46,7 +47,7 @@ public:
sal_Bool bWait = sal_True );
virtual ~SfxProgress();
- virtual void SetText( const String& rText );
+ virtual void SetText( const OUString& rText );
sal_Bool SetStateText( sal_uIntPtr nVal, const String &rVal, sal_uIntPtr nNewRange = 0 );
virtual sal_Bool SetState( sal_uIntPtr nVal, sal_uIntPtr nNewRange = 0 );
sal_uIntPtr GetState() const { return nVal; }
diff --git a/sfx2/inc/sfx2/sfxdlg.hxx b/sfx2/inc/sfx2/sfxdlg.hxx
index d119eb772216..2f69d442495b 100644
--- a/sfx2/inc/sfx2/sfxdlg.hxx
+++ b/sfx2/inc/sfx2/sfxdlg.hxx
@@ -59,8 +59,8 @@ class SfxAbstractDialog : virtual public VclAbstractDialog
{
public:
virtual const SfxItemSet* GetOutputItemSet() const = 0;
- virtual void SetText( const XubString& rStr ) = 0;
- virtual String GetText() const = 0;
+ virtual void SetText( const OUString& rStr ) = 0;
+ virtual OUString GetText() const = 0;
};
class SfxAbstractTabDialog : virtual public SfxAbstractDialog
diff --git a/sfx2/inc/sfx2/titledockwin.hxx b/sfx2/inc/sfx2/titledockwin.hxx
index 923583e3404c..00131fcedd61 100644
--- a/sfx2/inc/sfx2/titledockwin.hxx
+++ b/sfx2/inc/sfx2/titledockwin.hxx
@@ -98,7 +98,7 @@ namespace sfx2
virtual void Resize();
virtual void StateChanged( StateChangedType i_nType );
virtual void DataChanged( const DataChangedEvent& i_rDataChangedEvent );
- virtual void SetText( const String& i_rText );
+ virtual void SetText( const OUString& i_rText );
// DockingWindow overridables
void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode );
@@ -129,7 +129,7 @@ namespace sfx2
void impl_scheduleLayout();
private:
- String m_sTitle;
+ OUString m_sTitle;
ToolBox m_aToolbox;
Window m_aContentWindow;
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index d81367d170fb..3c1dc236a823 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -110,9 +110,9 @@ String SvDDELinkEditDialog::GetCmd() const
IMPL_STATIC_LINK( SvDDELinkEditDialog, EditHdl_Impl, Edit *, pEdit )
{
(void)pEdit; // unused variable
- pThis->aOKButton1.Enable( pThis->aEdDdeApp.GetText().Len() &&
- pThis->aEdDdeTopic.GetText().Len() &&
- pThis->aEdDdeItem.GetText().Len() );
+ pThis->aOKButton1.Enable( !pThis->aEdDdeApp.GetText().isEmpty() &&
+ !pThis->aEdDdeTopic.GetText().isEmpty() &&
+ !pThis->aEdDdeItem.GetText().isEmpty() );
return 0;
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 755e6d6f50e2..9cbd3b254e0a 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -356,9 +356,9 @@ void SvBaseLink::_GetRealObject( sal_Bool bConnect)
if( OBJECT_CLIENT_DDE == nObjType )
{
- String sServer;
+ OUString sServer;
if( pImpl->m_pLinkMgr->GetDisplayNames( this, &sServer ) &&
- sServer == GetpApp()->GetAppName() ) // internal Link !!!
+ sServer == OUString(GetpApp()->GetAppName()) ) // internal Link !!!
{
// so that the Internal link can be created!
nObjType = OBJECT_INTERN;
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 0eca0918af27..34a53e7b1949 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1201,7 +1201,7 @@ String SearchTabPage_Impl::GetSelectEntry() const
void SearchTabPage_Impl::ClearPage()
{
ClearSearchResults();
- aSearchED.SetText( String() );
+ aSearchED.SetText( OUString() );
}
// -----------------------------------------------------------------------
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 0313fa255f2e..09345fe94626 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -213,10 +213,7 @@ void SfxProgress::Stop()
// -----------------------------------------------------------------------
-void SfxProgress::SetText
-(
- const String& /* new Text */
-)
+void SfxProgress::SetText( const OUString& /* new Text */)
/* [Description]
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index b50198744a09..bef196a7ac6c 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -762,13 +762,13 @@ SfxDocumentPage::SfxDocumentPage(Window* pParent, const SfxItemSet& rItemSet)
get(m_pFileValFt, "showlocation");
get(m_pShowSizeFT, "showsize");
m_aUnknownSize = m_pShowSizeFT->GetText();
- m_pShowSizeFT->SetText(OUString(""));
+ m_pShowSizeFT->SetText(OUString());
get(m_pCreateValFt, "showcreate");
get(m_pChangeValFt, "showmodify");
get(m_pSignedValFt, "showsigned");
m_aMultiSignedStr = m_pSignedValFt->GetText();
- m_pSignedValFt->SetText(OUString(""));
+ m_pSignedValFt->SetText(OUString());
get(m_pSignatureBtn, "signature");
get(m_pPrintValFt, "showprint");
get(m_pTimeLogValFt, "showedittime");
@@ -968,7 +968,7 @@ sal_Bool SfxDocumentPage::FillItemSet( SfxItemSet& rSet )
}
}
- if ( m_pNameED->IsModified() && m_pNameED->GetText().Len() )
+ if ( m_pNameED->IsModified() && !m_pNameED->GetText().isEmpty() )
{
rSet.Put( SfxStringItem( ID_FILETP_TITLE, m_pNameED->GetText() ) );
bRet = sal_True;
@@ -1415,7 +1415,7 @@ int SfxInternetPage::DeactivatePage( SfxItemSet* /*pSet*/ )
{
int nRet = LEAVE_PAGE;
- if ( eState == S_Forward && !m_pEDForwardURL->GetText().Len() )
+ if ( eState == S_Forward && m_pEDForwardURL->GetText().isEmpty() )
{
ErrorBox aErrBox( this, WB_OK, aForwardErrorMessg );
aErrBox.Execute();
diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx
index 39b4096138b0..b02eaad1c579 100644
--- a/sfx2/source/dialog/passwd.cxx
+++ b/sfx2/source/dialog/passwd.cxx
@@ -53,9 +53,9 @@ IMPL_LINK_INLINE_START( SfxPasswordDialog, EditModifyHdl, Edit *, pEdit )
}
}
- bool bEnable = mpPassword1ED->GetText().Len() >= mnMinLen;
+ bool bEnable = mpPassword1ED->GetText().getLength() >= mnMinLen;
if( mpPassword2ED->IsVisible() )
- bEnable = (bEnable && (mpPassword2ED->GetText().Len() >= mnMinLen));
+ bEnable = (bEnable && (mpPassword2ED->GetText().getLength() >= mnMinLen));
mpOKBtn->Enable( bEnable );
return 0;
}
@@ -73,7 +73,7 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl)
{
ErrorBox aBox( this, SfxResId( MSG_ERROR_WRONG_CONFIRM ) );
aBox.Execute();
- mpConfirm1ED->SetText( String() );
+ mpConfirm1ED->SetText( OUString() );
mpConfirm1ED->GrabFocus();
}
else
diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx
index d69b21c0020e..4f6fe256d60c 100644
--- a/sfx2/source/dialog/srchdlg.cxx
+++ b/sfx2/source/dialog/srchdlg.cxx
@@ -154,7 +154,7 @@ IMPL_LINK_NOARG(SearchDialog, ToggleHdl)
void SearchDialog::SetFocusOnEdit()
{
- Selection aSelection( 0, m_aSearchEdit.GetText().Len() );
+ Selection aSelection( 0, m_aSearchEdit.GetText().getLength() );
m_aSearchEdit.SetSelection( aSelection );
m_aSearchEdit.GrabFocus();
}
diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx
index f711b5061a01..02d7446e7ee9 100644
--- a/sfx2/source/dialog/titledockwin.cxx
+++ b/sfx2/source/dialog/titledockwin.cxx
@@ -88,10 +88,10 @@ namespace sfx2
}
//------------------------------------------------------------------------------------------------------------------
- void TitledDockingWindow::SetText( const String& i_rText )
+ void TitledDockingWindow::SetText( const OUString& i_rText )
{
SfxDockingWindow::SetText( i_rText );
- if ( m_sTitle.Len() == 0 )
+ if ( m_sTitle.isEmpty() )
// our text is used as title, too => repaint
Invalidate();
}
@@ -222,7 +222,7 @@ namespace sfx2
//------------------------------------------------------------------------------------------------------------------
String TitledDockingWindow::impl_getTitle() const
{
- return m_sTitle.Len() ? m_sTitle : GetText();
+ return !m_sTitle.isEmpty() ? m_sTitle : GetText();
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 784b5701798c..9aa0901c0b77 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -449,8 +449,8 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersi
FreeResource();
const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() );
- aDateTimeText.SetText( aDateTimeText.GetText().Append(ConvertDateTime_Impl( pInfo->aCreationDate, rLocaleWrapper )) );
- aSavedByText.SetText( aSavedByText.GetText().Append(pInfo->aAuthor) );
+ aDateTimeText.SetText( aDateTimeText.GetText() + ConvertDateTime_Impl( pInfo->aCreationDate, rLocaleWrapper ) );
+ aSavedByText.SetText( aSavedByText.GetText() + pInfo->aAuthor );
aEdit.SetText( rInfo.aComment );
aCloseButton.SetClickHdl ( LINK( this, SfxViewVersionDialog_Impl, ButtonHdl ) );
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx
index b5a561d0f85a..08c80509179d 100644
--- a/starmath/inc/document.hxx
+++ b/starmath/inc/document.hxx
@@ -185,8 +185,8 @@ public:
sal_Bool ReplaceBadChars();
void UpdateText();
- void SetText(const String& rBuffer);
- String& GetText() { return (aText); }
+ void SetText(const OUString& rBuffer);
+ OUString GetText() { return (OUString(aText)); }
void SetFormat(SmFormat& rFormat);
const SmFormat& GetFormat() { return (aFormat); }
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index be7b52d8c397..b24f9ec54bcd 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -97,8 +97,8 @@ public:
SfxItemPool * GetEditEngineItemPool();
// Window
- virtual void SetText(const XubString &rText);
- virtual String GetText() const;
+ virtual void SetText(const OUString &rText);
+ virtual OUString GetText() const;
virtual void GetFocus();
virtual void LoseFocus();
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index ae72f525adea..8f44185a65eb 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -532,7 +532,7 @@ void Test::testBinomInBinHor()
aCursor.InsertText("d");
sExpected.AppendAscii(" { { binom a b + c } + d } ");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Binom Node in BinHor Node", sExpected, xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Binom Node in BinHor Node", sExpected, String(xDocShRef->GetText()));
delete pTree;
}
@@ -563,7 +563,7 @@ void Test::testBinVerInUnary()
aCursor.InsertText("2");
sExpected.AppendAscii(" - { 1 over 2 } ");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Binary Vertical in Unary Operator", sExpected, xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Binary Vertical in Unary Operator", sExpected, String(xDocShRef->GetText()));
delete pTree;
}
@@ -641,7 +641,7 @@ void Test::testUnaryInMixedNumberAsNumerator()
aCursor.InsertText("4");
sExpected.AppendAscii(" { 2 { - 1 over 2 } + 4 } ");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("Unary in mixed number as Numerator", sExpected, xDocShRef->GetText());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Unary in mixed number as Numerator", sExpected, String(xDocShRef->GetText()));
delete pTree;
}
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index c0cc81f4203c..53b9b075ac1a 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -2044,7 +2044,7 @@ void SmSymDefineDialog::UpdateButtons()
&& aTmpSymbolName.equals(pOrigSymbol->GetName())
&& aFonts.GetSelectEntry().EqualsIgnoreCaseAscii(
pOrigSymbol->GetFace().GetName())
- && aStyles.GetText().EqualsIgnoreCaseAscii(
+ && aStyles.GetText().equalsIgnoreAsciiCase(
GetFontStyles().GetStyleName(pOrigSymbol->GetFace()))
&& aCharsetDisplay.GetSelectCharacter() == pOrigSymbol->GetCharacter();
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 632ce0ea76be..d62d5acec7c8 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -151,11 +151,11 @@ const String SmDocShell::GetComment() const
}
-void SmDocShell::SetText(const String& rBuffer)
+void SmDocShell::SetText(const OUString& rBuffer)
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmDocShell::SetText" );
- if (rBuffer != aText)
+ if (rBuffer != OUString(aText))
{
bool bIsEnabled = IsEnableSetModified();
if( bIsEnabled )
@@ -911,7 +911,7 @@ void SmDocShell::UpdateText()
if (pEditEngine && pEditEngine->IsModified())
{
- String aEngTxt( pEditEngine->GetText( LINEEND_LF ) );
+ OUString aEngTxt( pEditEngine->GetText( LINEEND_LF ) );
if (GetText() != aEngTxt)
SetText( aEngTxt );
}
@@ -1164,7 +1164,7 @@ void SmDocShell::Execute(SfxRequest& rReq)
case SID_TEXT:
{
const SfxStringItem& rItem = (const SfxStringItem&)rReq.GetArgs()->Get(SID_TEXT);
- if (GetText() != rItem.GetValue())
+ if (GetText() != OUString(rItem.GetValue()))
SetText(rItem.GetValue());
}
break;
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index b6d83e0f6e9f..4e4172349e13 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -598,7 +598,7 @@ void SmEditWindow::InitScrollBars()
}
-String SmEditWindow::GetText() const
+OUString SmEditWindow::GetText() const
{
String aText;
EditEngine *pEditEngine = const_cast< SmEditWindow* >(this)->GetEditEngine();
@@ -609,7 +609,7 @@ String SmEditWindow::GetText() const
}
-void SmEditWindow::SetText(const XubString& rText)
+void SmEditWindow::SetText(const OUString& rText)
{
EditEngine *pEditEngine = GetEditEngine();
OSL_ENSURE( pEditEngine, "EditEngine missing" );
@@ -686,7 +686,7 @@ bool SmEditWindow::IsAllSelected() const
sal_Int32 nParaCnt = pEditEngine->GetParagraphCount();
if (!(nParaCnt - 1))
{
- sal_uInt16 nTextLen = pEditEngine->GetText( LINEEND_LF ).Len();
+ sal_Int32 nTextLen = pEditEngine->GetText( LINEEND_LF ).getLength();
bRes = !eSelection.nStartPos && (eSelection.nEndPos == nTextLen - 1);
}
else
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index e006c1ccb016..306d92a26716 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -684,7 +684,7 @@ void SmEditController::StateChanged(sal_uInt16 nSID, SfxItemState eState, const
{
const SfxStringItem *pItem = PTR_CAST(SfxStringItem, pState);
- if ((pItem != NULL) && (rEdit.GetText() != pItem->GetValue()))
+ if ((pItem != NULL) && (rEdit.GetText() != OUString(pItem->GetValue())))
rEdit.SetText(pItem->GetValue());
SfxControllerItem::StateChanged (nSID, eState, pState);
}
@@ -1778,7 +1778,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SID_GETEDITTEXT:
if (pWin)
- if (pWin->GetText ().Len ()) GetDoc()->SetText( pWin->GetText() );
+ if (!pWin->GetText().isEmpty()) GetDoc()->SetText( pWin->GetText() );
break;
case SID_ATTR_ZOOM:
diff --git a/svtools/inc/svtools/ctrlbox.hxx b/svtools/inc/svtools/ctrlbox.hxx
index 2d6e6a2536d9..6b83e9fa1dce 100644
--- a/svtools/inc/svtools/ctrlbox.hxx
+++ b/svtools/inc/svtools/ctrlbox.hxx
@@ -472,7 +472,7 @@ public:
virtual void LoseFocus();
virtual void Modify();
- void SetText( const XubString& rText );
+ void SetText( const OUString& rText );
void Fill( const XubString& rName, const FontList* pList );
private:
@@ -481,7 +481,7 @@ private:
FontStyleBox& operator =( const FontStyleBox& );
};
-inline void FontStyleBox::SetText( const XubString& rText )
+inline void FontStyleBox::SetText( const OUString& rText )
{
aLastStyle = rText;
ComboBox::SetText( rText );
diff --git a/svtools/inc/svtools/editbrowsebox.hxx b/svtools/inc/svtools/editbrowsebox.hxx
index 9f99b4ea205c..c9299d363c0a 100644
--- a/svtools/inc/svtools/editbrowsebox.hxx
+++ b/svtools/inc/svtools/editbrowsebox.hxx
@@ -129,9 +129,9 @@ namespace svt
virtual Control& GetControl() = 0;
virtual String GetText( LineEnd aSeparator ) const = 0;
- virtual void SetText( const String& _rStr ) = 0;
+ virtual void SetText( const OUString& _rStr ) = 0;
- virtual sal_Bool IsReadOnly() const = 0;
+ virtual sal_Bool IsReadOnly() const = 0;
virtual void SetReadOnly( sal_Bool bReadOnly ) = 0;
virtual xub_StrLen GetMaxTextLen() const = 0;
@@ -165,7 +165,7 @@ namespace svt
virtual Control& GetControl();
virtual String GetText( LineEnd aSeparator ) const;
- virtual void SetText( const String& _rStr );
+ virtual void SetText( const OUString& _rStr );
virtual sal_Bool IsReadOnly() const;
virtual void SetReadOnly( sal_Bool bReadOnly );
diff --git a/svtools/inc/svtools/editimplementation.hxx b/svtools/inc/svtools/editimplementation.hxx
index 29318dd716c9..983bf6dae5e8 100644
--- a/svtools/inc/svtools/editimplementation.hxx
+++ b/svtools/inc/svtools/editimplementation.hxx
@@ -45,7 +45,7 @@ String GenericEditImplementation< EDIT >::GetText( LineEnd ) const
//----------------------------------------------------------------------
template <class EDIT>
-void GenericEditImplementation< EDIT >::SetText( const String& _rStr )
+void GenericEditImplementation< EDIT >::SetText( const OUString& _rStr )
{
m_rEdit.SetText( _rStr );
}
diff --git a/svtools/inc/svtools/editsyntaxhighlighter.hxx b/svtools/inc/svtools/editsyntaxhighlighter.hxx
index 4648511427dc..7f81ae6327ca 100644
--- a/svtools/inc/svtools/editsyntaxhighlighter.hxx
+++ b/svtools/inc/svtools/editsyntaxhighlighter.hxx
@@ -44,8 +44,8 @@ class SVT_DLLPUBLIC MultiLineEditSyntaxHighlight : public MultiLineEdit
~MultiLineEditSyntaxHighlight();
virtual void UpdateData();
- virtual void SetText(const String& rNewText);
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection )
+ virtual void SetText(const OUString& rNewText);
+ virtual void SetText( const OUString& rStr, const Selection& rNewSelection )
{ SetText( rStr ); SetSelection( rNewSelection ); }
Color GetColorValue(TokenTypes aToken);
diff --git a/svtools/inc/svtools/filectrl.hxx b/svtools/inc/svtools/filectrl.hxx
index d1b1eeee281c..c7fdd4262610 100644
--- a/svtools/inc/svtools/filectrl.hxx
+++ b/svtools/inc/svtools/filectrl.hxx
@@ -75,8 +75,8 @@ public:
void SetOpenDialog( sal_Bool bOpen ) { mbOpenDlg = bOpen; }
sal_Bool IsOpenDialog() const { return mbOpenDlg; }
- void SetText( const XubString& rStr );
- XubString GetText() const;
+ void SetText( const OUString& rStr );
+ OUString GetText() const;
rtl::OUString GetSelectedText() const { return maEdit.GetSelected(); }
void SetSelection( const Selection& rSelection ) { maEdit.SetSelection( rSelection ); }
diff --git a/svtools/inc/svtools/fmtfield.hxx b/svtools/inc/svtools/fmtfield.hxx
index 368f54adba6b..b7cbc165157b 100644
--- a/svtools/inc/svtools/fmtfield.hxx
+++ b/svtools/inc/svtools/fmtfield.hxx
@@ -179,8 +179,8 @@ public:
void TreatAsNumber(sal_Bool bDoSo) { m_bTreatAsNumber = bDoSo; }
public:
- virtual void SetText( const XubString& rStr );
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
+ virtual void SetText( const OUString& rStr );
+ virtual void SetText( const OUString& rStr, const Selection& rNewSelection );
// die folgenden Methoden sind interesant, wenn m_bTreatAsNumber auf sal_False sitzt
/** nehmen wir mal an, irgendjemand will das ganze schoene double-Handling gar nicht haben, sondern
@@ -244,7 +244,7 @@ protected:
// any aspect of the current format has changed
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat);
- void ImplSetTextImpl(const XubString& rNew, Selection* pNewSel);
+ void ImplSetTextImpl(const OUString& rNew, Selection* pNewSel);
void ImplSetValue(double dValue, sal_Bool bForce);
sal_Bool ImplGetValue(double& dNewVal);
diff --git a/svtools/inc/svtools/ivctrl.hxx b/svtools/inc/svtools/ivctrl.hxx
index 4bde111920ae..f06a53c6d24d 100644
--- a/svtools/inc/svtools/ivctrl.hxx
+++ b/svtools/inc/svtools/ivctrl.hxx
@@ -65,7 +65,7 @@ class SvxIconChoiceCtrlEntry
{
Image aImage;
- String aText;
+ OUString aText;
String aQuickHelpText;
void* pUserData;
@@ -116,8 +116,8 @@ public:
void SetImage ( const Image& rImage ) { aImage = rImage; }
Image GetImage () const { return aImage; }
- void SetText ( const String& rText ) { aText = rText; }
- String GetText () const { return aText; }
+ void SetText ( const OUString& rText ) { aText = rText; }
+ OUString GetText () const { return aText; }
String SVT_DLLPUBLIC GetDisplayText() const;
void SetQuickHelpText( const String& rText ) { aQuickHelpText = rText; }
String GetQuickHelpText() const { return aQuickHelpText; }
@@ -155,7 +155,7 @@ enum SvxIconChoiceCtrlColumnAlign
class SvxIconChoiceCtrlColumnInfo
{
- String aColText;
+ OUString aColText;
Image aColImage;
long nWidth;
SvxIconChoiceCtrlColumnAlign eAlignment;
@@ -167,13 +167,13 @@ public:
nWidth( nWd ), eAlignment( eAlign ), nSubItem( nSub ) {}
SvxIconChoiceCtrlColumnInfo( const SvxIconChoiceCtrlColumnInfo& );
- void SetText( const String& rText ) { aColText = rText; }
+ void SetText( const OUString& rText ) { aColText = rText; }
void SetImage( const Image& rImg ) { aColImage = rImg; }
void SetWidth( long nWd ) { nWidth = nWd; }
void SetAlignment( SvxIconChoiceCtrlColumnAlign eAlign ) { eAlignment = eAlign; }
void SetSubItem( sal_uInt16 nSub) { nSubItem = nSub; }
- const String& GetText() const { return aColText; }
+ const OUString& GetText() const { return aColText; }
const Image& GetImage() const { return aColImage; }
long GetWidth() const { return nWidth; }
SvxIconChoiceCtrlColumnAlign GetAlignment() const { return eAlignment; }
diff --git a/svtools/inc/svtools/svxbox.hxx b/svtools/inc/svtools/svxbox.hxx
index c3a7066fc74e..4ccc566fd74d 100644
--- a/svtools/inc/svtools/svxbox.hxx
+++ b/svtools/inc/svtools/svxbox.hxx
@@ -159,7 +159,7 @@ public:
sal_uInt16 GetStyle() const { return nStyle; }
void SetStyle( const sal_uInt16 nSt ) { nStyle = nSt; }
- String GetText() const;
+ OUString GetText() const;
private:
SvxEntryLst aEntryLst;
diff --git a/svtools/inc/svtools/treelistbox.hxx b/svtools/inc/svtools/treelistbox.hxx
index c448c78e3463..14f97f46ccd6 100644
--- a/svtools/inc/svtools/treelistbox.hxx
+++ b/svtools/inc/svtools/treelistbox.hxx
@@ -799,7 +799,7 @@ public:
sal_Bool KeyInput( const KeyEvent& rKEvt );
void LoseFocus();
sal_Bool EditingCanceled() const { return bCanceled; }
- String GetText() const;
+ OUString GetText() const;
String GetSavedValue() const;
void StopEditing( sal_Bool bCancel = sal_False );
void Hide();
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 718eb6768b5a..fa081b743ad0 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -98,7 +98,7 @@ namespace svt
case KEY_RIGHT:
{
Selection aSel = rBox.GetSelection();
- return !aSel && aSel.Max() == rBox.GetText().Len();
+ return !aSel && aSel.Max() == rBox.GetText().getLength();
}
case KEY_HOME:
case KEY_LEFT:
@@ -129,7 +129,7 @@ namespace svt
//------------------------------------------------------------------
sal_Bool ComboBoxCellController::IsModified() const
{
- return GetComboBox().GetSavedValue() != GetComboBox().GetText();
+ return OUString(GetComboBox().GetSavedValue()) != GetComboBox().GetText();
}
//------------------------------------------------------------------
@@ -488,7 +488,7 @@ namespace svt
case KEY_RIGHT:
{
Selection aSel = GetSpinWindow().GetSelection();
- bResult = !aSel && aSel.Max() == GetSpinWindow().GetText().Len();
+ bResult = !aSel && aSel.Max() == GetSpinWindow().GetText().getLength();
} break;
case KEY_HOME:
case KEY_LEFT:
diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx b/svtools/source/contnr/DocumentInfoPreview.cxx
index aa7783b803fc..0f2177aad7b3 100644
--- a/svtools/source/contnr/DocumentInfoPreview.cxx
+++ b/svtools/source/contnr/DocumentInfoPreview.cxx
@@ -126,7 +126,7 @@ void ODocumentInfoPreview::fill(
void ODocumentInfoPreview::insertEntry(
rtl::OUString const & title, rtl::OUString const & value)
{
- if (m_pEditWin.GetText().Len() != 0) {
+ if (!m_pEditWin.GetText().isEmpty()) {
m_pEditWin.InsertText(rtl::OUString("\n\n"));
}
rtl::OUString caption(title + rtl::OUString(":\n"));
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index eddb6022534e..a8e3b14e39a5 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -268,7 +268,7 @@ void SvInplaceEdit2::CallCallBackHdl_Impl()
}
}
-String SvInplaceEdit2::GetText() const
+OUString SvInplaceEdit2::GetText() const
{
return pEdit->GetText();
}
diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx
index 0de2f577074f..1365975a15bb 100644
--- a/svtools/source/control/filectrl.cxx
+++ b/svtools/source/control/filectrl.cxx
@@ -79,7 +79,7 @@ FileControl::~FileControl()
// -----------------------------------------------------------------------
-void FileControl::SetText( const XubString& rStr )
+void FileControl::SetText( const OUString& rStr )
{
maEdit.SetText( rStr );
if ( mnFlags & FILECTRL_RESIZEBUTTONBYPATHLEN )
@@ -88,7 +88,7 @@ void FileControl::SetText( const XubString& rStr )
// -----------------------------------------------------------------------
-XubString FileControl::GetText() const
+OUString FileControl::GetText() const
{
return maEdit.GetText();
}
diff --git a/svtools/source/control/fmtfield.cxx b/svtools/source/control/fmtfield.cxx
index 181bc7166dc6..b8b67748b315 100644
--- a/svtools/source/control/fmtfield.cxx
+++ b/svtools/source/control/fmtfield.cxx
@@ -368,7 +368,7 @@ FormattedField::~FormattedField()
}
//------------------------------------------------------------------------------
-void FormattedField::SetText(const XubString& rStr)
+void FormattedField::SetText(const OUString& rStr)
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -377,7 +377,7 @@ void FormattedField::SetText(const XubString& rStr)
}
//------------------------------------------------------------------------------
-void FormattedField::SetText( const XubString& rStr, const Selection& rNewSelection )
+void FormattedField::SetText( const OUString& rStr, const Selection& rNewSelection )
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -397,7 +397,7 @@ void FormattedField::SetTextFormatted(const OUString& rStr)
m_sCurrentTextValue = rStr;
- String sFormatted;
+ OUString sFormatted;
double dNumber = 0.0;
// IsNumberFormat changes the format key parameter
sal_uInt32 nTempFormatKey = static_cast< sal_uInt32 >( m_nFormatKey );
@@ -419,8 +419,8 @@ void FormattedField::SetTextFormatted(const OUString& rStr)
Selection aSel(GetSelection());
Selection aNewSel(aSel);
aNewSel.Justify();
- sal_uInt16 nNewLen = sFormatted.Len();
- sal_uInt16 nCurrentLen = GetText().Len();
+ sal_Int32 nNewLen = sFormatted.getLength();
+ sal_Int32 nCurrentLen = GetText().getLength();
if ((nNewLen > nCurrentLen) && (aNewSel.Max() == nCurrentLen))
{ // the new text is longer and the cursor was behind the last char (of the old text)
if (aNewSel.Min() == 0)
@@ -514,7 +514,7 @@ void FormattedField::Modify()
}
//------------------------------------------------------------------------------
-void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel)
+void FormattedField::ImplSetTextImpl(const OUString& rNew, Selection* pNewSel)
{
DBG_CHKTHIS(FormattedField, NULL);
@@ -533,8 +533,8 @@ void FormattedField::ImplSetTextImpl(const XubString& rNew, Selection* pNewSel)
Selection aSel(GetSelection());
aSel.Justify();
- sal_uInt16 nNewLen = rNew.Len();
- sal_uInt16 nCurrentLen = GetText().Len();
+ sal_Int32 nNewLen = rNew.getLength();
+ sal_Int32 nCurrentLen = GetText().getLength();
if ((nNewLen > nCurrentLen) && (aSel.Max() == nCurrentLen))
{ // new new text is longer and the cursor is behind the last char
@@ -782,7 +782,7 @@ void FormattedField::FormatChanged( FORMAT_CHANGE_TYPE _nWhat )
void FormattedField::Commit()
{
// remember the old text
- String sOld( GetText() );
+ OUString sOld( GetText() );
// do the reformat
ReFormat();
@@ -799,7 +799,7 @@ void FormattedField::Commit()
//------------------------------------------------------------------------------
void FormattedField::ReFormat()
{
- if (!IsEmptyFieldEnabled() || GetText().Len())
+ if (!IsEmptyFieldEnabled() || !GetText().isEmpty())
{
if (TreatingAsNumber())
{
@@ -856,7 +856,7 @@ long FormattedField::Notify(NotifyEvent& rNEvt)
if (rNEvt.GetType() == EVENT_LOSEFOCUS)
{
// Sonderbehandlung fuer leere Texte
- if (GetText().Len() == 0)
+ if (GetText().isEmpty())
{
if (!IsEmptyFieldEnabled())
{
@@ -925,7 +925,7 @@ void FormattedField::EnableEmptyField(sal_Bool bEnable)
return;
m_bEnableEmptyField = bEnable;
- if (!m_bEnableEmptyField && GetText().Len()==0)
+ if (!m_bEnableEmptyField && GetText().isEmpty())
ImplSetValue(m_dCurrentValue, sal_True);
}
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 6c0ce2a16bf5..37736054fa1e 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -907,7 +907,7 @@ sal_Bool SvtURLBox::ProcessKey( const KeyCode& rKey )
}
KeyCode aCode( rKey.GetCode() );
- if ( aCode == KEY_RETURN && GetText().Len() )
+ if ( aCode == KEY_RETURN && !GetText().isEmpty() )
{
// wait for completion of matching thread
::osl::MutexGuard aGuard( theSvtMatchContextMutex::get() );
@@ -943,7 +943,7 @@ sal_Bool SvtURLBox::ProcessKey( const KeyCode& rKey )
ClearModifyFlag();
return bHandled;
}
- else if ( aCode == KEY_RETURN && !GetText().Len() && GetOpenHdl().IsSet() )
+ else if ( aCode == KEY_RETURN && GetText().isEmpty() && GetOpenHdl().IsSet() )
{
// for file dialog
bAutoCompleteMode = sal_False;
@@ -1000,7 +1000,7 @@ long SvtURLBox::PreNotify( NotifyEvent& rNEvt )
Selection aSelection( GetSelection() );
sal_uInt16 nLen = (sal_uInt16)aSelection.Min();
GetSubEdit()->KeyInput( rEvent );
- SetSelection( Selection( nLen, GetText().Len() ) );
+ SetSelection( Selection( nLen, GetText().getLength() ) );
return sal_True;
}
@@ -1008,7 +1008,7 @@ long SvtURLBox::PreNotify( NotifyEvent& rNEvt )
{
// set the selection so a key stroke will overwrite
// the placeholder rather than edit it
- SetSelection( Selection( 0, GetText().Len() ) );
+ SetSelection( Selection( 0, GetText().getLength() ) );
}
}
@@ -1039,7 +1039,7 @@ long SvtURLBox::Notify( NotifyEvent &rEvt )
}
else if ( EVENT_LOSEFOCUS == rEvt.GetType() )
{
- if( !GetText().Len() )
+ if( GetText().isEmpty() )
ClearModifyFlag();
if ( pCtx.is() )
{
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 4438779af611..046cf5f0a271 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -2356,7 +2356,7 @@ sal_Bool TabBar::StartEditMode( sal_uInt16 nPageId )
mpEdit->SetControlForeground( aForegroundColor );
mpEdit->SetControlBackground( aBackgroundColor );
mpEdit->GrabFocus();
- mpEdit->SetSelection( Selection( 0, mpEdit->GetText().Len() ) );
+ mpEdit->SetSelection( Selection( 0, mpEdit->GetText().getLength() ) );
mpEdit->Show();
return sal_True;
}
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index 3d85f3e1e4df..b42d81b52b42 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -1175,7 +1175,7 @@ void AssignmentPersistentData::Commit()
// -------------------------------------------------------------------
IMPL_LINK(AddressBookSourceDialog, OnComboLoseFocus, ComboBox*, _pBox)
{
- if (_pBox->GetSavedValue() != _pBox->GetText())
+ if (OUString(_pBox->GetSavedValue()) != _pBox->GetText())
{
if (_pBox == &m_aDatasource)
resetTables();
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index 9ffc5f086428..38775201b5ae 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -227,14 +227,13 @@ namespace svt
//---------------------------------------------------------------------
void OWizardMachine::implUpdateTitle()
{
- String sCompleteTitle(m_pImpl->sTitleBase);
+ OUString sCompleteTitle(m_pImpl->sTitleBase);
// append the page title
TabPage* pCurrentPage = GetPage(getCurrentState());
- if ( pCurrentPage && pCurrentPage->GetText().Len() )
+ if ( pCurrentPage && !pCurrentPage->GetText().isEmpty() )
{
- sCompleteTitle += rtl::OUString(" - ");
- sCompleteTitle += pCurrentPage->GetText();
+ sCompleteTitle += (" - " + pCurrentPage->GetText());
}
SetText(sCompleteTitle);
diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx
index 64853117fe48..af68d0515a40 100644
--- a/svtools/source/edit/editsyntaxhighlighter.cxx
+++ b/svtools/source/edit/editsyntaxhighlighter.cxx
@@ -42,7 +42,7 @@ MultiLineEditSyntaxHighlight::~MultiLineEditSyntaxHighlight()
{
}
-void MultiLineEditSyntaxHighlight::SetText(const String& rNewText)
+void MultiLineEditSyntaxHighlight::SetText(const OUString& rNewText)
{
MultiLineEdit::SetText(rNewText);
UpdateData();
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 91885b23562f..49edf88dd409 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -1246,7 +1246,7 @@ void SVTXFormattedField::SetTreatAsNumber(sal_Bool bSet)
}
else
{
- if (pField->GetText().Len()) // empty wird erst mal standardmaessig als void nach draussen gereicht
+ if (!pField->GetText().isEmpty()) // empty wird erst mal standardmaessig als void nach draussen gereicht
aReturn <<= pField->GetValue();
}
diff --git a/svx/inc/svx/paraprev.hxx b/svx/inc/svx/paraprev.hxx
index 7f68fa459d86..ebef6399fcac 100644
--- a/svx/inc/svx/paraprev.hxx
+++ b/svx/inc/svx/paraprev.hxx
@@ -79,7 +79,7 @@ public:
void SetLastLine( SvxAdjust eNew ) { eLastLine = eNew; }
void SetLineSpace( SvxPrevLineSpace eNew, sal_uInt16 nNew = 0 )
{ eLine = eNew; nLineVal = nNew; }
- void SetText( const String& rStr ) { aText = rStr; }
+ void SetText( const OUString& rStr ) { aText = rStr; }
void SetSize( Size aNew ) { aSize = aNew; }
short GetFirstLineOfst() const { return nFirstLineOfst; }
@@ -91,7 +91,7 @@ public:
SvxPrevLineSpace GetLineEnum() const { return eLine; }
sal_uInt16 GetLineValue() const { return nLineVal; }
- String GetText() const { return aText; }
+ OUString GetText() const { return aText; }
Size GetSize() const { return aSize; }
void Draw( sal_Bool bAll ) { DrawParagraph( bAll ); }
diff --git a/svx/inc/svx/srchdlg.hxx b/svx/inc/svx/srchdlg.hxx
index 2f00ca6527ed..f95626f53384 100644
--- a/svx/inc/svx/srchdlg.hxx
+++ b/svx/inc/svx/srchdlg.hxx
@@ -257,13 +257,13 @@ private:
inline sal_Bool SvxSearchDialog::HasSearchAttributes() const
{
- int bLen = aSearchAttrText.GetText().Len();
+ sal_Bool bLen = !aSearchAttrText.GetText().isEmpty();
return ( aSearchAttrText.IsEnabled() && bLen );
}
inline sal_Bool SvxSearchDialog::HasReplaceAttributes() const
{
- int bLen = aReplaceAttrText.GetText().Len();
+ sal_Bool bLen = !aReplaceAttrText.GetText().isEmpty();
return ( aReplaceAttrText.IsEnabled() && bLen );
}
diff --git a/svx/inc/svx/svxdlg.hxx b/svx/inc/svx/svxdlg.hxx
index b9b0e4499f16..fd1d67605521 100644
--- a/svx/inc/svx/svxdlg.hxx
+++ b/svx/inc/svx/svxdlg.hxx
@@ -148,8 +148,8 @@ class AbstractSvxSearchFormatDialog : public SfxAbstractTabDialog //for SvxSea
{
public:
//From class Window.
- virtual void SetText( const XubString& rStr ) =0 ;
- virtual String GetText() const =0 ;
+ virtual void SetText( const OUString& rStr ) =0 ;
+ virtual OUString GetText() const =0 ;
};
class AbstractSvxSearchSimilarityDialog :public VclAbstractDialog //add for SvxSearchSimilarityDialog
@@ -188,7 +188,7 @@ public:
virtual void SetEditHelpId(const rtl::OString&) = 0;
//from class Window
virtual void SetHelpId( const rtl::OString& ) = 0;
- virtual void SetText( const XubString& rStr ) = 0;
+ virtual void SetText( const OUString& rStr ) = 0;
};
///////////////////////////////////////////////////////////////////////////////////////////////
@@ -276,7 +276,7 @@ public:
class AbstractSvxPostItDialog :public VclAbstractDialog //add for SvxPostItDialog
{
public:
- virtual void SetText( const XubString& rStr ) = 0; //From class Window
+ virtual void SetText( const OUString& rStr ) = 0; //From class Window
virtual const SfxItemSet* GetOutputItemSet() const = 0;
virtual void SetPrevHdl( const Link& rLink ) = 0;
virtual void SetNextHdl( const Link& rLink ) = 0;
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index c58cfac3dd9a..ff33a9da6334 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -235,7 +235,7 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, NewHeightModifiedHdl )
IMPL_LINK_NOARG( CompressGraphicsDialog, ResolutionModifiedHdl )
{
- m_dResolution = (double) m_pResolutionLB->GetText().ToInt32();
+ m_dResolution = (double) m_pResolutionLB->GetText().toInt32();
UpdateNewWidthMF();
UpdateNewHeightMF();
diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx
index fabdccc53088..86c86cab18e3 100644
--- a/svx/source/dialog/ctredlin.cxx
+++ b/svx/source/dialog/ctredlin.cxx
@@ -1183,7 +1183,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
Time aTime(0);
if(&aDfDate==pTF)
{
- if(aDfDate.GetText().Len()==0)
+ if(aDfDate.GetText().isEmpty())
aDfDate.SetDate(aDate);
if(pRedlinTable!=NULL)
@@ -1191,7 +1191,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
}
else if(&aDfDate2==pTF)
{
- if(aDfDate2.GetText().Len()==0)
+ if(aDfDate2.GetText().isEmpty())
aDfDate2.SetDate(aDate);
if(pRedlinTable!=NULL)
@@ -1199,7 +1199,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
}
else if(&aTfDate==pTF)
{
- if(aTfDate.GetText().Len()==0)
+ if(aTfDate.GetText().isEmpty())
aTfDate.SetTime(aTime);
if(pRedlinTable!=NULL)
@@ -1207,7 +1207,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF)
}
else if(&aTfDate2==pTF)
{
- if(aTfDate2.GetText().Len()==0)
+ if(aTfDate2.GetText().isEmpty())
aTfDate2.SetTime(aTime);
if(pRedlinTable!=NULL)
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 55495dafbcf8..ddf0f3bb5d8c 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -636,10 +636,10 @@ IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow*, pWnd )
aStbStatus.SetItemText( 1, rInfo.aMarkURL );
- if ( maURLBox.GetText() != rInfo.aMarkURL )
+ if ( maURLBox.GetText() != OUString(rInfo.aMarkURL) )
maURLBox.SetText( rInfo.aMarkURL );
- if ( aEdtText.GetText() != rInfo.aMarkAltText )
+ if ( aEdtText.GetText() != OUString(rInfo.aMarkAltText) )
aEdtText.SetText( rInfo.aMarkAltText );
if ( !rInfo.aMarkTarget.Len() )
diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx
index 00d0ff002fd6..708f52b69ebb 100644
--- a/svx/source/dialog/rubydialog.cxx
+++ b/svx/source/dialog/rubydialog.cxx
@@ -409,8 +409,8 @@ void SvxRubyDialog::GetText()
for(int i = 0; i < 8; i+=2)
{
if(aEditArr[i]->IsEnabled() &&
- (aEditArr[i]->GetText() != aEditArr[i]->GetSavedValue() ||
- aEditArr[i + 1]->GetText() != aEditArr[i + 1]->GetSavedValue()))
+ (aEditArr[i]->GetText() != OUString(aEditArr[i]->GetSavedValue()) ||
+ aEditArr[i + 1]->GetText() != OUString(aEditArr[i + 1]->GetSavedValue())))
{
Sequence<PropertyValues>& aRubyValues = pImpl->GetRubyValues();
DBG_ASSERT(aRubyValues.getLength() > (i / 2 + nTempLastPos), "wrong index" );
diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx
index f0dcab2e65a5..0371a66bd1f3 100644
--- a/svx/source/dialog/srchdlg.cxx
+++ b/svx/source/dialog/srchdlg.cxx
@@ -480,12 +480,12 @@ void SvxSearchDialog::Construct_Impl()
}
catch(uno::Exception&){}
- if(aSearchComponent1PB.GetText().Len() && bSearchComponent1 )
+ if(!aSearchComponent1PB.GetText().isEmpty() && bSearchComponent1 )
{
aSearchComponentFL.Show();
aSearchComponent1PB.Show();
}
- if( aSearchComponent2PB.GetText().Len() )
+ if( !aSearchComponent2PB.GetText().isEmpty() )
{
if(!aSearchComponent1PB.IsVisible())
{
@@ -1122,14 +1122,14 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern )
else
EnableControl_Impl( &aWordBtn );
- String aSrchAttrTxt;
+ OUString aSrchAttrTxt;
if ( pImpl->bMultiLineEdit )
aSrchAttrTxt = pImpl->aSearchFormats.GetText();
else
aSrchAttrTxt = aSearchAttrText.GetText();
- bDisableSearch = !aSearchLB.GetText().Len() && !aSrchAttrTxt.Len();
+ bDisableSearch = aSearchLB.GetText().isEmpty() && aSrchAttrTxt.isEmpty();
}
FocusHdl_Impl( &aSearchLB );
@@ -1159,8 +1159,8 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern )
}
}
- if ( ( !pImpl->bMultiLineEdit && aSearchAttrText.GetText().Len() ) ||
- ( pImpl->bMultiLineEdit && pImpl->aSearchFormats.GetText().Len() ) )
+ if ( ( !pImpl->bMultiLineEdit && !aSearchAttrText.GetText().isEmpty() ) ||
+ ( pImpl->bMultiLineEdit && !pImpl->aSearchFormats.GetText().isEmpty() ) )
EnableControl_Impl( &aNoFormatBtn );
else
aNoFormatBtn.Disable();
@@ -1375,7 +1375,7 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl )
IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn )
{
- bool bInclusive = ( aLayoutBtn.GetText() == aLayoutStr );
+ bool bInclusive = ( aLayoutBtn.GetText() == OUString(aLayoutStr) );
if ( ( pBtn == &aSearchBtn ) ||
( pBtn == &aSearchAllBtn ) ||
@@ -1549,16 +1549,16 @@ IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd )
if ( pEd == &aSearchLB || pEd == &aReplaceLB )
{
- xub_StrLen nSrchTxtLen = aSearchLB.GetText().Len();
- xub_StrLen nReplTxtLen = 0;
+ sal_Int32 nSrchTxtLen = aSearchLB.GetText().getLength();
+ sal_Int32 nReplTxtLen = 0;
if (bAllowEmptySearch)
- nReplTxtLen = aReplaceLB.GetText().Len();
+ nReplTxtLen = aReplaceLB.GetText().getLength();
xub_StrLen nAttrTxtLen = 0;
if ( !pImpl->bMultiLineEdit )
- nAttrTxtLen = aSearchAttrText.GetText().Len();
+ nAttrTxtLen = aSearchAttrText.GetText().getLength();
else
- nAttrTxtLen = pImpl->aSearchFormats.GetText().Len();
+ nAttrTxtLen = pImpl->aSearchFormats.GetText().getLength();
if (nSrchTxtLen || nReplTxtLen || nAttrTxtLen)
{
@@ -1984,12 +1984,12 @@ void SvxSearchDialog::SetItem_Impl( const SvxSearchItem* pItem )
IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl )
{
- xub_StrLen nTxtLen;
+ sal_Int32 nTxtLen;
if ( !pImpl->bMultiLineEdit )
- nTxtLen = aSearchAttrText.GetText().Len();
+ nTxtLen = aSearchAttrText.GetText().getLength();
else
- nTxtLen = pImpl->aSearchFormats.GetText().Len();
+ nTxtLen = pImpl->aSearchFormats.GetText().getLength();
if ( pCtrl == &aSearchLB || pCtrl == &pImpl->aSearchFormats )
{
@@ -2010,8 +2010,8 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl )
pCtrl = &aReplaceLB;
bSearch = sal_False;
- if ( ( !pImpl->bMultiLineEdit && aReplaceAttrText.GetText().Len() ) ||
- ( pImpl->bMultiLineEdit && pImpl->aReplaceFormats.GetText().Len() ) )
+ if ( ( !pImpl->bMultiLineEdit && !aReplaceAttrText.GetText().isEmpty() ) ||
+ ( pImpl->bMultiLineEdit && !pImpl->aReplaceFormats.GetText().isEmpty() ) )
EnableControl_Impl( &aNoFormatBtn );
else
aNoFormatBtn.Disable();
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index 2258563eeb4a..0281ed3bc657 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -1619,7 +1619,7 @@ sal_Bool DbFormattedField::commitControl()
DBG_ASSERT(&rField == m_pWindow, "DbFormattedField::commitControl : can't work with a window other than my own !");
if (m_rColumn.IsNumeric())
{
- if (rField.GetText().Len() != 0)
+ if (!rField.GetText().isEmpty())
aNewVal <<= rField.GetValue();
// ein LeerString wird erst mal standardmaessig als void weitergereicht
}
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 9a4081656770..d6434e18e76f 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -318,7 +318,7 @@ DbGridControl::NavigationBar::AbsolutePos::AbsolutePos(Window* pParent, WinBits
//------------------------------------------------------------------------------
void DbGridControl::NavigationBar::AbsolutePos::KeyInput(const KeyEvent& rEvt)
{
- if (rEvt.GetKeyCode() == KEY_RETURN && GetText().Len())
+ if (rEvt.GetKeyCode() == KEY_RETURN && !GetText().isEmpty())
{
sal_Int64 nRecord = GetValue();
if (nRecord < GetMin() || nRecord > GetMax())
diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx
index efa8bdc3642d..42dd0335b94b 100644
--- a/svx/source/form/tbxform.cxx
+++ b/svx/source/form/tbxform.cxx
@@ -73,7 +73,7 @@ SvxFmAbsRecWin::~SvxFmAbsRecWin()
// -----------------------------------------------------------------------
void SvxFmAbsRecWin::FirePosition( sal_Bool _bForce )
{
- if ( _bForce || ( GetText() != GetSavedValue() ) )
+ if ( _bForce || ( GetText() != OUString(GetSavedValue()) ) )
{
sal_Int64 nRecord = GetValue();
if (nRecord < GetMin() || nRecord > GetMax())
@@ -105,7 +105,7 @@ void SvxFmAbsRecWin::LoseFocus()
// -----------------------------------------------------------------------
void SvxFmAbsRecWin::KeyInput( const KeyEvent& rKeyEvent )
{
- if( rKeyEvent.GetKeyCode() == KEY_RETURN && GetText().Len() )
+ if( rKeyEvent.GetKeyCode() == KEY_RETURN && !GetText().isEmpty() )
FirePosition( sal_True );
else
NumericField::KeyInput( rKeyEvent );
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index d72f47749df3..6b8ed1c925cc 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -352,7 +352,7 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId,
SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser2::meInitMode ) ? GalleryBrowser2::meInitMode : GALLERYBROWSERMODE_ICON );
- if(maInfoBar.GetText().Len() == 0)
+ if(maInfoBar.GetText().isEmpty())
mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
else
mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
@@ -672,7 +672,7 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName )
maViewBox.EnableItem( TBX_ID_LIST, sal_True );
maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, sal_True );
- if(maInfoBar.GetText().Len() == 0)
+ if(maInfoBar.GetText().isEmpty())
mpIconView->SetAccessibleRelationLabeledBy(mpIconView);
else
mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar);
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index de11a0238814..71e9b19edc08 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -230,7 +230,7 @@ void ImplGrafMetricField::Update( const SfxPoolItem* pItem )
SetValue( nValue );
}
else
- SetText( String() );
+ SetText( OUString() );
}
// --------------------
@@ -292,7 +292,7 @@ public:
~ImplGrafControl();
void Update( const SfxPoolItem* pItem ) { maField.Update( pItem ); }
- void SetText( const String& rStr ) { maField.SetText( rStr ); }
+ void SetText( const OUString& rStr ) { maField.SetText( rStr ); }
};
// -----------------------------------------------------------------------------
@@ -562,7 +562,7 @@ void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const
if( eState == SFX_ITEM_DISABLED )
{
pCtrl->Disable();
- pCtrl->SetText( String() );
+ pCtrl->SetText( OUString() );
}
else
{
@@ -703,7 +703,7 @@ void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, c
if( eState == SFX_ITEM_DISABLED )
{
pCtrl->Disable();
- pCtrl->SetText( String() );
+ pCtrl->SetText( OUString() );
}
else
{
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 8c7d0d21a2a7..d49fc251d775 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -793,7 +793,7 @@ void SvxFontNameBox_Impl::Update( const SvxFontItem* pFontItem )
aCurFont.SetPitch ( pFontItem->GetPitch() );
aCurFont.SetCharSet ( pFontItem->GetCharSet() );
}
- String aCurName = aCurFont.GetName();
+ OUString aCurName = aCurFont.GetName();
if ( GetText() != aCurName )
SetText( aCurName );
}
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 0dff51068dfa..b643c7dcf83c 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -453,7 +453,7 @@ IMPL_LINK_NOARG(FindTextToolbarController, EditModifyHdl)
ToolBox* pToolBox = (ToolBox*)pWindow;
if ( pToolBox && m_pFindTextFieldControl )
{
- if (m_pFindTextFieldControl->GetText().Len()>0)
+ if (!m_pFindTextFieldControl->GetText().isEmpty())
{
if ( !pToolBox->IsItemEnabled(m_nDownSearchId) )
pToolBox->EnableItem(m_nDownSearchId, sal_True);
diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
index 98eaa94bd329..265afdf48478 100644
--- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
+++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx
@@ -675,7 +675,7 @@ IMPL_LINK_NOARG(ChineseDictionaryDialog, MappingSelectHdl)
bool ChineseDictionaryDialog::isEditFieldsHaveContent() const
{
- return m_aED_Term.GetText().Len() && m_aED_Mapping.GetText().Len();
+ return !m_aED_Term.GetText().isEmpty() && !m_aED_Mapping.GetText().isEmpty();
}
bool ChineseDictionaryDialog::isEditFieldsContentEqualsSelectedListContent() const
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index f2cc3383023c..393cb5cffda1 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -116,7 +116,7 @@ public:
virtual String GetStr() = 0;
//from class Window
virtual void SetHelpId( const rtl::OString& sHelpId ) = 0;
- virtual void SetText( const XubString& rStr ) = 0;
+ virtual void SetText( const OUString& rStr ) = 0;
};
class AbstractInsertGrfRulerDlg : public VclAbstractDialog //add for SwInsertGrfRulerDlg
@@ -138,7 +138,7 @@ public:
class AbstractJavaEditDialog : public VclAbstractDialog //add for SwJavaEditDialog
{
public:
- virtual String GetText() = 0;
+ virtual OUString GetText() = 0;
virtual String GetType() = 0;
virtual sal_Bool IsUrl() = 0;
virtual sal_Bool IsNew() = 0;
diff --git a/sw/source/ui/cctrl/actctrl.cxx b/sw/source/ui/cctrl/actctrl.cxx
index d4a8d0eeb7bf..43bae1046cb1 100644
--- a/sw/source/ui/cctrl/actctrl.cxx
+++ b/sw/source/ui/cctrl/actctrl.cxx
@@ -82,12 +82,12 @@ void NoSpaceEdit::KeyInput(const KeyEvent& rEvt)
void NoSpaceEdit::Modify()
{
Selection aSel = GetSelection();
- String sTemp = GetText();
+ OUString sTemp = GetText();
for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp = comphelper::string::remove(sTemp, sForbiddenChars.GetChar(i));
}
- sal_uInt16 nDiff = GetText().Len() - sTemp.Len();
+ sal_Int32 nDiff = GetText().getLength() - sTemp.getLength();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index 6e6a85b6fea3..c3694efcfaa3 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -157,9 +157,9 @@ void SwComboBox::KeyInput( const KeyEvent& rKEvt )
}
// Convert text according to option
-String SwComboBox::GetText() const
+OUString SwComboBox::GetText() const
{
- String aTxt( ComboBox::GetText() );
+ OUString aTxt( ComboBox::GetText() );
if(nStyle & CBS_LOWER)
aTxt = GetAppCharClass().lowercase( aTxt );
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index e7efa9177250..7b450d9bc4ec 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -248,9 +248,9 @@ sal_Bool SwCharURLPage::FillItemSet(SfxItemSet& rSet)
SwFmtINetFmt aINetFmt(sURL, m_pTargetFrmLB->GetText());
aINetFmt.SetName(m_pNameED->GetText());
- bModified |= m_pURLED->GetText() != m_pURLED->GetSavedValue();
+ bModified |= m_pURLED->GetText() != OUString(m_pURLED->GetSavedValue());
bModified |= m_pNameED->IsModified();
- bModified |= m_pTargetFrmLB->GetSavedValue() != m_pTargetFrmLB->GetText();
+ bModified |= OUString(m_pTargetFrmLB->GetSavedValue()) != m_pTargetFrmLB->GetText();
// set valid settings first
String sEntry = m_pVisitedLB->GetSelectEntry();
diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx
index 5672ac4cfe0b..9e5e493b335f 100644
--- a/sw/source/ui/chrdlg/drpcps.cxx
+++ b/sw/source/ui/chrdlg/drpcps.cxx
@@ -119,7 +119,7 @@ public:
void UpdatePaintSettings( void ); // also invalidates control!
- inline void SetText( const String& rT );
+ inline void SetText( const OUString& rT );
inline void SetLines( sal_uInt8 nL );
inline void SetDistance( sal_uInt16 nD );
inline void SetValues( const String& rText, sal_uInt8 nLines, sal_uInt16 nDistance );
@@ -127,7 +127,7 @@ public:
void DrawPrev( const Point& rPt );
};
-inline void SwDropCapsPict::SetText( const String& rT )
+inline void SwDropCapsPict::SetText( const OUString& rT )
{
maText = rT;
UpdatePaintSettings();
@@ -744,10 +744,10 @@ IMPL_LINK( SwDropCapsPage, ModifyHdl, Edit *, pEdit )
}
else if (pEdit == &aTextEdit) // set quantity if applicable
{
- sal_uInt16 nTmp = aTextEdit.GetText().Len();
- aDropCapsField.SetValue(Max((sal_uInt16)1, nTmp));
+ sal_Int32 nTmp = aTextEdit.GetText().getLength();
+ aDropCapsField.SetValue(Max((sal_uInt16)1, (sal_uInt16)nTmp));
- sPreview = aTextEdit.GetText().Copy(0, nTmp);
+ sPreview = aTextEdit.GetText().copy(0, nTmp);
}
// adjust image
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index 4482edd3e235..671b1956605b 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -134,7 +134,7 @@ sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
}
if(aNewStartCB.GetState() != aNewStartCB.GetSavedValue() ||
aNewStartNumberCB.GetState() != aNewStartNumberCB.GetSavedValue()||
- aNewStartNF.GetText() != aNewStartNF.GetSavedValue())
+ aNewStartNF.GetText() != OUString(aNewStartNF.GetSavedValue()))
{
bModified = sal_True;
sal_Bool bNewStartChecked = STATE_CHECK == aNewStartCB.GetState();
@@ -146,7 +146,7 @@ sal_Bool SwParagraphNumTabPage::FillItemSet( SfxItemSet& rSet )
if(aCountParaCB.GetSavedValue() != aCountParaCB.GetState() ||
aRestartParaCountCB.GetSavedValue() != aRestartParaCountCB.GetState() ||
- aRestartNF.GetSavedValue() != aRestartNF.GetText() )
+ OUString(aRestartNF.GetSavedValue()) != aRestartNF.GetText() )
{
SwFmtLineNumber aFmt;
aFmt.SetStartValue( static_cast< sal_uLong >(aRestartParaCountCB.GetState() == STATE_CHECK ?
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 8dc428e6c0d7..5dc1a29443bf 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -170,15 +170,15 @@ SfxTabPage* SwMailConfigPage::Create( Window* pParent, const SfxItemSet& rAttrS
sal_Bool SwMailConfigPage::FillItemSet( SfxItemSet& /*rSet*/ )
{
- if(m_aDisplayNameED.GetText() != m_aDisplayNameED.GetSavedValue())
+ if(m_aDisplayNameED.GetText() != OUString(m_aDisplayNameED.GetSavedValue()))
m_pConfigItem->SetMailDisplayName(m_aDisplayNameED.GetText());
- if(m_aAddressED.GetText() != m_aAddressED.GetSavedValue())
+ if(m_aAddressED.GetText() != OUString(m_aAddressED.GetSavedValue()))
m_pConfigItem->SetMailAddress(m_aAddressED.GetText());
if( m_aReplyToCB.GetSavedValue() != m_aReplyToCB.IsChecked())
m_pConfigItem->SetMailReplyTo(m_aReplyToCB.IsChecked());
- if(m_aReplyToED.GetText() != m_aReplyToED.GetSavedValue())
+ if(m_aReplyToED.GetText() != OUString(m_aReplyToED.GetSavedValue()))
m_pConfigItem->SetMailReplyTo(m_aReplyToED.GetText());
- if(m_aServerED.GetText() != m_aServerED.GetSavedValue())
+ if(m_aServerED.GetText() != OUString(m_aServerED.GetSavedValue()))
m_pConfigItem->SetMailServer(m_aServerED.GetText());
if(m_aPortNF.IsModified())
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index fbdd800a5caa..6c4d0b721de3 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -189,7 +189,7 @@ sal_Bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
bRet = sal_True;
}
- if(aTabMF.IsVisible() && aTabMF.GetText() != aTabMF.GetSavedValue())
+ if(aTabMF.IsVisible() && aTabMF.GetText() != OUString(aTabMF.GetSavedValue()))
{
rSet.Put(SfxUInt16Item(SID_ATTR_DEFTABSTOP,
(sal_uInt16)aTabMF.Denormalize(aTabMF.GetValue(FUNIT_TWIP))));
@@ -205,7 +205,7 @@ sal_Bool SwLoadOptPage::FillItemSet( SfxItemSet& rSet )
bRet = sal_True;
}
- if (aWordCountED.GetText() != aWordCountED.GetSavedValue())
+ if (aWordCountED.GetText() != OUString(aWordCountED.GetSavedValue()))
{
boost::shared_ptr< comphelper::ConfigurationChanges > batch(
comphelper::ConfigurationChanges::create());
@@ -691,7 +691,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
if (pOpt->GetCategory().Len() &&
aCategoryBox.GetEntryPos(pOpt->GetCategory()) == COMBOBOX_ENTRY_NOTFOUND)
aCategoryBox.InsertEntry(pOpt->GetCategory());
- if (!aCategoryBox.GetText().Len())
+ if (aCategoryBox.GetText().isEmpty())
{
sal_uInt16 nPos = 0;
switch(pOpt->GetObjType())
@@ -775,7 +775,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
else
pOpt->SetCategory(comphelper::string::strip(aName, ' '));
pOpt->SetNumType((sal_uInt16)(sal_uLong)aFormatBox.GetEntryData(aFormatBox.GetSelectEntryPos()));
- pOpt->SetCaption(aTextEdit.IsEnabled() ? aTextEdit.GetText() : aEmptyStr );
+ pOpt->SetCaption(aTextEdit.IsEnabled() ? aTextEdit.GetText() : OUString(aEmptyStr) );
pOpt->SetPos(aPosBox.GetSelectEntryPos());
sal_uInt16 nPos = aLbLevel.GetSelectEntryPos();
sal_uInt16 nLevel = ( nPos > 0 && nPos != LISTBOX_ENTRY_NOTFOUND ) ? nPos - 1 : MAXLEVEL;
@@ -837,7 +837,7 @@ void SwCaptionOptPage::DrawSample()
{
String aStr;
- if( aCategoryBox.GetText() != sNone)
+ if( aCategoryBox.GetText() != OUString(sNone))
{
//#i61007# order of captions
bool bOrderNumberingFirst = aLbCaptionOrder.GetSelectEntryPos() == 1;
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index d28bd4d0c132..8cd9f2406d63 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -631,11 +631,11 @@ sal_Bool SwStdFontTabPage::FillItemSet( SfxItemSet& )
String sLabel = aLabelBox .GetText();
String sIdx = aIdxBox .GetText();
- bool bStandardHeightChanged = aStandardHeightLB.GetSavedValue() != aStandardHeightLB.GetText();
- bool bTitleHeightChanged = aTitleHeightLB.GetSavedValue() != aTitleHeightLB.GetText();
- bool bListHeightChanged = aListHeightLB.GetSavedValue() != aListHeightLB.GetText() && (!bListHeightDefault || !bSetListHeightDefault );
- bool bLabelHeightChanged = aLabelHeightLB.GetSavedValue() != aLabelHeightLB.GetText() && (!bLabelHeightDefault || !bSetLabelHeightDefault );
- bool bIndexHeightChanged = aIndexHeightLB.GetSavedValue() != aIndexHeightLB.GetText() && (!bIndexHeightDefault || !bSetIndexHeightDefault );
+ bool bStandardHeightChanged = OUString(aStandardHeightLB.GetSavedValue()) != aStandardHeightLB.GetText();
+ bool bTitleHeightChanged = OUString(aTitleHeightLB.GetSavedValue()) != aTitleHeightLB.GetText();
+ bool bListHeightChanged = OUString(aListHeightLB.GetSavedValue()) != aListHeightLB.GetText() && (!bListHeightDefault || !bSetListHeightDefault );
+ bool bLabelHeightChanged = OUString(aLabelHeightLB.GetSavedValue()) != aLabelHeightLB.GetText() && (!bLabelHeightDefault || !bSetLabelHeightDefault );
+ bool bIndexHeightChanged = OUString(aIndexHeightLB.GetSavedValue()) != aIndexHeightLB.GetText() && (!bIndexHeightDefault || !bSetIndexHeightDefault );
if(bNotDocOnly)
{
pFontConfig->SetFontStandard(sStandard, nFontGroup);
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index b622a1fb1727..f7f853273e8d 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -744,7 +744,7 @@ IMPL_LINK_NOARG(SwFindEntryDialog, FindHdl_Impl)
IMPL_LINK_NOARG(SwFindEntryDialog, FindEnableHdl_Impl)
{
- m_aFindPB.Enable(m_aFindED.GetText().Len() > 0);
+ m_aFindPB.Enable(!m_aFindED.GetText().isEmpty());
return 0;
}
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 507248932ff1..bd2134f6d6de 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -242,7 +242,7 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView,
{
FreeResource();
- nGBFmtLen = aFlFormat.GetText().Len();
+ nGBFmtLen = aFlFormat.GetText().getLength();
if(xColSupp.is())
{
@@ -799,7 +799,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, SelectHdl, ListBox*, pBox )
{
// set the selected FieldName at the FormatGroupBox, so that
// it's clear what field is configured by the format!
- String sTxt( aFlFormat.GetText().Copy( 0, nGBFmtLen ));
+ String sTxt( aFlFormat.GetText().copy( 0, nGBFmtLen ));
if( aSrch.sColumn.isEmpty() )
{
aRbDbFmtFromDb.Enable( sal_False );
diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx
index 1d2e4ce2abfe..d91418613636 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.cxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.cxx
@@ -518,12 +518,12 @@ void SwRestrictedComboBox::KeyInput(const KeyEvent& rEvt)
void SwRestrictedComboBox::Modify()
{
Selection aSel = GetSelection();
- String sTemp = GetText();
+ OUString sTemp = GetText();
for(sal_uInt16 i = 0; i < sForbiddenChars.Len(); i++)
{
sTemp = comphelper::string::remove(sTemp, sForbiddenChars.GetChar(i));
}
- sal_uInt16 nDiff = GetText().Len() - sTemp.Len();
+ sal_Int32 nDiff = GetText().getLength() - sTemp.getLength();
if(nDiff)
{
aSel.setMin(aSel.getMin() - nDiff);
@@ -822,7 +822,7 @@ void SwCustomizeAddressBlockDialog::UpdateImageButtons_Impl()
m_aRemoveFieldIB.Enable(m_aDragED.HasCurrentItem() ? sal_True : sal_False);
SvTreeListEntry* pEntry = m_aAddressElementsLB.GetCurEntry();
m_aInsertFieldIB.Enable( pEntry &&
- (0 < (sal_Int32)(sal_IntPtr)pEntry->GetUserData() || m_aFieldCB.GetText().Len()));
+ (0 < (sal_Int32)(sal_IntPtr)pEntry->GetUserData() || !m_aFieldCB.GetText().isEmpty()));
}
void SwCustomizeAddressBlockDialog::SetAddress(const ::rtl::OUString& rAddress)
@@ -1427,7 +1427,7 @@ long AddressMultiLineEdit::PreNotify( NotifyEvent& rNEvt )
}
-void AddressMultiLineEdit::SetText( const String& rStr )
+void AddressMultiLineEdit::SetText( const OUString& rStr )
{
MultiLineEdit::SetText(rStr);
//set attributes to all address tokens
diff --git a/sw/source/ui/dbui/mmaddressblockpage.hxx b/sw/source/ui/dbui/mmaddressblockpage.hxx
index bd7ab5d3b474..9c2d76be843b 100644
--- a/sw/source/ui/dbui/mmaddressblockpage.hxx
+++ b/sw/source/ui/dbui/mmaddressblockpage.hxx
@@ -173,7 +173,7 @@ public:
void SetSelectionChangedHdl( const Link& rLink ) {m_aSelectionLink = rLink;}
- void SetText( const String& rStr );
+ void SetText( const OUString& rStr );
String GetAddress();
void InsertNewEntry( const String& rStr );
diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx b/sw/source/ui/dbui/mmgreetingspage.cxx
index 96244f415fba..5cbaa819da84 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -201,8 +201,8 @@ void SwMailMergeGreetingsPage::UpdatePreview()
}
}
- String sPreview = bFemale ? m_aFemaleLB.GetSelectEntry() :
- bNoValue ? m_aNeutralCB.GetText() : m_aMaleLB.GetSelectEntry();
+ String sPreview = bFemale ? OUString(m_aFemaleLB.GetSelectEntry()) :
+ bNoValue ? m_aNeutralCB.GetText() : OUString(m_aMaleLB.GetSelectEntry());
sPreview = SwAddressPreview::FillData(sPreview, m_pWizard->GetConfigItem());
m_aPreviewWIN.SetAddress(sPreview);
@@ -367,7 +367,7 @@ sal_Bool SwMailMergeGreetingsPage::commitPage( ::svt::WizardTypes::CommitPage
aAssignment[MM_PART_GENDER] = m_aFemaleColumnLB.GetSelectEntry();
rConfig.SetColumnAssignment( rDBData, aAssignment );
}
- if(m_aFemaleFieldCB.GetText() != m_aFemaleFieldCB.GetSavedValue())
+ if(m_aFemaleFieldCB.GetText() != OUString(m_aFemaleFieldCB.GetSavedValue()))
rConfig.SetFemaleGenderValue(m_aFemaleFieldCB.GetText());
lcl_StoreGreetingsBox(m_aFemaleLB, rConfig, SwMailMergeConfigItem::FEMALE);
@@ -561,7 +561,7 @@ IMPL_LINK_NOARG(SwMailBodyDialog, OKHdl)
aAssignment[MM_PART_GENDER] = ::rtl::OUString();
rConfigItem.SetColumnAssignment( rDBData, aAssignment );
}
- if(m_aFemaleFieldCB.GetText() != m_aFemaleFieldCB.GetSavedValue())
+ if(m_aFemaleFieldCB.GetText() != OUString(m_aFemaleFieldCB.GetSavedValue()))
rConfigItem.SetFemaleGenderValue(m_aFemaleFieldCB.GetText());
EndDialog(RET_OK);
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx
index 10b0024b8e35..20705bd5f469 100644
--- a/sw/source/ui/dbui/mmoutputpage.cxx
+++ b/sw/source/ui/dbui/mmoutputpage.cxx
@@ -179,7 +179,7 @@ SwSaveWarningBox_Impl::~SwSaveWarningBox_Impl()
IMPL_LINK( SwSaveWarningBox_Impl, ModifyHdl, Edit*, pEdit)
{
- aOKPB.Enable(pEdit->GetText().Len() > 0);
+ aOKPB.Enable(!pEdit->GetText().isEmpty());
return 0;
}
@@ -206,7 +206,7 @@ SwSendQueryBox_Impl::~SwSendQueryBox_Impl()
IMPL_LINK( SwSendQueryBox_Impl, ModifyHdl, Edit*, pEdit)
{
- aOKPB.Enable(bIsEmptyAllowed || (pEdit->GetText().Len() > 0));
+ aOKPB.Enable(bIsEmptyAllowed || !pEdit->GetText().isEmpty());
return 0;
}
@@ -528,7 +528,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton)
if(!m_aFromRB.IsChecked())
m_aSendAllRB.Check();
- if(!m_aAttachmentED.GetText().Len())
+ if(m_aAttachmentED.GetText().isEmpty())
{
String sAttach( m_sDefaultAttachmentST );
sAttach += '.';
@@ -626,7 +626,7 @@ IMPL_LINK(SwMailMergeOutputPage, SaveStartHdl_Impl, PushButton*, pButton)
{
INetURLObject aURL = pDocShell->GetMedium()->GetURLObject();
//update the attachment name
- if(!m_aAttachmentED.GetText().Len())
+ if(m_aAttachmentED.GetText().isEmpty())
{
if ( pDocShell->HasName() )
{
@@ -1098,7 +1098,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
return 0;
::rtl::OUString sMimeType = pSfxFlt->GetMimeType();
- if(!m_aSubjectED.GetText().Len())
+ if(m_aSubjectED.GetText().isEmpty())
{
SwSendQueryBox_Impl aQuery(pButton, m_sNoSubjectQueryST);
aQuery.SetIsEmptyTextAllowed(true);
@@ -1111,7 +1111,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton)
else
return 0;
}
- if(!bAsBody && !m_aAttachmentED.GetText().Len())
+ if(!bAsBody && m_aAttachmentED.GetText().isEmpty())
{
SwSendQueryBox_Impl aQuery(pButton, m_sNoAttachmentNameST);
aQuery.SetIsEmptyTextAllowed(false);
diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx
index 51539977a258..b84e88b90a59 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -152,12 +152,12 @@ void AbstractTabDialog_Impl::SetInputSet( const SfxItemSet* pInSet )
}
//From class Window.
-void AbstractTabDialog_Impl::SetText( const XubString& rStr )
+void AbstractTabDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String AbstractTabDialog_Impl::GetText() const
+OUString AbstractTabDialog_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -190,12 +190,12 @@ const SfxItemSet* SwAbstractSfxDialog_Impl::GetOutputItemSet() const
return pDlg->GetOutputItemSet();
}
-void SwAbstractSfxDialog_Impl::SetText( const XubString& rStr )
+void SwAbstractSfxDialog_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String SwAbstractSfxDialog_Impl::GetText() const
+OUString SwAbstractSfxDialog_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -274,12 +274,12 @@ void AbstractSwLabDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
pDlg->SetInputSet( pInSet );
}
-void AbstractSwLabDlg_Impl::SetText( const XubString& rStr )
+void AbstractSwLabDlg_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String AbstractSwLabDlg_Impl::GetText() const
+OUString AbstractSwLabDlg_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -339,12 +339,12 @@ void AbstractSwFldDlg_Impl::SetInputSet( const SfxItemSet* pInSet )
pDlg->SetInputSet( pInSet );
}
-void AbstractSwFldDlg_Impl::SetText( const XubString& rStr )
+void AbstractSwFldDlg_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
-String AbstractSwFldDlg_Impl::GetText() const
+OUString AbstractSwFldDlg_Impl::GetText() const
{
return pDlg->GetText();
}
@@ -433,7 +433,7 @@ void AbstractInsFootNoteDlg_Impl::SetHelpId( const rtl::OString& sHelpId )
pDlg->SetHelpId( sHelpId );
}
-void AbstractInsFootNoteDlg_Impl::SetText( const XubString& rStr )
+void AbstractInsFootNoteDlg_Impl::SetText( const OUString& rStr )
{
pDlg->SetText( rStr );
}
@@ -445,7 +445,7 @@ void AbstractInsTableDlg_Impl::GetValues( String& rName, sal_uInt16& rRow, sal_u
pDlg->GetValues( rName, rRow, rCol, rInsTblFlags, rTableAutoFmtName, prTAFmt);
}
-String AbstractJavaEditDialog_Impl::GetText()
+OUString AbstractJavaEditDialog_Impl::GetText()
{
return pDlg->GetText();
}
diff --git a/sw/source/ui/dialog/swdlgfact.hxx b/sw/source/ui/dialog/swdlgfact.hxx
index f50c1395feb0..f4e84fc93c44 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -90,8 +90,8 @@ class SwAbstractSfxDialog_Impl :public SfxAbstractDialog
{
DECL_ABSTDLG_BASE(SwAbstractSfxDialog_Impl,SfxModalDialog)
virtual const SfxItemSet* GetOutputItemSet() const;
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
// add for SwAddrDlg,SwDropCapsDlg , SwBackgroundDlg SwNumFmtDlg SwWrapDlg SwBorderDlg, SwFldEditDlg end
@@ -138,8 +138,8 @@ class AbstractTabDialog_Impl : virtual public SfxAbstractTabDialog
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
};
//add for SwCharDlg, SwEnvDlg ,SwFootNoteOptionDlg SwParaDlg SwTableTabDlg end
@@ -195,8 +195,8 @@ class AbstractSwLabDlg_Impl : public AbstractSwLabDlg
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
virtual const String& GetBusinessCardStr() const;
virtual Printer *GetPrt();
};
@@ -231,8 +231,8 @@ class AbstractSwFldDlg_Impl : public AbstractSwFldDlg //add for SwFldDlg
virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem );
virtual void SetInputSet( const SfxItemSet* pInSet );
//From class Window.
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
virtual void Start( sal_Bool bShow = sal_True ); //this method from SfxTabDialog
virtual void ShowPage( sal_uInt16 nId );// this method from SfxTabDialog
virtual void Initialize(SfxChildWinInfo *pInfo);
@@ -291,7 +291,7 @@ class AbstractInsFootNoteDlg_Impl : public AbstractInsFootNoteDlg
virtual String GetStr();
//from class Window
virtual void SetHelpId( const rtl::OString& sHelpId );
- virtual void SetText( const XubString& rStr );
+ virtual void SetText( const OUString& rStr );
};
//for SwInsFootNoteDlg end
@@ -311,7 +311,7 @@ class SwJavaEditDialog;
class AbstractJavaEditDialog_Impl : public AbstractJavaEditDialog
{
DECL_ABSTDLG_BASE(AbstractJavaEditDialog_Impl,SwJavaEditDialog)
- virtual String GetText();
+ virtual OUString GetText();
virtual String GetType();
virtual sal_Bool IsUrl();
virtual sal_Bool IsNew();
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index 8ad2c153b502..4ee633b9e0e4 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -377,15 +377,15 @@ void SwSidebarWin::CheckMetaText()
{
const SvtSysLocale aSysLocale;
const LocaleDataWrapper& rLocalData = aSysLocale.GetLocaleData();
- String sMeta = GetAuthor();
- if (sMeta.Len() == 0)
+ OUString sMeta = GetAuthor();
+ if (sMeta.isEmpty())
{
- sMeta = String(SW_RES(STR_NOAUTHOR));
+ sMeta = OUString(SW_RES(STR_NOAUTHOR));
}
- else if (sMeta.Len() > 22)
+ else if (sMeta.getLength() > 22)
{
- sMeta.Erase(20);
- sMeta = sMeta + rtl::OUString("...");
+ sMeta.replaceAt(20, sMeta.getLength()-20, "");
+ sMeta = sMeta + OUString("...");
}
if ( mpMetadataAuthor->GetText() != sMeta )
{
@@ -871,7 +871,7 @@ void SwSidebarWin::DeactivatePostIt()
if ( !IsProtected() &&
- Engine()->GetEditEngine().GetText()==String(EMPTYSTRING) )
+ Engine()->GetEditEngine().GetText()==OUString(EMPTYSTRING) )
{
mnEventId = Application::PostUserEvent( LINK( this, SwSidebarWin, DeleteHdl), 0 );
}
@@ -903,7 +903,7 @@ void SwSidebarWin::ExecuteCommand(sal_uInt16 nSlot)
{
// if this note is empty, it will be deleted once losing the focus, so no reply, but only a new note
// will be created
- if (Engine()->GetEditEngine().GetText() != String(EMPTYSTRING))
+ if (Engine()->GetEditEngine().GetText() != OUString(EMPTYSTRING))
{
OutlinerParaObject* pPara = new OutlinerParaObject(*GetOutlinerView()->GetEditView().CreateTextObject());
mrMgr.RegisterAnswer(pPara);
diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx
index c4fc2ee52047..ca5f6524aabf 100644
--- a/sw/source/ui/envelp/envlop1.cxx
+++ b/sw/source/ui/envelp/envlop1.cxx
@@ -275,7 +275,7 @@ IMPL_LINK_NOARG(SwEnvPage, SenderHdl)
if ( bEnable )
{
aSenderEdit.GrabFocus();
- if(!aSenderEdit.GetText().Len())
+ if(aSenderEdit.GetText().isEmpty())
aSenderEdit.SetText(MakeSender());
}
aPreview.Invalidate();
diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx
index e4eae417189b..20a66d46dfa8 100644
--- a/sw/source/ui/envelp/labfmt.cxx
+++ b/sw/source/ui/envelp/labfmt.cxx
@@ -651,7 +651,7 @@ IMPL_LINK_NOARG(SwSaveLabelDlg, OkHdl)
IMPL_LINK_NOARG(SwSaveLabelDlg, ModifyHdl)
{
- aOKPB.Enable(aMakeCB.GetText().Len() && aTypeED.GetText().Len());
+ aOKPB.Enable(!aMakeCB.GetText().isEmpty() && !aTypeED.GetText().isEmpty());
return 0;
}
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 76771fa71130..4ef4b5e62f77 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -232,8 +232,8 @@ sal_Bool SwFldDBPage::FillItemSet(SfxItemSet& )
sal_Bool bDBListBoxChanged = sOldDBName != sTempDBName ||
sOldTableName != sTempTableName || sOldColumnName != sTempColumnName;
if (!IsFldEdit() ||
- aConditionED.GetSavedValue() != aConditionED.GetText() ||
- aValueED.GetSavedValue() != aValueED.GetText() ||
+ OUString(aConditionED.GetSavedValue()) != aConditionED.GetText() ||
+ OUString(aValueED.GetSavedValue()) != aValueED.GetText() ||
bDBListBoxChanged ||
nOldFormat != nFormat || nOldSubType != nSubType)
{
@@ -408,7 +408,7 @@ void SwFldDBPage::CheckInsert()
if (nTypeId == TYP_DBNUMSETFLD)
{
- sal_Bool bHasValue = aValueED.GetText().Len() != 0;
+ sal_Bool bHasValue = !aValueED.GetText().isEmpty();
bInsert &= bHasValue;
}
diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx
index fdb619593c13..79011585cca6 100644
--- a/sw/source/ui/fldui/flddok.cxx
+++ b/sw/source/ui/fldui/flddok.cxx
@@ -522,8 +522,8 @@ IMPL_LINK_NOARG(SwFldDokPage, FormatHdl)
// Prev/Next - PageNumFields special treatment:
sal_uInt16 nTmp = (sal_uInt16)(sal_uLong)aFormatLB.GetEntryData(
aFormatLB.GetSelectEntryPos() );
- String sOldTxt( aValueFT.GetText() );
- String sNewTxt( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE
+ OUString sOldTxt( aValueFT.GetText() );
+ OUString sNewTxt( SW_RES( SVX_NUM_CHAR_SPECIAL == nTmp ? STR_VALUE
: STR_OFFSET ));
if( sOldTxt != sNewTxt )
@@ -600,7 +600,7 @@ sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
if( SVX_NUM_CHAR_SPECIAL != nFormat &&
(TYP_PREVPAGEFLD == nTypeId || TYP_NEXTPAGEFLD == nTypeId))
{
- sal_Int32 nVal = aValueED.GetText().ToInt32();
+ sal_Int32 nVal = aValueED.GetText().toInt32();
aVal = String::CreateFromInt32(nVal);
}
break;
@@ -618,9 +618,9 @@ sal_Bool SwFldDokPage::FillItemSet(SfxItemSet& )
nOldSel != aSelectionLB.GetSelectEntryPos() ||
nOldFormat != nFormat ||
aFixedCB.GetState() != aFixedCB.GetSavedValue() ||
- aValueED.GetText() != aValueED.GetSavedValue() ||
- aLevelED.GetText() != aLevelED.GetSavedValue() ||
- aDateOffsetED.GetText() != aDateOffsetED.GetSavedValue())
+ aValueED.GetText() != OUString(aValueED.GetSavedValue()) ||
+ aLevelED.GetText() != OUString(aLevelED.GetSavedValue()) ||
+ aDateOffsetED.GetText() != OUString(aDateOffsetED.GetSavedValue()))
{
InsertFld( nTypeId, nSubType, aEmptyStr, aVal, nFormat, ' ', aNumFormatLB.IsAutomaticLanguage() );
}
diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx
index df419e9fe151..ba1871b7157a 100644
--- a/sw/source/ui/fldui/fldfunc.cxx
+++ b/sw/source/ui/fldui/fldfunc.cxx
@@ -276,9 +276,9 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
if(bDropDown)
ListEnableHdl(0);
- if( aNameFT.GetText() != sOldNameFT )
+ if( aNameFT.GetText() != OUString(sOldNameFT) )
aNameFT.SetText(sOldNameFT);
- if (aValueFT.GetText() != sOldValueFT)
+ if (aValueFT.GetText() != OUString(sOldValueFT))
aValueFT.SetText(sOldValueFT);
switch (nTypeId)
@@ -354,7 +354,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, TypeHdl)
aNameED.SetDropEnable(sal_True);
bName = sal_True;
- const sal_uInt16 nLen = aNameED.GetText().Len();
+ const sal_Int32 nLen = aNameED.GetText().getLength();
if( !nLen || nLen > MAX_COMBINED_CHARACTERS )
bInsert = sal_False;
aNameED.SetAccessibleName(aNameFT.GetText());
@@ -464,7 +464,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl)
IMPL_LINK_NOARG(SwFldFuncPage, ListEnableHdl)
{
//enable "Add" button when text is in the Edit that's not already member of the box
- aListAddPB.Enable(aListItemED.GetText().Len() &&
+ aListAddPB.Enable(!aListItemED.GetText().isEmpty() &&
LISTBOX_ENTRY_NOTFOUND == aListItemsLB.GetEntryPos(aListItemED.GetText()));
sal_Bool bEnableButtons = aListItemsLB.GetSelectEntryCount() > 0;
aListRemovePB.Enable(bEnableButtons);
@@ -593,11 +593,11 @@ sal_Bool SwFldFuncPage::FillItemSet(SfxItemSet& )
}
if (!IsFldEdit() ||
- aNameED.GetSavedValue() != aNameED.GetText() ||
- aValueED.GetSavedValue() != aValueED.GetText() ||
- aCond1ED.GetSavedValue() != aCond1ED.GetText() ||
- aCond2ED.GetSavedValue() != aCond2ED.GetText() ||
- aListNameED.GetSavedValue() != aListNameED.GetText() ||
+ OUString(aNameED.GetSavedValue()) != aNameED.GetText() ||
+ OUString(aValueED.GetSavedValue()) != aValueED.GetText() ||
+ OUString(aCond1ED.GetSavedValue()) != aCond1ED.GetText() ||
+ OUString(aCond2ED.GetSavedValue()) != aCond2ED.GetText() ||
+ OUString(aListNameED.GetSavedValue()) != aListNameED.GetText() ||
bDropDownLBChanged ||
nOldFormat != nFormat)
{
diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx
index 520ae57cbce9..695a8f632df7 100644
--- a/sw/source/ui/fldui/fldref.cxx
+++ b/sw/source/ui/fldui/fldref.cxx
@@ -940,8 +940,8 @@ sal_Bool SwFldRefPage::FillItemSet(SfxItemSet& )
}
if (!IsFldEdit() || bModified ||
- aNameED.GetSavedValue() != aNameED.GetText() ||
- aValueED.GetSavedValue() != aValueED.GetText() ||
+ OUString(aNameED.GetSavedValue()) != aNameED.GetText() ||
+ OUString(aValueED.GetSavedValue()) != aValueED.GetText() ||
aTypeLB.GetSavedValue() != aTypeLB.GetSelectEntryPos() ||
aSelectionLB.GetSavedValue() != aSelectionLB.GetSelectEntryPos() ||
aFormatLB.GetSavedValue() != aFormatLB.GetSelectEntryPos())
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index c9f90ab9bf71..2ae36613956e 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -226,9 +226,9 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox )
aValueED.SetText(GetFldMgr().GetCurFldPar2());
}
- if (aNameFT.GetText() != sOldNameFT)
+ if (aNameFT.GetText() != OUString(sOldNameFT))
aNameFT.SetText(sOldNameFT);
- if (aValueFT.GetText() != sOldValueFT)
+ if (aValueFT.GetText() != OUString(sOldValueFT))
aValueFT.SetText(sOldValueFT);
aNumFormatLB.SetUpdateMode(sal_False);
@@ -1097,7 +1097,7 @@ IMPL_LINK_NOARG(SwFldVarPage, ChapterHdl)
IMPL_LINK_NOARG(SwFldVarPage, SeparatorHdl)
{
- sal_Bool bEnable = aSeparatorED.GetText().Len() != 0 ||
+ sal_Bool bEnable = !aSeparatorED.GetText().isEmpty() ||
aChapterLevelLB.GetSelectEntryPos() == 0;
EnableInsert(bEnable);
@@ -1203,8 +1203,8 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
else
{
nSubType--;
- String sSeparator = rtl::OUString(aSeparatorED.GetText().GetChar(0));
- cSeparator = sSeparator.Len() ? sSeparator.GetChar(0) : ' ';
+ OUString sSeparator = rtl::OUString(aSeparatorED.GetText()[0]);
+ cSeparator = !sSeparator.isEmpty() ? sSeparator[0] : ' ';
}
break;
}
@@ -1215,14 +1215,14 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
}
if (!IsFldEdit() ||
- aNameED.GetSavedValue() != aNameED.GetText() ||
- aValueED.GetSavedValue() != aValueED.GetText() ||
+ OUString(aNameED.GetSavedValue()) != aNameED.GetText() ||
+ OUString(aValueED.GetSavedValue()) != aValueED.GetText() ||
aSelectionLB.GetSavedValue() != aSelectionLB.GetSelectEntryPos() ||
aFormatLB.GetSavedValue() != aFormatLB.GetSelectEntryPos() ||
nOldFormat != aNumFormatLB.GetFormat() ||
aInvisibleCB.GetState() != aInvisibleCB.GetSavedValue() ||
aChapterLevelLB.GetSavedValue() != aChapterLevelLB.GetSelectEntryPos() ||
- aSeparatorED.GetSavedValue() != aSeparatorED.GetText())
+ OUString(aSeparatorED.GetSavedValue()) != aSeparatorED.GetText())
{
InsertFld( nTypeId, nSubType, aName, aVal, nFormat,
cSeparator, aNumFormatLB.IsAutomaticLanguage() );
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 5751aca74b75..f933604d40f6 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -268,7 +268,7 @@ void SwCaptionDialog::Apply()
aOpt.SetNumSeparator( m_pNumberingSeparatorED->GetText() );
}
aOpt.SetNumType( (sal_uInt16)(sal_uIntPtr)m_pFormatBox->GetEntryData( m_pFormatBox->GetSelectEntryPos() ) );
- aOpt.SetSeparator( m_pSepEdit->IsEnabled() ? m_pSepEdit->GetText() : String() );
+ aOpt.SetSeparator( m_pSepEdit->IsEnabled() ? m_pSepEdit->GetText() : OUString() );
aOpt.SetCaption( m_pTextEdit->GetText() );
aOpt.SetPos( m_pPosBox->GetSelectEntryPos() );
aOpt.IgnoreSeqOpts() = sal_True;
@@ -463,7 +463,7 @@ void SwSequenceOptionDialog::Apply()
RES_SETEXPFLD, aFldTypeName );
sal_Int8 nLvl = (sal_Int8)( m_pLbLevel->GetSelectEntryPos() - 1);
- sal_Unicode cDelim = m_pEdDelim->GetText().GetChar(0);
+ sal_Unicode cDelim = m_pEdDelim->GetText()[0];
sal_Bool bUpdate = sal_True;
if( pFldType )
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 051b9dd30fb6..82ac9346884b 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -979,7 +979,7 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
aHoriOrient.SetRelationOrient( eRel );
aHoriOrient.SetPosToggle(aMirrorPagesCB.IsChecked());
- sal_Bool bMod = aAtHorzPosED.GetText() != aAtHorzPosED.GetSavedValue();
+ sal_Bool bMod = aAtHorzPosED.GetText() != OUString(aAtHorzPosED.GetSavedValue());
bMod |= aMirrorPagesCB.GetState() != aMirrorPagesCB.GetSavedValue();
if ( eHOri == text::HoriOrientation::NONE &&
@@ -1017,7 +1017,7 @@ sal_Bool SwFrmPage::FillItemSet(SfxItemSet &rSet)
aVertOrient.SetVertOrient ( eVOri);
aVertOrient.SetRelationOrient( eRel );
- sal_Bool bMod = aAtVertPosED.GetText() != aAtVertPosED.GetSavedValue();
+ sal_Bool bMod = aAtVertPosED.GetText() != OUString(aAtVertPosED.GetSavedValue());
if ( eVOri == text::VertOrientation::NONE &&
( bNew || (bAtVertPosModified || bMod) || nOldV != eVOri) )
@@ -2678,7 +2678,7 @@ sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
String sText = aURLED.GetText();
if( pFmtURL->GetURL() != sText ||
- pFmtURL->GetName() != aNameED.GetText() ||
+ OUString(pFmtURL->GetName()) != aNameED.GetText() ||
aServerCB.IsChecked() != pFmtURL->IsServerMap() )
{
pFmtURL->SetURL( sText, aServerCB.IsChecked() );
@@ -2693,7 +2693,7 @@ sal_Bool SwFrmURLPage::FillItemSet(SfxItemSet &rSet)
bModified = sal_True;
}
- if(pFmtURL->GetTargetFrameName() != aFrameCB.GetText())
+ if(OUString(pFmtURL->GetTargetFrameName()) != aFrameCB.GetText())
{
pFmtURL->SetTargetFrameName(aFrameCB.GetText());
bModified = sal_True;
@@ -2982,9 +2982,9 @@ void SwFrmAddPage::Reset(const SfxItemSet &rSet )
sal_Bool SwFrmAddPage::FillItemSet(SfxItemSet &rSet)
{
sal_Bool bRet = sal_False;
- if (aNameED.GetText() != aNameED.GetSavedValue())
+ if (aNameED.GetText() != OUString(aNameED.GetSavedValue()))
bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_NAME, aNameED.GetText()));
- if (aAltNameED.GetText() != aAltNameED.GetSavedValue())
+ if (aAltNameED.GetText() != OUString(aAltNameED.GetSavedValue()))
bRet |= 0 != rSet.Put(SfxStringItem(FN_SET_FRM_ALT_NAME, aAltNameED.GetText()));
const SfxPoolItem* pOldItem;
@@ -3048,7 +3048,7 @@ sal_uInt16* SwFrmAddPage::GetRanges()
IMPL_LINK_NOARG(SwFrmAddPage, EditModifyHdl)
{
- sal_Bool bEnable = 0 != aNameED.GetText().Len();
+ sal_Bool bEnable = !aNameED.GetText().isEmpty();
aAltNameED.Enable(bEnable);
aAltNameFT.Enable(bEnable);
diff --git a/sw/source/ui/inc/dbinsdlg.hxx b/sw/source/ui/inc/dbinsdlg.hxx
index 56e6926ca068..600167ddbbf6 100644
--- a/sw/source/ui/inc/dbinsdlg.hxx
+++ b/sw/source/ui/inc/dbinsdlg.hxx
@@ -140,7 +140,7 @@ class SwInsertDBColAutoPilot : public SfxModalDialog, public utl::ConfigItem
SfxItemSet* pTblSet;
SwTableRep* pRep;
- sal_uInt16 nGBFmtLen;
+ sal_Int32 nGBFmtLen;
DECL_LINK( PageHdl, Button* );
DECL_LINK( AutoFmtHdl, PushButton* );
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index 3aca77b8afe7..26b8e917a630 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -106,7 +106,7 @@ public:
sal_uInt16 GetStyle() const { return nStyle; }
void SetStyle(const sal_uInt16 nSt) { nStyle = nSt; }
- String GetText() const;
+ OUString GetText() const;
};
#endif /* _SWLBOX_HXX */
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 7feb49d413c2..5c275f5cd034 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1059,7 +1059,7 @@ void SwTOXSelectTabPage::ApplyTOXDescription()
const CurTOXType aCurType = pTOXDlg->GetCurrentTOXType();
SwTOXDescription& rDesc = pTOXDlg->GetTOXDescription(aCurType);
aReadOnlyCB.Check(rDesc.IsReadonly());
- if(aTitleED.GetText() == aTitleED.GetSavedValue())
+ if(aTitleED.GetText() == OUString(aTitleED.GetSavedValue()))
{
if(rDesc.GetTitle())
aTitleED.SetText(*rDesc.GetTitle());
@@ -1625,9 +1625,9 @@ void SwTOXEdit::RequestHelp( const HelpEvent& rHEvt )
void SwTOXEdit::KeyInput( const KeyEvent& rKEvt )
{
const Selection& rSel = GetSelection();
- sal_uInt16 nTextLen = GetText().Len();
+ sal_Int32 nTextLen = GetText().getLength();
if((rSel.A() == rSel.B() &&
- !rSel.A()) || rSel.A() == nTextLen )
+ !rSel.A()) || rSel.A() == (sal_uInt16)nTextLen )
{
sal_Bool bCall = sal_False;
KeyCode aCode = rKEvt.GetKeyCode();
@@ -2732,8 +2732,8 @@ IMPL_LINK(SwTOXEntryTabPage, FillCharHdl, ComboBox*, pBox)
if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
{
sal_Unicode cSet;
- if( pBox->GetText().Len() )
- cSet = pBox->GetText().GetChar(0);
+ if( !pBox->GetText().isEmpty() )
+ cSet = pBox->GetText()[0];
else
cSet = ' ';
((SwTOXButton*)pCtrl)->SetFillChar( cSet );
@@ -3602,10 +3602,10 @@ IMPL_LINK(SwTokenWindow, NextItemBtnHdl, SwTOXButton*, pBtn )
if (!isNext)
{
- sal_uInt16 nLen = static_cast<SwTOXEdit*>(pCtrlFocus)->GetText().Len();
+ sal_Int32 nLen = static_cast<SwTOXEdit*>(pCtrlFocus)->GetText().getLength();
- aSel.A() = nLen;
- aSel.B() = nLen;
+ aSel.A() = (sal_uInt16)nLen;
+ aSel.B() = (sal_uInt16)nLen;
}
static_cast<SwTOXEdit*>(pCtrlFocus)->SetSelection(aSel);
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 9e2e3b0deff3..dfe6b4f83d34 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -488,7 +488,7 @@ void SwIndexMarkPane::InsertMark()
aDesc.SetTOUName(aName);
}
}
- if (aOrgStr != m_pEntryED->GetText())
+ if (OUString(aOrgStr) != m_pEntryED->GetText())
aDesc.SetAltStr(m_pEntryED->GetText());
sal_Bool bApplyAll = m_pApplyToAllCB->IsChecked();
sal_Bool bWordOnly = m_pSearchCaseWordOnlyCB->IsChecked();
@@ -516,7 +516,7 @@ void SwIndexMarkPane::InsertMark()
void SwIndexMarkPane::UpdateMark()
{
String aAltText(m_pEntryED->GetText());
- String* pAltText = aOrgStr != m_pEntryED->GetText() ? &aAltText : 0;
+ String* pAltText = OUString(aOrgStr) != m_pEntryED->GetText() ? &aAltText : 0;
//empty alternative texts are not allowed
if(pAltText && !pAltText->Len())
return;
@@ -613,7 +613,7 @@ void SwNewUserIdxDlg::Apply()
IMPL_LINK( SwNewUserIdxDlg, ModifyHdl, Edit*, pEdit)
{
- aOKPB.Enable(pEdit->GetText().Len() && !pDlg->IsTOXType(pEdit->GetText()));
+ aOKPB.Enable(!pEdit->GetText().isEmpty() && !pDlg->IsTOXType(pEdit->GetText()));
return 0;
}
@@ -680,19 +680,19 @@ IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox )
bKey2HasText = sal_False;
if(nPos == POS_INDEX)
{
- if(m_pEntryED->GetText().Len())
+ if(!m_pEntryED->GetText().isEmpty())
bEntryHasText = sal_True;
m_pPhoneticED0->SetText(GetDefaultPhoneticReading(m_pEntryED->GetText()));
bKeyEnable = sal_True;
m_pKey1DCB->SetText(m_pKey1DCB->GetEntry(nKey1Pos));
m_pPhoneticED1->SetText(GetDefaultPhoneticReading(m_pKey1DCB->GetText()));
- if(m_pKey1DCB->GetText().Len() > 0)
+ if(!m_pKey1DCB->GetText().isEmpty())
{
bKey1HasText = bSetKey2 = bKey2Enable = sal_True;
m_pKey2DCB->SetText(m_pKey2DCB->GetEntry(nKey2Pos));
m_pPhoneticED2->SetText(GetDefaultPhoneticReading(m_pKey2DCB->GetText()));
- if(m_pKey2DCB->GetText().Len())
+ if(!m_pKey2DCB->GetText().isEmpty())
bKey2HasText = sal_True;
}
}
@@ -723,7 +723,7 @@ IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox )
}
else //m_pEntryED !!m_pEntryED is not a ListBox but a Edit
{
- sal_Bool bHasText = (m_pEntryED->GetText().Len()>0);
+ sal_Bool bHasText = (!m_pEntryED->GetText().isEmpty());
if(!bHasText)
{
m_pPhoneticED0->SetText(aEmptyStr);
@@ -736,7 +736,7 @@ IMPL_LINK( SwIndexMarkPane, ModifyHdl, ListBox *, pBox )
m_pPhoneticED0->Enable(bHasText&&bIsPhoneticReadingEnabled);
}
m_pOKBT->Enable(!pSh->HasReadonlySel() &&
- (m_pEntryED->GetText().Len() || pSh->GetCrsrCnt(sal_False)));
+ (!m_pEntryED->GetText().isEmpty() || pSh->GetCrsrCnt(sal_False)));
return 0;
}
@@ -904,15 +904,15 @@ IMPL_LINK( SwIndexMarkPane, PhoneticEDModifyHdl, Edit *, pEdit )
{
if (m_pPhoneticED0 == pEdit)
{
- bPhoneticED0_ChangedByUser = pEdit->GetText().Len()>0;
+ bPhoneticED0_ChangedByUser = !pEdit->GetText().isEmpty();
}
else if (m_pPhoneticED1 == pEdit)
{
- bPhoneticED1_ChangedByUser = pEdit->GetText().Len()>0;
+ bPhoneticED1_ChangedByUser = !pEdit->GetText().isEmpty();
}
else if (m_pPhoneticED2 == pEdit)
{
- bPhoneticED2_ChangedByUser = pEdit->GetText().Len()>0;
+ bPhoneticED2_ChangedByUser = !pEdit->GetText().isEmpty();
}
return 0;
}
@@ -924,7 +924,7 @@ IMPL_LINK( SwIndexMarkPane, KeyDCBModifyHdl, ComboBox *, pBox )
{
if (m_pKey1DCB == pBox)
{
- sal_Bool bEnable = pBox->GetText().Len() > 0;
+ sal_Bool bEnable = !pBox->GetText().isEmpty();
if(!bEnable)
{
m_pKey2DCB->SetText(aEmptyStr);
@@ -948,7 +948,7 @@ IMPL_LINK( SwIndexMarkPane, KeyDCBModifyHdl, ComboBox *, pBox )
}
else if (m_pKey2DCB == pBox)
{
- if(!(pBox->GetText().Len()>0))
+ if(pBox->GetText().isEmpty())
{
m_pPhoneticED2->SetText(aEmptyStr);
bPhoneticED2_ChangedByUser = sal_False;
@@ -964,8 +964,8 @@ IMPL_LINK( SwIndexMarkPane, KeyDCBModifyHdl, ComboBox *, pBox )
m_pPhoneticED2->SetText(GetDefaultPhoneticReading(pBox->GetText()));
}
}
- sal_Bool bKey1HasText = (0 != m_pKey1DCB->GetText().Len());
- sal_Bool bKey2HasText = (0 != m_pKey2DCB->GetText().Len());
+ sal_Bool bKey1HasText = (!m_pKey1DCB->GetText().isEmpty());
+ sal_Bool bKey2HasText = (!m_pKey2DCB->GetText().isEmpty());
m_pPhoneticFT1->Enable(bKey1HasText&&bIsPhoneticReadingEnabled);
m_pPhoneticED1->Enable(bKey1HasText&bIsPhoneticReadingEnabled);
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 8ab55b4503d4..5d40a8b7b20e 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -103,10 +103,9 @@ void SwInsertBookmarkDlg::Apply()
}
// insert text mark
- sal_uInt16 nLen = m_pBookmarkBox->GetText().Len();
SwBoxEntry aTmpEntry(m_pBookmarkBox->GetText(), 0 );
- if ( nLen && (m_pBookmarkBox->GetEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND) )
+ if ( !m_pBookmarkBox->GetText().isEmpty() && (m_pBookmarkBox->GetEntryPos(aTmpEntry) == COMBOBOX_ENTRY_NOTFOUND) )
{
String sEntry(comphelper::string::remove(m_pBookmarkBox->GetText(),
m_pBookmarkBox->GetMultiSelectionSeparator()));
@@ -177,7 +176,7 @@ sal_uInt16 BookmarkCombo::GetSelEntryPos(sal_uInt16 nPos) const
for (; nPos < nCnt; nPos++)
{
- String sEntry(comphelper::string::strip(GetText().GetToken(nPos, cSep), ' '));
+ String sEntry(comphelper::string::strip(GetText().getToken(nPos, cSep), ' '));
if (GetEntryPos(sEntry) != COMBOBOX_ENTRY_NOTFOUND)
return nPos;
}
@@ -212,7 +211,7 @@ sal_uInt16 BookmarkCombo::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
if (nSelIndex == nCnt)
{
sal_Unicode cSep = GetMultiSelectionSeparator();
- String sEntry(comphelper::string::strip(GetText().GetToken(nPos, cSep), ' '));
+ String sEntry(comphelper::string::strip(GetText().getToken(nPos, cSep), ' '));
return GetEntryPos(sEntry);
}
nPos = GetNextSelEntryPos(nPos);
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index ecec7b1551a2..c5a38aefbc12 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -410,7 +410,7 @@ IMPL_LINK( SwGlossaryDlg, EnableHdl, Menu *, pMn )
SvTreeListEntry* pEntry = m_pCategoryBox->FirstSelected();
const String aEditText(m_pNameED->GetText());
- const sal_Bool bHasEntry = aEditText.Len() && m_pShortNameEdit->GetText().Len();
+ const sal_Bool bHasEntry = aEditText.Len() && !m_pShortNameEdit->GetText().isEmpty();
const sal_Bool bExists = 0 != DoesBlockExist(aEditText, m_pShortNameEdit->GetText());
const sal_Bool bIsGroup = pEntry && !m_pCategoryBox->GetParent(pEntry);
pMn->EnableItem("new", bSelection && bHasEntry && !bExists);
@@ -798,13 +798,13 @@ IMPL_LINK_NOARG_INLINE_END(SwGlossaryDlg, EditHdl)
------------------------------------------------------------------------*/
IMPL_LINK( SwNewGlosNameDlg, Modify, Edit *, pBox )
{
- String aName(aNewName.GetText());
+ OUString aName(aNewName.GetText());
SwGlossaryDlg* pDlg = (SwGlossaryDlg*)GetParent();
if( pBox == &aNewName )
aNewShort.SetText( lcl_GetValidShortCut( aName ) );
- sal_Bool bEnable = aName.Len() && aNewShort.GetText().Len() &&
+ sal_Bool bEnable = !aName.isEmpty() && !aNewShort.GetText().isEmpty() &&
(!pDlg->DoesBlockExist(aName, aNewShort.GetText())
|| aName == aOldName.GetText());
aOk.Enable(bEnable);
@@ -814,7 +814,7 @@ IMPL_LINK( SwNewGlosNameDlg, Modify, Edit *, pBox )
IMPL_LINK_NOARG(SwNewGlosNameDlg, Rename)
{
SwGlossaryDlg* pDlg = (SwGlossaryDlg*)GetParent();
- String sNew = GetAppCharClass().uppercase(aNewShort.GetText());
+ OUString sNew = GetAppCharClass().uppercase(aNewShort.GetText());
if( pDlg->pGlossaryHdl->HasShortName(aNewShort.GetText())
&& sNew != aOldShort.GetText() )
{
diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx
index 368550b6db5f..e455bfe992fa 100644
--- a/sw/source/ui/misc/insfnote.cxx
+++ b/sw/source/ui/misc/insfnote.cxx
@@ -87,7 +87,7 @@ void SwInsFootNoteDlg::Apply()
IMPL_LINK_NOARG_INLINE_START(SwInsFootNoteDlg, NumberCharHdl)
{
m_pNumberCharEdit->GrabFocus();
- m_pOkBtn->Enable( m_pNumberCharEdit->GetText().Len() || bExtCharAvailable );
+ m_pOkBtn->Enable( !m_pNumberCharEdit->GetText().isEmpty() || bExtCharAvailable );
return 0;
}
IMPL_LINK_NOARG_INLINE_END(SwInsFootNoteDlg, NumberCharHdl)
@@ -95,7 +95,7 @@ IMPL_LINK_NOARG_INLINE_END(SwInsFootNoteDlg, NumberCharHdl)
IMPL_LINK_NOARG_INLINE_START(SwInsFootNoteDlg, NumberEditHdl)
{
m_pNumberCharBtn->Check( sal_True );
- m_pOkBtn->Enable( 0 != m_pNumberCharEdit->GetText().Len() );
+ m_pOkBtn->Enable( !m_pNumberCharEdit->GetText().isEmpty() );
return 0;
}
@@ -143,7 +143,7 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl)
}
bExtCharAvailable = sal_True;
- m_pOkBtn->Enable(0 != m_pNumberCharEdit->GetText().Len());
+ m_pOkBtn->Enable(!m_pNumberCharEdit->GetText().isEmpty());
}
}
delete pDlg;
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index 159d54bd5e3c..4a7b87e6d4b5 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -191,7 +191,7 @@ IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl)
--------------------------------------------------------------------*/
IMPL_LINK_NOARG(SwLineNumberingDlg, ModifyHdl)
{
- bool bEnable = m_pNumberingOnCB->IsChecked() && m_pDivisorED->GetText().Len() != 0;
+ bool bEnable = m_pNumberingOnCB->IsChecked() && !m_pDivisorED->GetText().isEmpty();
m_pDivIntervalFT->Enable(bEnable);
m_pDivIntervalNF->Enable(bEnable);
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 5a4d9e31d45f..a5d114266984 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -117,7 +117,7 @@ void SwNumNamesDlg::SetUserNames(const String *pList[])
------------------------------------------------------------------------*/
IMPL_LINK_INLINE_START( SwNumNamesDlg, ModifyHdl, Edit *, pBox )
{
- aOKBtn.Enable(0 != pBox->GetText().Len());
+ aOKBtn.Enable(!pBox->GetText().isEmpty());
return 0;
}
IMPL_LINK_INLINE_END( SwNumNamesDlg, ModifyHdl, Edit *, pBox )
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index 78f73fc72901..28d0566ef3a1 100644
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -550,7 +550,7 @@ void InputEdit::UpdateRange(const String& rBoxes,
//OS: mit dem folgenden Ausdruck wird sichergestellt, dass im overwrite-Modus
//die selektierte schliessende Klammer nicht geloescht wird
if( nSel && ( nSel > 1 ||
- GetText().GetChar( (sal_uInt16)aSelection.Min() ) != cClose ) )
+ GetText()[ (sal_uInt16)aSelection.Min() ] != cClose ))
Cut();
else
aSelection.Max() = aSelection.Min();
@@ -617,7 +617,7 @@ void InputEdit::UpdateRange(const String& rBoxes,
aActText.Insert( aTmp, nPos );
nPos = nPos + aTmp.getLength();
}
- if( GetText() != aActText )
+ if( GetText() != OUString(aActText) )
{
SetText( aActText );
SetSelection( Selection( nPos, nPos ) );
diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx
index e1bc1d6e272e..2beeaef07aa6 100644
--- a/sw/source/ui/table/convert.cxx
+++ b/sw/source/ui/table/convert.cxx
@@ -61,9 +61,9 @@ void SwConvertTableDlg::GetValues( sal_Unicode& rDelim,
rDelim = ';';
nSaveButtonState = 1;
}
- else if( mpOtherBtn->IsChecked() && mpOtherEd->GetText().Len() )
+ else if( mpOtherBtn->IsChecked() && !mpOtherEd->GetText().isEmpty() )
{
- uOther = mpOtherEd->GetText().GetChar( 0 );
+ uOther = mpOtherEd->GetText()[0];
rDelim = uOther;
nSaveButtonState = 3;
}
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index cb8f631c006d..4c4da43aca89 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -398,8 +398,8 @@ sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
if(bModified)
{
- if( m_pBottomMF->GetText() != m_pBottomMF->GetSavedValue() ||
- m_pTopMF->GetText() != m_pTopMF->GetSavedValue() )
+ if( m_pBottomMF->GetText() != OUString(m_pBottomMF->GetSavedValue()) ||
+ m_pTopMF->GetText() != OUString(m_pTopMF->GetSavedValue()) )
{
SvxULSpaceItem aULSpace(RES_UL_SPACE);
aULSpace.SetUpper( (sal_uInt16) m_pTopMF->Denormalize(
@@ -410,7 +410,7 @@ sal_Bool SwFormatTablePage::FillItemSet( SfxItemSet& rCoreSet )
}
}
- if(m_pNameED->GetText() != m_pNameED->GetSavedValue())
+ if(m_pNameED->GetText() != OUString(m_pNameED->GetSavedValue()))
{
rCoreSet.Put(SfxStringItem( FN_PARAM_TABLE_NAME, m_pNameED->GetText()));
bModified = sal_True;
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index 3c97f1d24c19..1163e5d9903c 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -461,7 +461,7 @@ void VCLXButton::setActionCommand( const ::rtl::OUString& rCommand ) throw(::com
{
Size aMinSz = pButton->CalcMinimumSize();
// no text, thus image
- if ( !pButton->GetText().Len() )
+ if ( pButton->GetText().isEmpty() )
{
if ( aSz.Width() < aMinSz.Width() )
aSz.Width() = aMinSz.Width();
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index 306b06fb247f..f4e6fa990e50 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -319,7 +319,7 @@ void LoginDialog::ClearPassword()
{
aPasswordED.SetText( String() );
- if ( 0 == aNameED.GetText().Len() )
+ if ( aNameED.GetText().isEmpty() )
aNameED.GrabFocus();
else
aPasswordED.GrabFocus();
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index 48a24358a4e9..e79b834ae2ad 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -30,7 +30,7 @@
IMPL_LINK_NOARG(MasterPasswordCreateDialog, EditHdl_Impl)
{
- aOKBtn.Enable( aEDMasterPasswordCrt.GetText().Len() >= nMinLen );
+ aOKBtn.Enable( aEDMasterPasswordCrt.GetText().getLength() >= nMinLen );
return 0;
}
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index be61bccdbb99..1ebc8b58d627 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -160,7 +160,7 @@ PasswordDialog::PasswordDialog(
IMPL_LINK_NOARG(PasswordDialog, OKHdl_Impl)
{
- bool bEDPasswdValid = aEDPassword.GetText().Len() >= nMinLen;
+ bool bEDPasswdValid = aEDPassword.GetText().getLength() >= nMinLen;
bool bPasswdMismatch = aEDConfirmPassword.GetText() != aEDPassword.GetText();
bool bValid = (!aEDConfirmPassword.IsVisible() && bEDPasswdValid) ||
(aEDConfirmPassword.IsVisible() && bEDPasswdValid && !bPasswdMismatch);
diff --git a/vcl/inc/helpwin.hxx b/vcl/inc/helpwin.hxx
index 63f91dde34ee..6923c2bedc95 100644
--- a/vcl/inc/helpwin.hxx
+++ b/vcl/inc/helpwin.hxx
@@ -48,7 +48,7 @@ protected:
DECL_LINK( TimerHdl, Timer* );
virtual void Paint( const Rectangle& );
virtual void RequestHelp( const HelpEvent& rHEvt );
- virtual String GetText() const;
+ virtual OUString GetText() const;
void ImplShow();
public:
diff --git a/vcl/inc/vcl/combobox.hxx b/vcl/inc/vcl/combobox.hxx
index d0364105afb6..499479778160 100644
--- a/vcl/inc/vcl/combobox.hxx
+++ b/vcl/inc/vcl/combobox.hxx
@@ -123,8 +123,8 @@ public:
void EnableDDAutoWidth( sal_Bool b );
- void SetText( const XubString& rStr );
- void SetText( const XubString& rStr, const Selection& rNewSelection );
+ void SetText( const OUString& rStr );
+ void SetText( const OUString& rStr, const Selection& rNewSelection );
sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = COMBOBOX_APPEND );
sal_uInt16 InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos = COMBOBOX_APPEND );
diff --git a/vcl/inc/vcl/ctrl.hxx b/vcl/inc/vcl/ctrl.hxx
index bd178f05657c..03ddcdce8b4d 100644
--- a/vcl/inc/vcl/ctrl.hxx
+++ b/vcl/inc/vcl/ctrl.hxx
@@ -136,9 +136,9 @@ public:
virtual void DataChanged( const DataChangedEvent& rDCEvt );
// invalidates layout data
- virtual void SetText( const String& rStr );
+ virtual void SetText( const OUString& rStr );
// gets the displayed text
- virtual String GetDisplayText() const;
+ virtual OUString GetDisplayText() const;
// returns the bounding box for the character at index nIndex (in control coordinates)
Rectangle GetCharacterBounds( long nIndex ) const;
// returns the character index for corresponding to rPoint (in control coordinates)
diff --git a/vcl/inc/vcl/edit.hxx b/vcl/inc/vcl/edit.hxx
index 10d3fe44a160..73b35850faa1 100644
--- a/vcl/inc/vcl/edit.hxx
+++ b/vcl/inc/vcl/edit.hxx
@@ -206,9 +206,9 @@ public:
virtual void Paste();
void Undo();
- virtual void SetText( const XubString& rStr );
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection );
- virtual XubString GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual void SetText( const OUString& rStr, const Selection& rNewSelection );
+ virtual OUString GetText() const;
virtual void SetPlaceholderText( const OUString& rStr );
virtual OUString GetPlaceholderText() const;
diff --git a/vcl/inc/vcl/fixedhyper.hxx b/vcl/inc/vcl/fixedhyper.hxx
index 1d609f006641..b43e4bd7fd6e 100644
--- a/vcl/inc/vcl/fixedhyper.hxx
+++ b/vcl/inc/vcl/fixedhyper.hxx
@@ -119,7 +119,7 @@
OUString GetURL() const;
/** sets new text and recalculates the text length. */
- virtual void SetText(const String& rNewDescription);
+ virtual void SetText(const OUString& rNewDescription);
};
#endif
diff --git a/vcl/inc/vcl/longcurr.hxx b/vcl/inc/vcl/longcurr.hxx
index a0388d72b8b6..e80ed7019f74 100644
--- a/vcl/inc/vcl/longcurr.hxx
+++ b/vcl/inc/vcl/longcurr.hxx
@@ -70,7 +70,7 @@ public:
void SetValue( BigInt nNewValue );
void SetUserValue( BigInt nNewValue );
BigInt GetValue() const;
- sal_Bool IsEmptyValue() const { return !GetField()->GetText().Len(); }
+ sal_Bool IsEmptyValue() const { return GetField()->GetText().isEmpty(); }
BigInt GetCorrectedValue() const { return mnCorrectedValue; }
};
diff --git a/vcl/inc/vcl/menu.hxx b/vcl/inc/vcl/menu.hxx
index 6d7b967b85b3..4f4b2581c641 100644
--- a/vcl/inc/vcl/menu.hxx
+++ b/vcl/inc/vcl/menu.hxx
@@ -137,7 +137,7 @@ private:
VclEventListeners maEventListeners;
VclEventListeners maChildEventListeners;
- XubString aTitleText; // PopupMenu text
+ OUString aTitleText; // PopupMenu text
sal_uLong nEventId;
sal_uInt16 mnHighlightedItemPos; // for native menus: keeps track of the highlighted item
@@ -482,8 +482,8 @@ public:
PopupMenu( const ResId& rResId );
~PopupMenu();
- void SetText( const XubString& rTitle ) { aTitleText = rTitle; }
- const XubString& GetText() const { return aTitleText; }
+ void SetText( const OUString& rTitle ) { aTitleText = rTitle; }
+ const OUString& GetText() const { return aTitleText; }
sal_uInt16 Execute( Window* pWindow, const Point& rPopupPos );
sal_uInt16 Execute( Window* pWindow, const Rectangle& rRect, sal_uInt16 nFlags = 0 );
diff --git a/vcl/inc/vcl/morebtn.hxx b/vcl/inc/vcl/morebtn.hxx
index bdfd99f28540..71722650651c 100644
--- a/vcl/inc/vcl/morebtn.hxx
+++ b/vcl/inc/vcl/morebtn.hxx
@@ -66,10 +66,10 @@ public:
using PushButton::SetState;
void SetState( sal_Bool bNewState = sal_True );
- sal_Bool GetState() const { return mbState; }
+ sal_Bool GetState() const { return mbState; }
- void SetText( const XubString& rNewText );
- XubString GetText() const;
+ void SetText( const OUString& rNewText );
+ OUString GetText() const;
void SetMoreText( const XubString& rNewText );
void SetLessText( const XubString& rNewText );
diff --git a/vcl/inc/vcl/status.hxx b/vcl/inc/vcl/status.hxx
index 512e0c54f107..70ea7d65a62a 100644
--- a/vcl/inc/vcl/status.hxx
+++ b/vcl/inc/vcl/status.hxx
@@ -168,7 +168,7 @@ public:
void EndProgressMode();
sal_Bool IsProgressMode() const { return mbProgressMode; }
- void SetText( const XubString& rText );
+ void SetText( const OUString& rText );
void SetHelpText( const XubString& rText )
{ Window::SetHelpText( rText ); }
diff --git a/vcl/inc/vcl/texteng.hxx b/vcl/inc/vcl/texteng.hxx
index 414192fed956..e5f45822a33c 100644
--- a/vcl/inc/vcl/texteng.hxx
+++ b/vcl/inc/vcl/texteng.hxx
@@ -223,7 +223,7 @@ public:
TextEngine();
~TextEngine();
- void SetText( const String& rStr );
+ void SetText( const OUString& rStr );
String GetText( LineEnd aSeparator = LINEEND_LF ) const;
String GetText( const TextSelection& rSel, LineEnd aSeparator = LINEEND_LF ) const;
String GetTextLines( LineEnd aSeparator = LINEEND_LF ) const;
diff --git a/vcl/inc/vcl/toolbox.hxx b/vcl/inc/vcl/toolbox.hxx
index 54ad3f6670b8..b15af093c3d4 100644
--- a/vcl/inc/vcl/toolbox.hxx
+++ b/vcl/inc/vcl/toolbox.hxx
@@ -569,7 +569,7 @@ public:
// accessibility helpers
// gets the displayed text
- String GetDisplayText() const;
+ OUString GetDisplayText() const;
// returns the bounding box for the character at index nIndex
// where nIndex is relative to the starting index of the item
// with id nItemId (in coordinates of the displaying window)
diff --git a/vcl/inc/vcl/vclmedit.hxx b/vcl/inc/vcl/vclmedit.hxx
index 111135065115..748f761550ea 100644
--- a/vcl/inc/vcl/vclmedit.hxx
+++ b/vcl/inc/vcl/vclmedit.hxx
@@ -93,11 +93,11 @@ public:
virtual void Copy();
virtual void Paste();
- virtual void SetText( const XubString& rStr );
- virtual void SetText( const XubString& rStr, const Selection& rNewSelection )
+ virtual void SetText( const OUString& rStr );
+ virtual void SetText( const OUString& rStr, const Selection& rNewSelection )
{ SetText( rStr ); SetSelection( rNewSelection ); }
- String GetText() const;
- String GetText( LineEnd aSeparator ) const;
+ OUString GetText() const;
+ OUString GetText( LineEnd aSeparator ) const;
String GetTextLines( LineEnd aSeparator ) const;
void SetRightToLeft( sal_Bool bRightToLeft );
diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx
index 8b902aaaf311..bdb588583c0c 100644
--- a/vcl/inc/vcl/window.hxx
+++ b/vcl/inc/vcl/window.hxx
@@ -908,12 +908,12 @@ public:
sal_Bool IsZoom() const;
long CalcZoom( long n ) const;
- virtual void SetText( const XubString& rStr );
- virtual String GetText() const;
+ virtual void SetText( const OUString& rStr );
+ virtual OUString GetText() const;
// return the actual text displayed
// this may have e.g. accellerators removed or portions
// replaced by ellipsis
- virtual String GetDisplayText() const;
+ virtual OUString GetDisplayText() const;
// gets the visible background color. for transparent windows
// this may be the parent's background color; for controls
// this may be a child's background color (e.g. ListBox)
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index f9241dd128c9..b172eb46f699 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -530,7 +530,7 @@ void HelpTextWindow::RequestHelp( const HelpEvent& /*rHEvt*/ )
// -----------------------------------------------------------------------
-XubString HelpTextWindow::GetText() const
+OUString HelpTextWindow::GetText() const
{
return maHelpText;
}
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index d99c6cc64129..6f0ad62f5e78 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -977,7 +977,7 @@ void PushButton::ImplDrawPushButton( bool bLayout )
break;
}
- sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
+ sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && GetText().isEmpty() );
if( bDropDown && (aCtrlType == CTRL_COMBOBOX || aCtrlType == CTRL_LISTBOX ) )
{
@@ -1557,7 +1557,7 @@ long PushButton::PreNotify( NotifyEvent& rNEvt )
break;
}
- sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && !GetText().Len() );
+ sal_Bool bDropDown = ( IsSymbol() && (GetSymbol()==SYMBOL_SPIN_DOWN) && GetText().isEmpty() );
if( bDropDown && GetParent()->IsNativeControlSupported( aCtrlType, PART_ENTIRE_CONTROL) &&
!GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN) )
@@ -1689,7 +1689,7 @@ Size PushButton::CalcMinimumSize( long nMaxWidth ) const
}
else if ( IsImage() && ! (ImplGetButtonState() & BUTTON_DRAW_NOIMAGE) )
aSize = GetModeImage().GetSizePixel();
- if ( PushButton::GetText().Len() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ if ( !PushButton::GetText().isEmpty() && ! (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
sal_uLong nDrawFlags = 0;
Size textSize = GetTextRect( Rectangle( Point(), Size( nMaxWidth ? nMaxWidth : 0x7fffffff, 0x7fffffff ) ),
@@ -3631,7 +3631,7 @@ void CheckBox::Resize()
void CheckBox::GetFocus()
{
- if ( !GetText().Len() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ if ( GetText().isEmpty() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
// increase button size to have space for focus rect
// checkboxes without text will draw focusrect around the check
@@ -3664,7 +3664,7 @@ void CheckBox::LoseFocus()
HideFocus();
Button::LoseFocus();
- if ( !GetText().Len() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
+ if ( GetText().isEmpty() || (ImplGetButtonState() & BUTTON_DRAW_NOTEXT) )
{
// decrease button size again (see GetFocus())
// checkboxes without text will draw focusrect around the check
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 75f4e307e5e4..673001d46de9 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -606,7 +606,7 @@ void ComboBox::Resize()
{
mpSubEdit->SetSizePixel( Size( aOutSz.Width(), mnDDHeight ) );
mpImplLB->setPosSizePixel( 0, mnDDHeight, aOutSz.Width(), aOutSz.Height() - mnDDHeight );
- if ( GetText().Len() )
+ if ( !GetText().isEmpty() )
ImplUpdateFloatSelection();
}
@@ -824,7 +824,7 @@ long ComboBox::Notify( NotifyEvent& rNEvt )
// -----------------------------------------------------------------------
-void ComboBox::SetText( const XubString& rStr )
+void ComboBox::SetText( const OUString& rStr )
{
ImplCallEventListeners( VCLEVENT_COMBOBOX_SETTEXT );
@@ -834,7 +834,7 @@ void ComboBox::SetText( const XubString& rStr )
// -----------------------------------------------------------------------
-void ComboBox::SetText( const XubString& rStr, const Selection& rNewSelection )
+void ComboBox::SetText( const OUString& rStr, const Selection& rNewSelection )
{
ImplCallEventListeners( VCLEVENT_COMBOBOX_SETTEXT );
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 4da8279add86..845aba829795 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -131,7 +131,7 @@ bool Control::HasLayoutData() const
// -----------------------------------------------------------------------
-void Control::SetText( const String& rStr )
+void Control::SetText( const OUString& rStr )
{
ImplClearLayoutData();
Window::SetText( rStr );
@@ -271,11 +271,11 @@ long Control::ToRelativeLineIndex( long nIndex ) const
// -----------------------------------------------------------------------
-String Control::GetDisplayText() const
+OUString Control::GetDisplayText() const
{
if( !HasLayoutData() )
FillLayoutData();
- return mpControlData->mpLayoutData ? mpControlData->mpLayoutData->m_aDisplayText : GetText();
+ return mpControlData->mpLayoutData ? OUString(mpControlData->mpLayoutData->m_aDisplayText) : GetText();
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 3e177d09a184..14765a54bb00 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2813,7 +2813,7 @@ void Edit::Undo()
// -----------------------------------------------------------------------
-void Edit::SetText( const XubString& rStr )
+void Edit::SetText( const OUString& rStr )
{
if ( mpSubEdit )
mpSubEdit->SetText( rStr ); // not directly ImplSetText if SetText overloaded
@@ -2826,7 +2826,7 @@ void Edit::SetText( const XubString& rStr )
// -----------------------------------------------------------------------
-void Edit::SetText( const XubString& rStr, const Selection& rSelection )
+void Edit::SetText( const OUString& rStr, const Selection& rSelection )
{
if ( mpSubEdit )
mpSubEdit->SetText( rStr, rSelection );
@@ -2836,7 +2836,7 @@ void Edit::SetText( const XubString& rStr, const Selection& rSelection )
// -----------------------------------------------------------------------
-XubString Edit::GetText() const
+OUString Edit::GetText() const
{
if ( mpSubEdit )
return mpSubEdit->GetText();
@@ -2853,7 +2853,7 @@ void Edit::SetPlaceholderText( const OUString& rStr )
else if ( maPlaceholderText != rStr )
{
maPlaceholderText = rStr;
- if ( GetText().Len() == 0 )
+ if ( GetText().isEmpty() )
Invalidate();
}
}
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 8d0a3403a5e9..387acea494a9 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -425,7 +425,7 @@ void FormatterBase::SetEmptyFieldValue()
sal_Bool FormatterBase::IsEmptyFieldValue() const
{
- return (!mpField || !mpField->GetText().Len());
+ return (!mpField || mpField->GetText().isEmpty());
}
// -----------------------------------------------------------------------
@@ -688,7 +688,7 @@ void NumericFormatter::Reformat()
if ( !GetField() )
return;
- if ( !GetField()->GetText().Len() && ImplGetEmptyFieldValue() )
+ if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
XubString aStr;
@@ -756,9 +756,9 @@ void NumericFormatter::ImplNewFieldValue( sal_Int64 nNewValue )
Selection aSelection = GetField()->GetSelection();
aSelection.Justify();
- XubString aText = GetField()->GetText();
+ OUString aText = GetField()->GetText();
// leave it as is if selected until end
- if ( (xub_StrLen)aSelection.Max() == aText.Len() )
+ if ( (sal_Int32)aSelection.Max() == aText.getLength() )
{
if ( !aSelection.Len() )
aSelection.Min() = SELECTION_MAX;
@@ -858,7 +858,7 @@ long NumericField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -1016,7 +1016,7 @@ long NumericBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -1833,7 +1833,7 @@ long MetricField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -1959,7 +1959,7 @@ long MetricBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -2245,7 +2245,7 @@ long CurrencyField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -2347,7 +2347,7 @@ long CurrencyBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 4193b1416d2a..c56a42a62ba6 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -889,7 +889,7 @@ long PatternField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -949,7 +949,7 @@ long PatternBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
@@ -1744,10 +1744,10 @@ void DateFormatter::ImplNewFieldValue( const Date& rDate )
{
Selection aSelection = GetField()->GetSelection();
aSelection.Justify();
- XubString aText = GetField()->GetText();
+ OUString aText = GetField()->GetText();
// If selected until the end then keep it that way
- if ( (xub_StrLen)aSelection.Max() == aText.Len() )
+ if ( (sal_Int32)aSelection.Max() == aText.getLength() )
{
if ( !aSelection.Len() )
aSelection.Min() = SELECTION_MAX;
@@ -1817,7 +1817,7 @@ sal_Bool DateFormatter::IsEmptyDate() const
if ( GetField() && MustBeReformatted() && IsEmptyFieldValueEnabled() )
{
- if ( !GetField()->GetText().Len() )
+ if ( GetField()->GetText().isEmpty() )
{
bEmpty = sal_True;
}
@@ -1837,7 +1837,7 @@ void DateFormatter::Reformat()
if ( !GetField() )
return;
- if ( !GetField()->GetText().Len() && ImplGetEmptyFieldValue() )
+ if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
XubString aStr;
@@ -1979,7 +1979,7 @@ long DateField::Notify( NotifyEvent& rNEvt )
// !!! We should find out why dates are treated differently than other fields (see
// also bug: 52384)
- sal_Bool bTextLen = GetText().Len() != 0;
+ sal_Bool bTextLen = !GetText().isEmpty();
if ( bTextLen || !IsEmptyFieldValueEnabled() )
{
if ( !ImplAllowMalformedInput() )
@@ -2113,7 +2113,7 @@ long DateBox::Notify( NotifyEvent& rNEvt )
{
if ( MustBeReformatted() )
{
- sal_Bool bTextLen = GetText().Len() != 0;
+ sal_Bool bTextLen = !GetText().isEmpty();
if ( bTextLen || !IsEmptyFieldValueEnabled() )
Reformat();
else if ( !bTextLen && IsEmptyFieldValueEnabled() )
@@ -2706,10 +2706,10 @@ void TimeFormatter::ImplNewFieldValue( const Time& rTime )
{
Selection aSelection = GetField()->GetSelection();
aSelection.Justify();
- XubString aText = GetField()->GetText();
+ OUString aText = GetField()->GetText();
// If selected until the end then keep it that way
- if ( (xub_StrLen)aSelection.Max() == aText.Len() )
+ if ( (sal_Int32)aSelection.Max() == aText.getLength() )
{
if ( !aSelection.Len() )
aSelection.Min() = SELECTION_MAX;
@@ -2829,7 +2829,7 @@ void TimeFormatter::Reformat()
if ( !GetField() )
return;
- if ( !GetField()->GetText().Len() && ImplGetEmptyFieldValue() )
+ if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
XubString aStr;
@@ -2930,7 +2930,7 @@ long TimeField::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
{
if ( !ImplAllowMalformedInput() )
Reformat();
@@ -3051,7 +3051,7 @@ void TimeField::SetExtFormat( ExtTimeFieldFormat eFormat )
default: OSL_FAIL( "ExtTimeFieldFormat unknown!" );
}
- if ( GetField() && GetField()->GetText().Len() )
+ if ( GetField() && !GetField()->GetText().isEmpty() )
SetUserTime( GetTime() );
ReformatAll();
}
@@ -3093,7 +3093,7 @@ long TimeBox::Notify( NotifyEvent& rNEvt )
MarkToBeReformatted( sal_False );
else if ( rNEvt.GetType() == EVENT_LOSEFOCUS )
{
- if ( MustBeReformatted() && (GetText().Len() || !IsEmptyFieldValueEnabled()) )
+ if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) )
Reformat();
}
diff --git a/vcl/source/control/fixedhyper.cxx b/vcl/source/control/fixedhyper.cxx
index 9bfd0b880b70..78ad694d2c10 100644
--- a/vcl/source/control/fixedhyper.cxx
+++ b/vcl/source/control/fixedhyper.cxx
@@ -115,7 +115,7 @@ OUString FixedHyperlink::GetURL() const
return m_sURL;
}
-void FixedHyperlink::SetText(const String& rNewDescription)
+void FixedHyperlink::SetText(const OUString& rNewDescription)
{
FixedText::SetText(rNewDescription);
m_nTextLen = GetCtrlTextWidth(GetText());
diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx
index e9a8330217a9..d84b404bec59 100644
--- a/vcl/source/control/longcurr.cxx
+++ b/vcl/source/control/longcurr.cxx
@@ -413,7 +413,7 @@ void LongCurrencyFormatter::Reformat()
if ( !GetField() )
return;
- if ( !GetField()->GetText().Len() && ImplGetEmptyFieldValue() )
+ if ( GetField()->GetText().isEmpty() && ImplGetEmptyFieldValue() )
return;
XubString aStr;
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 6109045f3426..337bdc6d7519 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -206,14 +206,14 @@ void MoreButton::AddWindow( Window* pWindow )
// -----------------------------------------------------------------------
-void MoreButton::SetText( const XubString& rText )
+void MoreButton::SetText( const OUString& rText )
{
PushButton::SetText( rText );
}
// -----------------------------------------------------------------------
-XubString MoreButton::GetText() const
+OUString MoreButton::GetText() const
{
return PushButton::GetText();
}
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index cf7fcc785955..2bd7234ab926 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -445,7 +445,7 @@ void TextEngine::ImpRemoveText()
ResetUndo();
}
-void TextEngine::SetText( const XubString& rText )
+void TextEngine::SetText( const OUString& rText )
{
ImpRemoveText();
@@ -457,7 +457,7 @@ void TextEngine::SetText( const XubString& rText )
TextSelection aEmptySel( aStartPaM, aStartPaM );
TextPaM aPaM = aStartPaM;
- if ( rText.Len() )
+ if ( !rText.isEmpty() )
aPaM = ImpInsertText( aEmptySel, rText );
for ( sal_uInt16 nView = 0; nView < mpViews->size(); nView++ )
@@ -467,11 +467,11 @@ void TextEngine::SetText( const XubString& rText )
// Wenn kein Text, dann auch Kein Format&Update
// => Der Text bleibt stehen.
- if ( !rText.Len() && GetUpdateMode() )
+ if ( rText.isEmpty() && GetUpdateMode() )
pView->Invalidate();
}
- if( !rText.Len() ) // sonst muss spaeter noch invalidiert werden, !bFormatted reicht.
+ if( rText.isEmpty() ) // sonst muss spaeter noch invalidiert werden, !bFormatted reicht.
mnCurTextHeight = 0;
FormatAndUpdate();
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 23109d612ada..7bcde9360b2b 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -128,8 +128,8 @@ public:
void Copy();
void Paste();
- void SetText( const String& rStr );
- String GetText() const;
+ void SetText( const OUString& rStr );
+ OUString GetText() const;
String GetText( LineEnd aSeparator ) const;
String GetTextLines( LineEnd aSeparator ) const;
@@ -491,7 +491,7 @@ void ImpVclMEdit::Paste()
mpTextWindow->GetTextView()->Paste();
}
-void ImpVclMEdit::SetText( const String& rStr )
+void ImpVclMEdit::SetText( const OUString& rStr )
{
sal_Bool bWasModified = mpTextWindow->GetTextEngine()->IsModified();
mpTextWindow->GetTextEngine()->SetText( rStr );
@@ -505,7 +505,7 @@ void ImpVclMEdit::SetText( const String& rStr )
ImpUpdateSrollBarVis( nWinStyle );
}
-String ImpVclMEdit::GetText() const
+OUString ImpVclMEdit::GetText() const
{
return mpTextWindow->GetTextEngine()->GetText();
}
@@ -1161,17 +1161,17 @@ void VclMultiLineEdit::Paste()
pImpVclMEdit->Paste();
}
-void VclMultiLineEdit::SetText( const String& rStr )
+void VclMultiLineEdit::SetText( const OUString& rStr )
{
pImpVclMEdit->SetText( rStr );
}
-String VclMultiLineEdit::GetText() const
+OUString VclMultiLineEdit::GetText() const
{
return pImpVclMEdit->GetText();
}
-String VclMultiLineEdit::GetText( LineEnd aSeparator ) const
+OUString VclMultiLineEdit::GetText( LineEnd aSeparator ) const
{
return pImpVclMEdit->GetText( aSeparator );
}
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 4ca8573707a1..92ce3175b682 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -656,7 +656,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags )
// remove title
mnOldTitle = mnTitle;
- if ( ( mpWindowImpl->mnStyle & WB_POPUP ) && GetText().Len() )
+ if ( ( mpWindowImpl->mnStyle & WB_POPUP ) && !GetText().isEmpty() )
SetTitleType( FLOATWIN_TITLE_POPUP );
else if ( nFlags & FLOATWIN_POPUPMODE_ALLOWTEAROFF )
SetTitleType( FLOATWIN_TITLE_TEAROFF );
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 6aca66e50320..c7d0e3680c09 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -437,7 +437,7 @@ Size MessBox::GetOptimalSize() const
void InfoBox::ImplInitInfoBoxData()
{
// Default Text is the display title from the application
- if ( !GetText().Len() )
+ if ( GetText().isEmpty() )
SetText( Application::GetDisplayName() );
SetImage( InfoBox::GetStandardImage() );
@@ -472,7 +472,7 @@ Image InfoBox::GetStandardImage()
void WarningBox::ImplInitWarningBoxData()
{
// Default Text is the display title from the application
- if ( !GetText().Len() )
+ if ( GetText().isEmpty() )
SetText( Application::GetDisplayName() );
SetImage( WarningBox::GetStandardImage() );
@@ -517,7 +517,7 @@ Image WarningBox::GetStandardImage()
void ErrorBox::ImplInitErrorBoxData()
{
// Default Text is the display title from the application
- if ( !GetText().Len() )
+ if ( GetText().isEmpty() )
SetText( Application::GetDisplayName() );
SetImage( ErrorBox::GetStandardImage() );
@@ -562,7 +562,7 @@ Image ErrorBox::GetStandardImage()
void QueryBox::ImplInitQueryBoxData()
{
// Default Text is the display title from the application
- if ( !GetText().Len() )
+ if ( GetText().isEmpty() )
SetText( Application::GetDisplayName() );
SetImage( QueryBox::GetStandardImage() );
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index dbd9edda3f0c..fca03519c4ff 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -1366,7 +1366,7 @@ void StatusBar::EndProgressMode()
// -----------------------------------------------------------------------
-void StatusBar::SetText( const XubString& rText )
+void StatusBar::SetText( const OUString& rText )
{
if ( (!mbVisibleItems || (GetStyle() & WB_RIGHT)) && !mbProgressMode &&
IsReallyVisible() && IsUpdateMode() )
diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 19399da16f22..081f524d0d34 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1820,11 +1820,11 @@ void ToolBox::ImplFillLayoutData() const
// -----------------------------------------------------------------------
-String ToolBox::GetDisplayText() const
+OUString ToolBox::GetDisplayText() const
{
if( ! mpData->m_pLayoutData )
ImplFillLayoutData();
- return mpData->m_pLayoutData ? mpData->m_pLayoutData->m_aDisplayText : String();
+ return mpData->m_pLayoutData ? OUString(mpData->m_pLayoutData->m_aDisplayText) : OUString();
}
// -----------------------------------------------------------------------
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index ac33c4565c60..90db221142ec 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -7833,9 +7833,9 @@ void Window::SetCursor( Cursor* pCursor )
// -----------------------------------------------------------------------
-void Window::SetText( const XubString& rStr )
+void Window::SetText( const OUString& rStr )
{
- if (rStr == mpWindowImpl->maText)
+ if (rStr == OUString(mpWindowImpl->maText))
return;
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7866,7 +7866,7 @@ void Window::SetText( const XubString& rStr )
// -----------------------------------------------------------------------
-String Window::GetText() const
+OUString Window::GetText() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7875,7 +7875,7 @@ String Window::GetText() const
// -----------------------------------------------------------------------
-String Window::GetDisplayText() const
+OUString Window::GetDisplayText() const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx
index d932c5d7d22c..53fa8c270ef2 100644
--- a/vcl/unx/generic/app/i18n_status.cxx
+++ b/vcl/unx/generic/app/i18n_status.cxx
@@ -281,7 +281,7 @@ IMPL_LINK_NOARG(XIMStatusWindow, DelayedShowHdl)
void XIMStatusWindow::show( bool bShow, I18NStatus::ShowReason eReason )
{
- if( bShow && ! m_aStatusText.GetText().Len() )
+ if( bShow && m_aStatusText.GetText().isEmpty() )
bShow = false;
m_bDelayedShow = bShow;
@@ -342,7 +342,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) :
m_bShow( true ),
m_bOn( bOn )
{
- SetText( String( RTL_CONSTASCII_USTRINGPARAM( "IME Status" ) ) );
+ SetText( OUString( "IME Status" ) );
layout();