[Libreoffice-commits] core.git: 43 commits - accessibility/inc accessibility/source basctl/source basic/source cppcanvas/source desktop/source drawinglayer/source editeng/source fileaccess/source filter/source formula/source framework/inc framework/source idl/inc idl/source include/editeng include/filter include/formula lingucomponent/source reportdesign/source sc/inc sc/source svtools/source sw/inc sw/source toolkit/source vcl/inc vcl/source
Noel Grandin
noel at peralex.com
Tue Sep 17 00:50:11 PDT 2013
accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx | 2
accessibility/inc/accessibility/helper/listboxhelper.hxx | 2
accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx | 2
accessibility/source/extended/accessibleiconchoicectrlentry.cxx | 8
accessibility/source/extended/accessiblelistboxentry.cxx | 8
basctl/source/basicide/basobj2.cxx | 6
basctl/source/basicide/basobj3.cxx | 2
basctl/source/inc/basobj.hxx | 5
basic/source/basmgr/basmgr.cxx | 4
basic/source/runtime/inputbox.cxx | 20
basic/source/runtime/methods.cxx | 6
basic/source/sbx/sbxscan.cxx | 14
basic/source/uno/namecont.cxx | 2
cppcanvas/source/inc/implrenderer.hxx | 2
cppcanvas/source/mtfrenderer/emfplus.cxx | 4
cppcanvas/source/mtfrenderer/implrenderer.cxx | 12
cppcanvas/source/mtfrenderer/textaction.cxx | 6
cppcanvas/source/mtfrenderer/textaction.hxx | 3
desktop/source/app/app.cxx | 58 +-
desktop/source/app/appinit.cxx | 8
desktop/source/app/cmdlinehelp.cxx | 12
desktop/source/app/dispatchwatcher.cxx | 24 -
desktop/source/app/lockfile2.cxx | 12
desktop/source/app/officeipcthread.cxx | 4
desktop/source/deployment/gui/descedit.cxx | 2
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 8
desktop/source/deployment/gui/dp_gui_dialog2.hxx | 12
desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 34 -
desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 16
desktop/source/deployment/gui/dp_gui_service.cxx | 12
desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 6
desktop/source/deployment/gui/dp_gui_updatedialog.hxx | 2
desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 20
desktop/source/deployment/misc/lockfile.cxx | 4
desktop/source/deployment/registry/component/dp_component.cxx | 16
desktop/source/migration/services/wordbookmigration.cxx | 2
drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx | 4
editeng/source/misc/svxacorr.cxx | 124 ++---
fileaccess/source/FileAccess.cxx | 16
filter/source/flash/swfexporter.cxx | 2
filter/source/flash/swfwriter.hxx | 4
filter/source/flash/swfwriter1.cxx | 16
filter/source/graphic/GraphicExportFilter.cxx | 2
filter/source/graphicfilter/eos2met/eos2met.cxx | 22
filter/source/graphicfilter/epict/epict.cxx | 32 -
filter/source/graphicfilter/eps/eps.cxx | 21
filter/source/graphicfilter/icgm/actimpr.cxx | 4
filter/source/graphicfilter/ios2met/ios2met.cxx | 8
filter/source/graphicfilter/ipict/ipict.cxx | 4
filter/source/msfilter/eschesdo.cxx | 58 +-
filter/source/msfilter/eschesdo.hxx | 6
filter/source/msfilter/msdffimp.cxx | 6
filter/source/msfilter/rtfutil.cxx | 14
filter/source/msfilter/svdfppt.cxx | 104 ++--
filter/source/pdf/impdialog.cxx | 26 -
filter/source/pdf/impdialog.hxx | 2
filter/source/pdf/pdfexport.cxx | 2
filter/source/svg/impsvgdialog.cxx | 12
filter/source/svg/svgdialog.cxx | 2
filter/source/svg/svgexport.cxx | 2
filter/source/svg/svgfontexport.cxx | 6
filter/source/svg/svgwriter.cxx | 36 -
filter/source/svg/svgwriter.hxx | 8
filter/source/xsltdialog/xmlfiltersettingsdialog.cxx | 2
filter/source/xsltdialog/xmlfiltertestdialog.cxx | 4
formula/source/core/api/FormulaCompiler.cxx | 146 +++---
formula/source/ui/dlg/FormulaHelper.cxx | 71 +--
formula/source/ui/dlg/formula.cxx | 227 ++++------
formula/source/ui/dlg/funcpage.cxx | 2
formula/source/ui/dlg/funcpage.hxx | 2
formula/source/ui/dlg/funcutl.cxx | 2
formula/source/ui/dlg/parawin.cxx | 52 +-
formula/source/ui/dlg/parawin.hxx | 30 -
formula/source/ui/dlg/structpg.cxx | 6
formula/source/ui/dlg/structpg.hxx | 2
framework/inc/services/licensedlg.hxx | 8
framework/inc/xml/imagesconfiguration.hxx | 20
framework/source/accelerators/acceleratorconfiguration.cxx | 6
framework/source/classes/menumanager.cxx | 6
framework/source/fwe/classes/addonmenu.cxx | 4
framework/source/fwe/classes/addonsoptions.cxx | 2
framework/source/helper/vclstatusindicator.cxx | 2
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 14
framework/source/services/desktop.cxx | 2
framework/source/services/frame.cxx | 2
framework/source/services/license.cxx | 4
framework/source/uiconfiguration/imagemanagerimpl.cxx | 4
framework/source/uielement/fontsizemenucontroller.cxx | 8
framework/source/uielement/generictoolbarcontroller.cxx | 8
framework/source/uielement/headermenucontroller.cxx | 2
framework/source/uielement/imagebuttontoolbarcontroller.cxx | 2
framework/source/uielement/langselectionmenucontroller.cxx | 8
framework/source/uielement/macrosmenucontroller.cxx | 12
framework/source/uielement/menubarmanager.cxx | 8
framework/source/uielement/newmenucontroller.cxx | 4
framework/source/uielement/toolbarsmenucontroller.cxx | 2
framework/source/xml/imagesdocumenthandler.cxx | 16
idl/inc/command.hxx | 6
idl/inc/database.hxx | 18
idl/inc/lex.hxx | 10
idl/inc/module.hxx | 6
idl/source/cmptools/lex.cxx | 4
idl/source/objects/module.cxx | 2
idl/source/prj/command.cxx | 48 --
idl/source/prj/database.cxx | 18
idl/source/prj/svidl.cxx | 8
include/editeng/svxacorr.hxx | 38 -
include/filter/msfilter/rtfutil.hxx | 4
include/formula/FormulaCompiler.hxx | 54 +-
include/formula/IFunctionDescription.hxx | 10
include/formula/formdata.hxx | 32 -
include/formula/formula.hxx | 22
include/formula/formulahelper.hxx | 14
lingucomponent/source/lingutil/lingutil.cxx | 4
lingucomponent/source/spellcheck/spell/sspellimp.cxx | 2
reportdesign/source/ui/dlg/Formula.cxx | 20
reportdesign/source/ui/inc/Formula.hxx | 10
sc/inc/compiler.hxx | 6
sc/source/core/data/funcdesc.cxx | 10
sc/source/core/tool/compiler.cxx | 62 +-
sc/source/core/tool/interpr1.cxx | 2
sc/source/core/tool/rangelst.cxx | 6
sc/source/core/tool/rangenam.cxx | 8
sc/source/core/tool/rangeutl.cxx | 2
sc/source/core/tool/reffind.cxx | 2
sc/source/filter/xml/XMLTableShapeResizer.cxx | 2
sc/source/ui/app/inputhdl.cxx | 6
sc/source/ui/formdlg/formula.cxx | 16
sc/source/ui/inc/formula.hxx | 8
sc/source/ui/pagedlg/areasdlg.cxx | 8
sc/source/ui/unoobj/chart2uno.cxx | 16
sc/source/ui/vba/vbarange.cxx | 4
sc/source/ui/view/tabview3.cxx | 2
sc/source/ui/view/viewfun2.cxx | 2
svtools/source/contnr/svtabbx.cxx | 14
svtools/source/control/inettbc.cxx | 2
svtools/source/dialogs/wizardmachine.cxx | 2
svtools/source/misc/ehdl.cxx | 6
svtools/source/misc/transfer.cxx | 6
svtools/source/uno/genericunodialog.cxx | 2
sw/inc/swacorr.hxx | 4
sw/source/core/access/accportions.cxx | 2
sw/source/core/access/accportions.hxx | 2
sw/source/core/docnode/retrieveinputstreamconsumer.cxx | 2
sw/source/core/inc/SwPortionHandler.hxx | 4
sw/source/core/inc/SwUndoFmt.hxx | 1
sw/source/core/inc/SwXMLBlockExport.hxx | 3
sw/source/core/inc/retrieveinputstreamconsumer.hxx | 3
sw/source/core/inc/scriptinfo.hxx | 1
sw/source/core/inc/undoflystrattr.hxx | 9
sw/source/core/sw3io/swacorr.cxx | 4
sw/source/core/swg/SwXMLBlockExport.cxx | 6
sw/source/core/text/xmldump.cxx | 2
sw/source/core/undo/undoflystrattr.cxx | 4
sw/source/filter/inc/msfilter.hxx | 1
sw/source/filter/ww8/attributeoutputbase.hxx | 1
sw/source/ui/inc/initui.hxx | 3
sw/source/ui/utlui/initui.cxx | 4
toolkit/source/awt/vclxfont.cxx | 4
toolkit/source/awt/vclxtoolkit.cxx | 14
toolkit/source/awt/vclxwindows.cxx | 8
toolkit/source/helper/vclunohelper.cxx | 4
vcl/inc/outfont.hxx | 2
vcl/inc/svdata.hxx | 2
vcl/source/filter/sgvmain.hxx | 22
vcl/source/filter/wmf/winmtf.cxx | 2
vcl/source/filter/wmf/winmtf.hxx | 2
vcl/source/filter/wmf/wmfwr.cxx | 4
vcl/source/gdi/cvtsvm.cxx | 2
vcl/source/gdi/font.cxx | 2
vcl/source/gdi/pdfwriter_impl.hxx | 2
171 files changed, 1109 insertions(+), 1134 deletions(-)
New commits:
commit b855e1ee655cbe3a359203c361326c25439e3cb5
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 15:54:55 2013 +0200
convert sw/source/core/inc/SwPortionHandler.hxx from String to OUString
Change-Id: Ide6562f7807f59fecbe3f8b3427342de3811f411
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index 2aa55bd..446050a 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -126,7 +126,7 @@ void SwAccessiblePortionData::Text(sal_uInt16 nLength, sal_uInt16 nType, sal_Int
}
void SwAccessiblePortionData::Special(
- sal_uInt16 nLength, const String& rText, sal_uInt16 nType, sal_Int32 /*nHeight*/, sal_Int32 /*nWidth*/)
+ sal_uInt16 nLength, const OUString& rText, sal_uInt16 nType, sal_Int32 /*nHeight*/, sal_Int32 /*nWidth*/)
{
OSL_ENSURE( nModelPosition >= 0, "illegal position" );
OSL_ENSURE( (nModelPosition + nLength) <= pTxtNode->GetTxt().getLength(),
diff --git a/sw/source/core/access/accportions.hxx b/sw/source/core/access/accportions.hxx
index 5da3186..f85e40d 100644
--- a/sw/source/core/access/accportions.hxx
+++ b/sw/source/core/access/accportions.hxx
@@ -97,7 +97,7 @@ public:
// SwPortionHandler methods
virtual void Text(sal_uInt16 nLength, sal_uInt16 nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0);
- virtual void Special(sal_uInt16 nLength, const String& rText, sal_uInt16 nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0);
+ virtual void Special(sal_uInt16 nLength, const OUString& rText, sal_uInt16 nType, sal_Int32 nHeight = 0, sal_Int32 nWidth = 0);
virtual void LineBreak(KSHORT nWidth);
virtual void Skip(sal_uInt16 nLength);
virtual void Finish();
diff --git a/sw/source/core/inc/SwPortionHandler.hxx b/sw/source/core/inc/SwPortionHandler.hxx
index 455c21a..325deb9 100644
--- a/sw/source/core/inc/SwPortionHandler.hxx
+++ b/sw/source/core/inc/SwPortionHandler.hxx
@@ -23,8 +23,6 @@
#include <tools/solar.h>
#include <txttypes.hxx>
-class String;
-
/** The SwPortionHandler interface implements a visitor for the layout
* engine's text portions. This can be used to gather information of
* the on-screen representation of a single paragraph.
@@ -68,7 +66,7 @@ public:
*/
virtual void Special(
sal_uInt16 nLength, /// length of this portion in the model string
- const String& rText, /// text which is painted on-screen
+ const OUString& rText, /// text which is painted on-screen
sal_uInt16 nType, /// type of this portion
sal_Int32 nHeight = 0, /// font height of the painted text
sal_Int32 nWidth = 0 /// width of this portion
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index fabdcd8..1b72333 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -147,7 +147,7 @@ class XmlPortionDumper:public SwPortionHandler
font size of the painted text
*/
virtual void Special( sal_uInt16 nLength,
- const String & rText,
+ const OUString & rText,
sal_uInt16 nType,
sal_Int32 nHeight,
sal_Int32 nWidth )
commit 8e877501dc903f83f420c4d69cf2661efbf14740
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 15:52:11 2013 +0200
remove dead definition
Change-Id: I0ecaf59fe669904eb700289b95866fc665b893d0
diff --git a/sw/source/core/inc/SwUndoFmt.hxx b/sw/source/core/inc/SwUndoFmt.hxx
index dd06903..22dd38f 100644
--- a/sw/source/core/inc/SwUndoFmt.hxx
+++ b/sw/source/core/inc/SwUndoFmt.hxx
@@ -26,7 +26,6 @@
class SwDoc;
class SwTxtFmtColl;
-class String;
class SwRewriter;
class SfxItemSet;
commit a11990f8329f824e0fbe325a6527a925f0c14134
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 15:51:01 2013 +0200
convert sw/source/core/inc/SwXMLBlockExport.hxx from String to OUString
Change-Id: I157e560482af5d917fbd6878dd679993f1da4fca
diff --git a/sw/source/core/inc/SwXMLBlockExport.hxx b/sw/source/core/inc/SwXMLBlockExport.hxx
index ff3c637..a499907 100644
--- a/sw/source/core/inc/SwXMLBlockExport.hxx
+++ b/sw/source/core/inc/SwXMLBlockExport.hxx
@@ -22,7 +22,6 @@
#include <xmloff/xmlexp.hxx>
-class String;
class SwXMLTextBlocks;
class SwXMLBlockListExport : public SvXMLExport
@@ -58,7 +57,7 @@ public:
virtual ~SwXMLTextBlockExport ( void ) {}
sal_uInt32 exportDoc(enum ::xmloff::token::XMLTokenEnum /*eClass*/) {return 0;}
- sal_uInt32 exportDoc(const String & rText);
+ sal_uInt32 exportDoc(const OUString & rText);
void _ExportAutoStyles() {}
void _ExportMasterStyles () {}
void _ExportContent() {}
diff --git a/sw/source/core/swg/SwXMLBlockExport.cxx b/sw/source/core/swg/SwXMLBlockExport.cxx
index 15dd5d9..39aa87a 100644
--- a/sw/source/core/swg/SwXMLBlockExport.cxx
+++ b/sw/source/core/swg/SwXMLBlockExport.cxx
@@ -97,7 +97,7 @@ SwXMLTextBlockExport::SwXMLTextBlockExport(
XML_NAMESPACE_TEXT );
}
-sal_uInt32 SwXMLTextBlockExport::exportDoc(const String &rText)
+sal_uInt32 SwXMLTextBlockExport::exportDoc(const OUString &rText)
{
GetDocHandler()->startDocument();
@@ -123,8 +123,8 @@ sal_uInt32 SwXMLTextBlockExport::exportDoc(const String &rText)
sal_Int32 nPos = 0;
do
{
- String sTemp ( rText.GetToken( 0, '\015', nPos ) );
- SvXMLElementExport aPara (*this, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
+ OUString sTemp ( rText.getToken( 0, '\015', nPos ) );
+ SvXMLElementExport aPara (*this, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False);
GetDocHandler()->characters(sTemp);
} while (-1 != nPos );
}
commit 5b83b465f7618be1e5a935fe4e402e03af3c79e7
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 15:48:38 2013 +0200
convert sw/source/core/inc/retrieveinputstreamconsumer.hxx to OUString
Change-Id: Ia1c8f2d7a9bcad87767f3714514c40496e0c1e6b
diff --git a/sw/source/core/docnode/retrieveinputstreamconsumer.cxx b/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
index e5b0205..efd6b45 100644
--- a/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
+++ b/sw/source/core/docnode/retrieveinputstreamconsumer.cxx
@@ -39,7 +39,7 @@ SwAsyncRetrieveInputStreamThreadConsumer::~SwAsyncRetrieveInputStreamThreadConsu
SwThreadManager::GetThreadManager().RemoveThread( mnThreadID );
}
-void SwAsyncRetrieveInputStreamThreadConsumer::CreateThread( const String& rURL )
+void SwAsyncRetrieveInputStreamThreadConsumer::CreateThread( const OUString& rURL )
{
// Get new data container for input stream data
SwRetrievedInputStreamDataManager::tDataKey nDataKey =
diff --git a/sw/source/core/inc/retrieveinputstreamconsumer.hxx b/sw/source/core/inc/retrieveinputstreamconsumer.hxx
index d23058a..6410bf7 100644
--- a/sw/source/core/inc/retrieveinputstreamconsumer.hxx
+++ b/sw/source/core/inc/retrieveinputstreamconsumer.hxx
@@ -25,7 +25,6 @@
#include <retrievedinputstreamdata.hxx>
class SwGrfNode;
-class String;
/** class to provide creation of a thread to retrieve an input stream given by
an URL and to consume the retrieved input stream.
@@ -41,7 +40,7 @@ class SwAsyncRetrieveInputStreamThreadConsumer
/** method to create thread
*/
- void CreateThread( const String& rURL );
+ void CreateThread( const OUString& rURL );
/** method called to provide the retrieved input stream to the thread Consumer
*/
commit 2a3177494de79e1dd3afad91288fc55883eba08b
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 15:47:05 2013 +0200
remove some dead definitions
Change-Id: Ic2bd700d54bca0d5390db74b32395aeba2d6d0cc
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index 2407500..c0d5682 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -28,7 +28,6 @@
class SwTxtNode;
class Point;
class MultiSelection;
-class String;
typedef std::list< xub_StrLen > PositionList;
typedef std::deque< xub_StrLen > SvXub_StrLens;
commit b13645561aab5f335d95c9d77fbae1f82c632a0a
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 15:45:18 2013 +0200
convert sw/source/core/inc/undoflystrattr.hxx from String to OUString
Change-Id: Id3ee1677fa186a425cb3aba8886d9115f2c49504
diff --git a/sw/source/core/inc/undoflystrattr.hxx b/sw/source/core/inc/undoflystrattr.hxx
index fae298b..4dc3122 100644
--- a/sw/source/core/inc/undoflystrattr.hxx
+++ b/sw/source/core/inc/undoflystrattr.hxx
@@ -23,15 +23,14 @@
#include <swundo.hxx>
class SwFlyFrmFmt;
-class String;
class SwUndoFlyStrAttr : public SwUndo
{
public:
SwUndoFlyStrAttr( SwFlyFrmFmt& rFlyFrmFmt,
const SwUndoId eUndoId,
- const String& sOldStr,
- const String& sNewStr );
+ const OUString& sOldStr,
+ const OUString& sNewStr );
virtual ~SwUndoFlyStrAttr();
virtual void UndoImpl( ::sw::UndoRedoContext & );
@@ -41,8 +40,8 @@ class SwUndoFlyStrAttr : public SwUndo
private:
SwFlyFrmFmt& mrFlyFrmFmt;
- const String msOldStr;
- const String msNewStr;
+ const OUString msOldStr;
+ const OUString msNewStr;
};
#endif // SW_UNDO_FLY_STR_ATTR_HXX
diff --git a/sw/source/core/undo/undoflystrattr.cxx b/sw/source/core/undo/undoflystrattr.cxx
index eb330c0..31069b0 100644
--- a/sw/source/core/undo/undoflystrattr.cxx
+++ b/sw/source/core/undo/undoflystrattr.cxx
@@ -23,8 +23,8 @@
SwUndoFlyStrAttr::SwUndoFlyStrAttr( SwFlyFrmFmt& rFlyFrmFmt,
const SwUndoId eUndoId,
- const String& sOldStr,
- const String& sNewStr )
+ const OUString& sOldStr,
+ const OUString& sNewStr )
: SwUndo( eUndoId ),
mrFlyFrmFmt( rFlyFrmFmt ),
msOldStr( sOldStr ),
commit 23a2f0d9b626eaa9c82b7d466bd23eb6d06f9c21
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 15:41:14 2013 +0200
remove dead some definitions
Change-Id: I221b3762215820a93352e9058e03fd91cac7d3a5
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index 24818ef..7f80d63 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -38,7 +38,6 @@
class SwDoc;
class SwPaM;
-class String;
class SwTableNode;
class SwNodeIndex;
class SwNoTxtNode;
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index ac08d74..134de6b 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -120,7 +120,6 @@ class wwFont;
namespace editeng { class SvxBorderLine; }
-class String;
namespace rtl { class OUString; }
class MSWordExportBase;
diff --git a/sw/source/ui/inc/initui.hxx b/sw/source/ui/inc/initui.hxx
index c6f0b10..b3b4b9a 100644
--- a/sw/source/ui/inc/initui.hxx
+++ b/sw/source/ui/inc/initui.hxx
@@ -28,7 +28,6 @@
/*
* Forward Declarations
*/
-class String;
class SwThesaurus;
/*
@@ -48,8 +47,6 @@ SW_DLLPUBLIC void SetOldDrwCat(OUString sStr);
SW_DLLPUBLIC OUString GetCurrGlosGroup();
SW_DLLPUBLIC void SetCurrGlosGroup(OUString sStr);
-extern std::vector<String>* pDBNameList;
-
// provides textblock management
class SwGlossaries;
SW_DLLPUBLIC SwGlossaries* GetGlossaries();
diff --git a/sw/source/ui/utlui/initui.cxx b/sw/source/ui/utlui/initui.cxx
index 52fef74..4ff0610 100644
--- a/sw/source/ui/utlui/initui.cxx
+++ b/sw/source/ui/utlui/initui.cxx
@@ -134,8 +134,6 @@ void SetCurrGlosGroup(OUString sStr)
SetCachedString(CurrGlosGroup, sStr);
}
-std::vector<String>* pDBNameList = 0;
-
namespace
{
@@ -159,7 +157,6 @@ void _FinitUI()
delete SwFieldType::pFldNames;
ClearStringCache();
- delete pDBNameList;
delete pGlossaryList;
delete pAuthFieldNameList;
delete pAuthFieldTypeList;
@@ -172,7 +169,6 @@ void _InitUI()
{
// ShellResource gives the CORE the possibility to work with resources.
ViewShell::SetShellRes( new ShellResource );
- pDBNameList = new std::vector<String>;
SwEditWin::_InitStaticData();
}
commit 6f2adb1a0421e626aa498cf722d7be573f287a11
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 15:36:02 2013 +0200
convert basctl/source/inc/basobj.hxx from String to OUString
Change-Id: Ied011ae19ef850826f52f4ebd5a22dba0caf5d2b
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index 321f282..d5b7030 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -88,11 +88,11 @@ void Organize( sal_Int16 tabId )
//----------------------------------------------------------------------------
-bool IsValidSbxName( const String& rName )
+bool IsValidSbxName( const OUString& rName )
{
- for ( sal_uInt16 nChar = 0; nChar < rName.Len(); nChar++ )
+ for ( sal_uInt16 nChar = 0; nChar < rName.getLength(); nChar++ )
{
- sal_Unicode c = rName.GetChar(nChar);
+ sal_Unicode c = rName[nChar];
bool bValid = (
( c >= 'A' && c <= 'Z' ) ||
( c >= 'a' && c <= 'z' ) ||
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 89f9f45..f6b7877 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -72,7 +72,7 @@ extern "C" {
//----------------------------------------------------------------------------
-SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName )
+SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
{
SfxDispatcher* pDispatcher = GetDispatcher();
if( pDispatcher )
diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx
index 99bd6b0..cc53d9f 100644
--- a/basctl/source/inc/basobj.hxx
+++ b/basctl/source/inc/basobj.hxx
@@ -27,7 +27,6 @@ class SbMethod;
class SbModule;
class SbxVariable;
class StarBASIC;
-class String;
class SfxUInt16Item;
class SfxBindings;
class SfxDispatcher;
@@ -39,7 +38,7 @@ namespace basctl
// help methods for the general use:
- SbMethod* CreateMacro( SbModule* pModule, const String& rMacroName );
+ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName );
void RunMethod( SbMethod* pMethod );
StarBASIC* FindBasic( const SbxVariable* pVar );
@@ -48,7 +47,7 @@ namespace basctl
void BasicStopped( bool* pbAppWindowDisabled = 0, bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0,
SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 );
- bool IsValidSbxName( const String& rName );
+ bool IsValidSbxName( const OUString& rName );
BasicManager* FindBasicManager( StarBASIC* pLib );
commit 90830788b1f8fd61ea86135712868aeda395edd0
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 14:31:09 2013 +0200
convert the SvxAutoCorrect::FindIn* methods from String to OUString
Change-Id: Ida2f39b75f73137a4164d95d7f1e9a6cd34a322f
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 9d5fd1d..f95d921 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1738,7 +1738,7 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
}
sal_Bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
- const String& sWord )
+ const OUString& sWord )
{
// First search for eLang, then US-English -> English
// and last in LANGUAGE_UNDETERMINED
@@ -1817,7 +1817,7 @@ static sal_Bool lcl_FindAbbreviation(const SvStringsISortDtor* pList, const OUSt
}
sal_Bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
- const String& sWord, sal_Bool bAbbreviation)
+ const OUString& sWord, sal_Bool bAbbreviation)
{
// First search for eLang, then US-English -> English
// and last in LANGUAGE_UNDETERMINED
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index b9dd6f4..b687dc4 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -389,8 +389,8 @@ public:
sal_Bool AddWrtSttException( const String& rNew, LanguageType eLang = LANGUAGE_SYSTEM);
// Search through the Languages for the entry
- sal_Bool FindInWrdSttExceptList( LanguageType eLang, const String& sWord );
- sal_Bool FindInCplSttExceptList( LanguageType eLang, const String& sWord,
+ sal_Bool FindInWrdSttExceptList( LanguageType eLang, const OUString& sWord );
+ sal_Bool FindInCplSttExceptList( LanguageType eLang, const OUString& sWord,
sal_Bool bAbbreviation = sal_False);
// Methods for the auto-correction
commit cb4e009c4539c535108021934e545194b35cad9d
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 14:20:18 2013 +0200
convert GetText/PutText in SvxAutoCorrect from String to OUString
Change-Id: Id3d2122d949a7ae940e908ee7c82e6f105b68f40
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index fce1576..9d5fd1d 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1582,7 +1582,7 @@ sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFi
return pLists != 0;
}
-sal_Bool SvxAutoCorrect::PutText( const String& rShort, const String& rLong,
+sal_Bool SvxAutoCorrect::PutText( const OUString& rShort, const OUString& rLong,
LanguageType eLang )
{
boost::ptr_map<LanguageType, SvxAutoCorrectLanguageLists>::iterator nTmpVal = pLangTable->find(eLang);
@@ -1614,14 +1614,14 @@ sal_Bool SvxAutoCorrect::MakeCombinedChanges( std::vector<SvxAutocorrWord>& aNew
// - return the replacement text (only for SWG-Format, all other
// can be taken from the word list!)
sal_Bool SvxAutoCorrect::GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&,
- const String&, const String&, OUString& )
+ const OUString&, const OUString&, OUString& )
{
return sal_False;
}
// Text with attribution (only the SWG - SWG format!)
sal_Bool SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&,
- const String&, const String&, SfxObjectShell&, OUString& )
+ const OUString&, const OUString&, SfxObjectShell&, OUString& )
{
return sal_False;
}
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 085c1c7..b9dd6f4 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -266,7 +266,7 @@ protected:
// - Text with attribution (only the SWG - SWG format!)
// rShort is the stream name - encrypted!
virtual sal_Bool PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg,
- const String& rFileName, const String& rShort, SfxObjectShell&, OUString& );
+ const OUString& rFileName, const OUString& rShort, SfxObjectShell&, OUString& );
// required language in the table add if possible only when the file exists
sal_Bool CreateLanguageFile(LanguageType eLang, sal_Bool bNewFile = sal_True);
@@ -278,7 +278,7 @@ public:
sal_Unicode GetQuote( sal_Unicode cInsChar, sal_Bool bSttQuote,
LanguageType eLang ) const;
virtual sal_Bool GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg,
- const String& rFileName, const String& rShort, OUString& rLong );
+ const OUString& rFileName, const OUString& rShort, OUString& rLong );
TYPEINFO();
@@ -352,9 +352,9 @@ public:
// Save these directly in the storage. The word list is updated
// accordingly!
// - pure Text
- sal_Bool PutText( const String& rShort, const String& rLong, LanguageType eLang = LANGUAGE_SYSTEM );
+ sal_Bool PutText( const OUString& rShort, const OUString& rLong, LanguageType eLang = LANGUAGE_SYSTEM );
// - Text with attribution (only in the SWG - SWG format!)
- sal_Bool PutText( const String& rShort, SfxObjectShell& rShell,
+ sal_Bool PutText( const OUString& rShort, SfxObjectShell& rShell,
LanguageType eLang = LANGUAGE_SYSTEM )
{ return _GetLanguageList( eLang ).PutText(rShort, rShell ); }
diff --git a/sw/inc/swacorr.hxx b/sw/inc/swacorr.hxx
index 9879946..0c26eb0 100644
--- a/sw/inc/swacorr.hxx
+++ b/sw/inc/swacorr.hxx
@@ -32,12 +32,12 @@ protected:
// Return replacement text (only for SWG-format, all others can be obtained from wordlist!).
// rShort is stream-name - encrypted!
virtual sal_Bool GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&,
- const String& rFileName, const String& rShort, OUString& rLong );
+ const OUString& rFileName, const OUString& rShort, OUString& rLong );
// Text with attributes (only SWG-format!).
// rShort is stream-name - encrypted!
virtual sal_Bool PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&,
- const String& rFileName, const String& rShort, SfxObjectShell&, OUString& );
+ const OUString& rFileName, const OUString& rShort, SfxObjectShell&, OUString& );
public:
TYPEINFO();
diff --git a/sw/source/core/sw3io/swacorr.cxx b/sw/source/core/sw3io/swacorr.cxx
index 92d3b4c..7b38dae 100644
--- a/sw/source/core/sw3io/swacorr.cxx
+++ b/sw/source/core/sw3io/swacorr.cxx
@@ -36,7 +36,7 @@ TYPEINIT1( SwAutoCorrect, SvxAutoCorrect );
// rShort ist der Stream-Name - gecryptet!
sal_Bool SwAutoCorrect::GetLongText( const uno::Reference < embed::XStorage >& rStg,
- const String& rFileName, const String& rShort, OUString& rLong )
+ const OUString& rFileName, const OUString& rShort, OUString& rLong )
{
sal_uLong nRet = 0;
if (rStg.is())
@@ -54,7 +54,7 @@ sal_Bool SwAutoCorrect::GetLongText( const uno::Reference < embed::XStorage >& r
// - Text mit Attributierung (kann nur der SWG - SWG-Format!)
// rShort ist der Stream-Name - gecryptet!
sal_Bool SwAutoCorrect::PutText( const uno::Reference < embed::XStorage >& rStg,
- const String& rFileName, const String& rShort,
+ const OUString& rFileName, const OUString& rShort,
SfxObjectShell& rObjSh, OUString& rLong )
{
if( !rObjSh.IsA( TYPE(SwDocShell) ) )
commit d63c3f0cf88cb369721939b79825dd56d1cc97de
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 14:00:56 2013 +0200
convert some more methods in SvxAutoCorrect to OUString
Change-Id: I843784dbc63501cd533c19f7ed5151fbe8e48d83
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index f466436..fce1576 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1179,7 +1179,7 @@ void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
rDoc.Replace( nInsPos, sChg );
}
-String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
+OUString SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
sal_Unicode cInsChar, sal_Bool bSttQuote )
{
LanguageType eLang = rDoc.GetLanguage( nInsPos, sal_False );
@@ -1673,7 +1673,7 @@ static const SvxAutocorrWord* lcl_SearchWordsInList(
// the search for the words in the substitution table
const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
- const String& rTxt, xub_StrLen& rStt, xub_StrLen nEndPos,
+ const OUString& rTxt, xub_StrLen& rStt, xub_StrLen nEndPos,
SvxAutoCorrDoc&, LanguageType& rLang )
{
LanguageType eLang = rLang;
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 7bdf81a..085c1c7 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -306,7 +306,7 @@ public:
// nEnd - to check position - as of this item forward
// rLang - Input: in which language is searched
// Output: in which "language list" was it found
- const SvxAutocorrWord* SearchWordsInList( const String& rTxt,
+ const SvxAutocorrWord* SearchWordsInList( const OUString& rTxt,
xub_StrLen& rStt, xub_StrLen nEndPos,
SvxAutoCorrDoc& rDoc,
LanguageType& rLang );
@@ -322,7 +322,7 @@ public:
void SetStartDoubleQuote( const sal_Unicode cStart ) { cStartDQuote = cStart; }
void SetEndDoubleQuote( const sal_Unicode cEnd ) { cEndDQuote = cEnd; }
- String GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
+ OUString GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
sal_Unicode cInsChar, sal_Bool bSttQuote );
void InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
sal_Unicode cInsChar, sal_Bool bSttQuote, sal_Bool bIns );
commit 8b6f54fe37533f48933af7636afa98178862e001
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 13:36:27 2013 +0200
convert fields in SvxAutoCorrect from String to OUString
Change-Id: I2b62c782ad538fe12fb3104bcb687c26291e3a0b
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index a287781..f466436 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -278,8 +278,8 @@ long SvxAutoCorrect::GetDefaultFlags()
}
-SvxAutoCorrect::SvxAutoCorrect( const String& rShareAutocorrFile,
- const String& rUserAutocorrFile )
+SvxAutoCorrect::SvxAutoCorrect( const OUString& rShareAutocorrFile,
+ const OUString& rUserAutocorrFile )
: sShareAutoCorrFile( rShareAutocorrFile ),
sUserAutoCorrFile( rUserAutocorrFile ),
pLangTable( new boost::ptr_map<LanguageType, SvxAutoCorrectLanguageLists> ),
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index c588915..7bdf81a 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -239,7 +239,7 @@ class EDITENG_DLLPUBLIC SvxAutoCorrect
{
friend class SvxAutoCorrectLanguageLists;
- String sShareAutoCorrFile, sUserAutoCorrFile;
+ OUString sShareAutoCorrFile, sUserAutoCorrFile;
SvxSwAutoFmtFlags aSwFlags; // StarWriter AutoFormat Flags
@@ -282,8 +282,8 @@ public:
TYPEINFO();
- SvxAutoCorrect( const String& rShareAutocorrFile,
- const String& rUserAutocorrFile );
+ SvxAutoCorrect( const OUString& rShareAutocorrFile,
+ const OUString& rUserAutocorrFile );
SvxAutoCorrect( const SvxAutoCorrect& );
virtual ~SvxAutoCorrect();
commit d559f1693a105b8b5e2a2f514b4b76ef158a685e
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 13:17:09 2013 +0200
convert the auto-correction methods in SvxAutoCorrect to OUString
Change-Id: I725d59ad2a4ac7b372cad4d599af1554c4c4b463
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index eee5bfe..a287781 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -342,7 +342,7 @@ void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, sal_Bool bOn )
// Two capital letters at the beginning of word?
-sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
@@ -371,7 +371,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
// Find all compound word delimiters
for (n = nSttPos; n < nEndPos; n++)
{
- if (IsAutoCorrectChar(rTxt.GetChar( n )))
+ if (IsAutoCorrectChar(rTxt[ n ]))
{
aDelimiters.push_back( n + 1 ); // Get position of char after delimiter
}
@@ -383,7 +383,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
// char will not be included in rTxt.
// If the last AutoCorrect char was not a newline, then the AutoCorrect
// character will be the last character in rTxt.
- if (!IsAutoCorrectChar(rTxt.GetChar(nEndPos-1)))
+ if (!IsAutoCorrectChar(rTxt[nEndPos-1]))
aDelimiters.push_back(nEndPos);
// Iterate through the word and all words that compose it.
@@ -401,10 +401,10 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
// Is the third character a lower case
IsLowerLetter( rCC.getCharacterType( rTxt, nSttPos +1 )) &&
// Do not replace special attributes
- 0x1 != rTxt.GetChar( nSttPos ) && 0x2 != rTxt.GetChar( nSttPos ))
+ 0x1 != rTxt[ nSttPos ] && 0x2 != rTxt[ nSttPos ])
{
// test if the word is in an exception list
- String sWord( rTxt.Copy( nSttPos - 1, nEndPos - nSttPos + 1 ));
+ String sWord( rTxt.copy( nSttPos - 1, nEndPos - nSttPos + 1 ));
if( !FindInWrdSttExceptList(eLang, sWord) )
{
// Check that word isn't correctly spelled before correcting:
@@ -419,7 +419,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
return false;
}
}
- sal_Unicode cSave = rTxt.GetChar( nSttPos );
+ sal_Unicode cSave = rTxt[ nSttPos ];
OUString sChar( cSave );
sChar = rCC.lowercase( sChar );
if( sChar[0] != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar ))
@@ -436,7 +436,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
sal_Bool SvxAutoCorrect::FnChgOrdinalNumber(
- SvxAutoCorrDoc& rDoc, const String& rTxt,
+ SvxAutoCorrDoc& rDoc, const OUString& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
@@ -447,10 +447,10 @@ sal_Bool SvxAutoCorrect::FnChgOrdinalNumber(
sal_Bool bChg = sal_False;
for( ; nSttPos < nEndPos; ++nSttPos )
- if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nSttPos ) ))
+ if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt[ nSttPos ] ))
break;
for( ; nSttPos < nEndPos; --nEndPos )
- if( !lcl_IsInAsciiArr( sImplEndSkipChars, rTxt.GetChar( nEndPos - 1 ) ))
+ if( !lcl_IsInAsciiArr( sImplEndSkipChars, rTxt[ nEndPos - 1 ] ))
break;
@@ -475,7 +475,7 @@ sal_Bool SvxAutoCorrect::FnChgOrdinalNumber(
}
if ( foundEnd && validNumber ) {
- sal_Int32 nNum = rTxt.Copy( nSttPos, nNumEnd - nSttPos + 1 ).ToInt32( );
+ sal_Int32 nNum = rTxt.copy( nSttPos, nNumEnd - nSttPos + 1 ).toInt32( );
// Check if the characters after that number correspond to the ordinal suffix
uno::Reference< i18n::XOrdinalSuffix > xOrdSuffix
@@ -485,7 +485,7 @@ sal_Bool SvxAutoCorrect::FnChgOrdinalNumber(
for ( sal_Int32 nSuff = 0; nSuff < aSuffixes.getLength(); nSuff++ )
{
String sSuffix( aSuffixes[ nSuff ] );
- String sEnd = rTxt.Copy( nNumEnd + 1, nEndPos - nNumEnd - 1 );
+ String sEnd = rTxt.copy( nNumEnd + 1, nEndPos - nNumEnd - 1 );
if ( sSuffix == sEnd )
{
@@ -507,7 +507,7 @@ sal_Bool SvxAutoCorrect::FnChgOrdinalNumber(
sal_Bool SvxAutoCorrect::FnChgToEnEmDash(
- SvxAutoCorrDoc& rDoc, const String& rTxt,
+ SvxAutoCorrDoc& rDoc, const OUString& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
@@ -520,15 +520,15 @@ sal_Bool SvxAutoCorrect::FnChgToEnEmDash(
// replace " - " or " --" with "enDash"
if( cEnDash && 1 < nSttPos && 1 <= nEndPos - nSttPos )
{
- sal_Unicode cCh = rTxt.GetChar( nSttPos );
+ sal_Unicode cCh = rTxt[ nSttPos ];
if( '-' == cCh )
{
- if( ' ' == rTxt.GetChar( nSttPos-1 ) &&
- '-' == rTxt.GetChar( nSttPos+1 ))
+ if( ' ' == rTxt[ nSttPos-1 ] &&
+ '-' == rTxt[ nSttPos+1 ])
{
xub_StrLen n;
for( n = nSttPos+2; n < nEndPos && lcl_IsInAsciiArr(
- sImplSttSkipChars,(cCh = rTxt.GetChar( n )));
+ sImplSttSkipChars,(cCh = rTxt[ n ]));
++n )
;
@@ -536,7 +536,7 @@ sal_Bool SvxAutoCorrect::FnChgToEnEmDash(
if( rCC.isLetterNumeric( OUString(cCh) ) )
{
for( n = nSttPos-1; n && lcl_IsInAsciiArr(
- sImplEndSkipChars,(cCh = rTxt.GetChar( --n ))); )
+ sImplEndSkipChars,(cCh = rTxt[ --n ])); )
;
// found: "[A-z0-9][<AnyEndChars>] --[<AnySttChars>][A-z0-9]
@@ -550,20 +550,20 @@ sal_Bool SvxAutoCorrect::FnChgToEnEmDash(
}
}
else if( 3 < nSttPos &&
- ' ' == rTxt.GetChar( nSttPos-1 ) &&
- '-' == rTxt.GetChar( nSttPos-2 ))
+ ' ' == rTxt[ nSttPos-1 ] &&
+ '-' == rTxt[ nSttPos-2 ])
{
xub_StrLen n, nLen = 1, nTmpPos = nSttPos - 2;
- if( '-' == ( cCh = rTxt.GetChar( nTmpPos-1 )) )
+ if( '-' == ( cCh = rTxt[ nTmpPos-1 ]) )
{
--nTmpPos;
++nLen;
- cCh = rTxt.GetChar( nTmpPos-1 );
+ cCh = rTxt[ nTmpPos-1 ];
}
if( ' ' == cCh )
{
for( n = nSttPos; n < nEndPos && lcl_IsInAsciiArr(
- sImplSttSkipChars,(cCh = rTxt.GetChar( n )));
+ sImplSttSkipChars,(cCh = rTxt[ n ]));
++n )
;
@@ -572,7 +572,7 @@ sal_Bool SvxAutoCorrect::FnChgToEnEmDash(
{
cCh = ' ';
for( n = nTmpPos-1; n && lcl_IsInAsciiArr(
- sImplEndSkipChars,(cCh = rTxt.GetChar( --n ))); )
+ sImplEndSkipChars,(cCh = rTxt[ --n ])); )
;
// found: "[A-z0-9][<AnyEndChars>] - [<AnySttChars>][A-z0-9]
if( rCC.isLetterNumeric( OUString(cCh) ))
@@ -591,14 +591,14 @@ sal_Bool SvxAutoCorrect::FnChgToEnEmDash(
bool bEnDash = (eLang == LANGUAGE_HUNGARIAN || eLang == LANGUAGE_FINNISH);
if( ((cEmDash && !bEnDash) || (cEnDash && bEnDash)) && 4 <= nEndPos - nSttPos )
{
- String sTmp( rTxt.Copy( nSttPos, nEndPos - nSttPos ) );
+ String sTmp( rTxt.copy( nSttPos, nEndPos - nSttPos ) );
xub_StrLen nFndPos = sTmp.SearchAscii( "--" );
if( STRING_NOTFOUND != nFndPos && nFndPos &&
nFndPos + 2 < sTmp.Len() &&
( rCC.isLetterNumeric( sTmp, nFndPos - 1 ) ||
- lcl_IsInAsciiArr( sImplEndSkipChars, rTxt.GetChar( nFndPos - 1 ) )) &&
+ lcl_IsInAsciiArr( sImplEndSkipChars, rTxt[ nFndPos - 1 ] )) &&
( rCC.isLetterNumeric( sTmp, nFndPos + 2 ) ||
- lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nFndPos + 2 ) )))
+ lcl_IsInAsciiArr( sImplSttSkipChars, rTxt[ nFndPos + 2 ] )))
{
nSttPos = nSttPos + nFndPos;
rDoc.Delete( nSttPos, nSttPos + 2 );
@@ -615,7 +615,7 @@ sal_Bool SvxAutoCorrect::FnChgToEnEmDash(
#endif
sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
- SvxAutoCorrDoc& rDoc, const String& rTxt,
+ SvxAutoCorrDoc& rDoc, const OUString& rTxt,
xub_StrLen, xub_StrLen nEndPos,
LanguageType eLang )
{
@@ -631,7 +631,7 @@ sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
if ( bFrCA )
chars = OUString( ":" );
- sal_Unicode cChar = rTxt.GetChar( nEndPos );
+ sal_Unicode cChar = rTxt[ nEndPos ];
bool bHasSpace = chars.indexOf( cChar ) != -1;
bool bIsSpecial = allChars.indexOf( cChar ) != -1;
if ( bIsSpecial )
@@ -639,20 +639,20 @@ sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
// Get the last word delimiter position
xub_StrLen nSttWdPos = nEndPos;
bool bWasWordDelim = false;
- while( nSttWdPos && !(bWasWordDelim = IsWordDelim( rTxt.GetChar( --nSttWdPos ))))
+ while( nSttWdPos && !(bWasWordDelim = IsWordDelim( rTxt[ --nSttWdPos ])))
;
- if(INetURLObject::CompareProtocolScheme(rTxt.Copy(nSttWdPos + (bWasWordDelim ? 1 : 0), nEndPos - nSttWdPos + 1)) != INET_PROT_NOT_VALID) {
+ if(INetURLObject::CompareProtocolScheme(rTxt.copy(nSttWdPos + (bWasWordDelim ? 1 : 0), nEndPos - nSttWdPos + 1)) != INET_PROT_NOT_VALID) {
return sal_False;
}
// Check the presence of "://" in the word
- xub_StrLen nStrPos = rTxt.Search( OUString( "://" ), nSttWdPos + 1 );
+ xub_StrLen nStrPos = rTxt.indexOf( "://", nSttWdPos + 1 );
if ( STRING_NOTFOUND == nStrPos && nEndPos > 0 )
{
// Check the previous char
- sal_Unicode cPrevChar = rTxt.GetChar( nEndPos - 1 );
+ sal_Unicode cPrevChar = rTxt[ nEndPos - 1 ];
if ( ( chars.indexOf( cPrevChar ) == -1 ) && cPrevChar != '\t' )
{
// Remove any previous normal space
@@ -661,7 +661,7 @@ sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
{
if ( nPos == 0 ) break;
nPos--;
- cPrevChar = rTxt.GetChar( nPos );
+ cPrevChar = rTxt[ nPos ];
}
nPos++;
@@ -678,11 +678,11 @@ sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
bRunNext = true;
}
}
- else if ( cChar == '/' && nEndPos > 1 && rTxt.Len() > (nEndPos - 1) )
+ else if ( cChar == '/' && nEndPos > 1 && rTxt.getLength() > (nEndPos - 1) )
{
// Remove the hardspace right before to avoid formatting URLs
- sal_Unicode cPrevChar = rTxt.GetChar( nEndPos - 1 );
- sal_Unicode cMaybeSpaceChar = rTxt.GetChar( nEndPos - 2 );
+ sal_Unicode cPrevChar = rTxt[ nEndPos - 1 ];
+ sal_Unicode cMaybeSpaceChar = rTxt[ nEndPos - 2 ];
if ( cPrevChar == ':' && cMaybeSpaceChar == CHAR_HARDBLANK )
{
rDoc.Delete( nEndPos - 2, nEndPos - 1 );
@@ -698,7 +698,7 @@ sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
#pragma warning(pop)
#endif
-sal_Bool SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_Bool SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
@@ -716,7 +716,7 @@ sal_Bool SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt
}
-sal_Bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_Bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
xub_StrLen, xub_StrLen nEndPos,
LanguageType eLang )
{
@@ -724,9 +724,9 @@ sal_Bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String&
// at the beginning: _ or * after Space with the folloeing !Space
// at the end: _ or * before Space (word delimiter?)
- sal_Unicode c, cInsChar = rTxt.GetChar( nEndPos ); // underline or bold
- if( ++nEndPos != rTxt.Len() &&
- !IsWordDelim( rTxt.GetChar( nEndPos ) ) )
+ sal_Unicode c, cInsChar = rTxt[ nEndPos ]; // underline or bold
+ if( ++nEndPos != rTxt.getLength() &&
+ !IsWordDelim( rTxt[ nEndPos ] ) )
return sal_False;
--nEndPos;
@@ -737,15 +737,15 @@ sal_Bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String&
while( nPos )
{
- switch( c = rTxt.GetChar( --nPos ) )
+ switch( c = rTxt[ --nPos ] )
{
case '_':
case '*':
if( c == cInsChar )
{
if( bAlphaNum && nPos+1 < nEndPos && ( !nPos ||
- IsWordDelim( rTxt.GetChar( nPos-1 ))) &&
- !IsWordDelim( rTxt.GetChar( nPos+1 )))
+ IsWordDelim( rTxt[ nPos-1 ])) &&
+ !IsWordDelim( rTxt[ nPos+1 ]))
nFndPos = nPos;
else
// Condition is not satisfied, so cancel
@@ -789,12 +789,12 @@ sal_Bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String&
sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
- const String& rTxt, sal_Bool bNormalPos,
+ const OUString& rTxt, sal_Bool bNormalPos,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
- if( !rTxt.Len() || nEndPos <= nSttPos )
+ if( rTxt.isEmpty() || nEndPos <= nSttPos )
return sal_False;
CharClass& rCC = GetCharClass( eLang );
@@ -839,7 +839,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
rCC.getCharacterType(
aText,
sal::static_int_cast< xub_StrLen >( pWordStt - pStart ) ) ) ||
- INetURLObject::CompareProtocolScheme(rTxt.Copy(pWordStt - pStart, pDelim - pWordStt + 1)) != INET_PROT_NOT_VALID ||
+ INetURLObject::CompareProtocolScheme(rTxt.copy(pWordStt - pStart, pDelim - pWordStt + 1)) != INET_PROT_NOT_VALID ||
0x1 == *pWordStt || 0x2 == *pWordStt )
return sal_False; // no character to be replaced, or already ok
@@ -1052,7 +1052,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
// Ok, then replace
sal_Unicode cSave = *pWordStt;
- nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.GetBuffer() );
+ nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.getStr() );
OUString sChar( cSave );
sChar = rCC.titlecase(sChar); //see fdo#56740
sal_Bool bRet = sChar[0] != cSave && rDoc.ReplaceRange( nSttPos, 1, sChar );
@@ -1064,7 +1064,7 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
return bRet;
}
-bool SvxAutoCorrect::FnCorrectCapsLock( SvxAutoCorrDoc& rDoc, const String& rTxt,
+bool SvxAutoCorrect::FnCorrectCapsLock( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
@@ -1082,8 +1082,8 @@ bool SvxAutoCorrect::FnCorrectCapsLock( SvxAutoCorrDoc& rDoc, const String& rTxt
return false;
String aConverted;
- aConverted.Append( rCC.uppercase(OUString(rTxt.GetChar(nSttPos))) );
- aConverted.Append( rCC.lowercase(OUString(rTxt.GetChar(nSttPos+1))) );
+ aConverted.Append( rCC.uppercase(OUString(rTxt[nSttPos])) );
+ aConverted.Append( rCC.lowercase(OUString(rTxt[nSttPos+1])) );
for (xub_StrLen i = nSttPos+2; i < nEndPos; ++i)
{
@@ -1093,10 +1093,10 @@ bool SvxAutoCorrect::FnCorrectCapsLock( SvxAutoCorrDoc& rDoc, const String& rTxt
if ( IsUpperLetter(rCC.getCharacterType(rTxt, i)) )
// Another uppercase letter. Convert it.
- aConverted.Append(rCC.lowercase(OUString(rTxt.GetChar(i))));
+ aConverted.Append(rCC.lowercase(OUString(rTxt[i])));
else
// This is not an alphabetic letter. Leave it as-is.
- aConverted.Append(rTxt.GetChar(i));
+ aConverted.Append(rTxt[i]);
}
// Replace the word.
diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx
index 6c787d0..c588915 100644
--- a/include/editeng/svxacorr.hxx
+++ b/include/editeng/svxacorr.hxx
@@ -394,28 +394,28 @@ public:
sal_Bool bAbbreviation = sal_False);
// Methods for the auto-correction
- sal_Bool FnCptlSttWrd( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnCptlSttWrd( SvxAutoCorrDoc&, const OUString&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- sal_Bool FnChgOrdinalNumber( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnChgOrdinalNumber( SvxAutoCorrDoc&, const OUString&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- sal_Bool FnChgToEnEmDash( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnChgToEnEmDash( SvxAutoCorrDoc&, const OUString&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- sal_Bool FnAddNonBrkSpace( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnAddNonBrkSpace( SvxAutoCorrDoc&, const OUString&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- sal_Bool FnSetINetAttr( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnSetINetAttr( SvxAutoCorrDoc&, const OUString&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- sal_Bool FnChgWeightUnderl( SvxAutoCorrDoc&, const String&,
+ sal_Bool FnChgWeightUnderl( SvxAutoCorrDoc&, const OUString&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
- sal_Bool FnCptlSttSntnc( SvxAutoCorrDoc&, const String&, sal_Bool bNormalPos,
+ sal_Bool FnCptlSttSntnc( SvxAutoCorrDoc&, const OUString&, sal_Bool bNormalPos,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM);
- bool FnCorrectCapsLock( SvxAutoCorrDoc&, const String&,
+ bool FnCorrectCapsLock( SvxAutoCorrDoc&, const OUString&,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang = LANGUAGE_SYSTEM );
commit 41dec09ed3469d1e4dc53aeb7034a45bcff8e1e5
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 10:06:54 2013 +0200
convert BASIC from String to OUString
Change-Id: I4b046e4c460305acad29862341092af948639215
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index d4bcac2..6621a40 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1315,7 +1315,7 @@ sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage
if ( !pLibInfo || !nLib )
{
- StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, String(), ERRCODE_BUTTON_OK );
+ StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, OUString(), ERRCODE_BUTTON_OK );
aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_STDLIB, pLibInfo->GetLibName()));
return sal_False;
}
@@ -1342,7 +1342,7 @@ sal_Bool BasicManager::RemoveLib( sal_uInt16 nLib, sal_Bool bDelBasicFromStorage
if ( !xBasicStorage.Is() || xBasicStorage->GetError() )
{
- StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, String(), ERRCODE_BUTTON_OK );
+ StringErrorInfo* pErrInf = new StringErrorInfo( ERRCODE_BASMGR_REMOVELIB, OUString(), ERRCODE_BUTTON_OK );
aErrors.push_back(BasicError(*pErrInf, BASERR_REASON_OPENLIBSTORAGE, pLibInfo->GetLibName()));
}
else if ( xBasicStorage->IsStream( pLibInfo->GetLibName() ) )
diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx
index c009f88..db45760 100644
--- a/basic/source/runtime/inputbox.cxx
+++ b/basic/source/runtime/inputbox.cxx
@@ -38,18 +38,18 @@ class SvRTLInputBox : public ModalDialog
void PositionDialog( long nXTwips, long nYTwips, const Size& rDlgSize );
void InitButtons( const Size& rDlgSize );
void PositionEdit( const Size& rDlgSize );
- void PositionPrompt( const String& rPrompt, const Size& rDlgSize );
+ void PositionPrompt( const OUString& rPrompt, const Size& rDlgSize );
DECL_LINK( OkHdl, Button * );
DECL_LINK( CancelHdl, Button * );
public:
- SvRTLInputBox( Window* pParent, const String& rPrompt, const String& rTitle,
- const String& rDefault, long nXTwips = -1, long nYTwips = -1 );
+ SvRTLInputBox( Window* pParent, const OUString& rPrompt, const OUString& rTitle,
+ const OUString& rDefault, long nXTwips = -1, long nYTwips = -1 );
OUString GetText() const { return aText; }
};
-SvRTLInputBox::SvRTLInputBox( Window* pParent, const String& rPrompt,
- const String& rTitle, const String& rDefault,
+SvRTLInputBox::SvRTLInputBox( Window* pParent, const OUString& rPrompt,
+ const OUString& rTitle, const OUString& rDefault,
long nXTwips, long nYTwips ) :
ModalDialog( pParent,WB_3DLOOK | WB_MOVEABLE | WB_CLOSEABLE ),
aEdit( this, WB_LEFT | WB_BORDER ),
@@ -103,9 +103,9 @@ void SvRTLInputBox::PositionEdit( const Size& rDlgSize )
}
-void SvRTLInputBox::PositionPrompt(const String& rPrompt,const Size& rDlgSize)
+void SvRTLInputBox::PositionPrompt(const OUString& rPrompt,const Size& rDlgSize)
{
- if ( rPrompt.Len() == 0 )
+ if ( rPrompt.isEmpty() )
return;
OUString aText_(convertLineEnd(rPrompt, LINEEND_CR));
aPromptText.SetPosPixel( LogicToPixel(Point(5,5)));
@@ -153,10 +153,10 @@ RTLFUNC(InputBox)
StarBASIC::Error( SbERR_BAD_ARGUMENT );
else
{
- String aTitle;
- String aDefault;
+ OUString aTitle;
+ OUString aDefault;
sal_Int32 nX = -1, nY = -1; // center
- const String& rPrompt = rPar.Get(1)->GetOUString();
+ const OUString& rPrompt = rPar.Get(1)->GetOUString();
if ( nArgCount > 2 && !rPar.Get(2)->IsErr() )
aTitle = rPar.Get(2)->GetOUString();
if ( nArgCount > 3 && !rPar.Get(3)->IsErr() )
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 048ca0c..1180a81 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3617,7 +3617,7 @@ RTLFUNC(Shell)
// #55735 if there are parameters, they have to be separated
// #72471 also separate the single parameters
- std::list<String> aTokenList;
+ std::list<OUString> aTokenList;
OUString aToken;
sal_Int32 i = 0;
sal_Unicode c;
@@ -3699,7 +3699,7 @@ RTLFUNC(Shell)
}
// #72471 work parameter(s) up
- std::list<String>::const_iterator iter = aTokenList.begin();
+ std::list<OUString>::const_iterator iter = aTokenList.begin();
const OUString& rStr = *iter;
OUString aOUStrProg( rStr.getStr(), rStr.getLength() );
OUString aOUStrProgURL = getFullPath( aOUStrProg );
@@ -3824,7 +3824,7 @@ OUString getBasicTypeName( SbxDataType eType )
return OUString::createFromAscii(pTypeNames[nPos]);
}
-String getObjectTypeName( SbxVariable* pVar )
+OUString getObjectTypeName( SbxVariable* pVar )
{
OUString sRet( "Object" );
if ( pVar )
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index e3545ef..4c919d5 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -680,16 +680,16 @@ enum VbaFormatType
struct VbaFormatInfo
{
VbaFormatType meType;
- const char* mpVbaFormat; // Format string in vba
+ OUString mpVbaFormat; // Format string in vba
NfIndexTableOffset meOffset; // SvNumberFormatter format index, if meType = VBA_FORMAT_TYPE_OFFSET
const char* mpOOoFormat; // if meType = VBA_FORMAT_TYPE_USERDEFINED
};
#define VBA_FORMAT_OFFSET( pcUtf8, eOffset ) \
- { VBA_FORMAT_TYPE_OFFSET, pcUtf8, eOffset, 0 }
+ { VBA_FORMAT_TYPE_OFFSET, OUString(pcUtf8), eOffset, 0 }
#define VBA_FORMAT_USERDEFINED( pcUtf8, pcDefinedUtf8 ) \
- { VBA_FORMAT_TYPE_USERDEFINED, pcUtf8, NF_NUMBER_STANDARD, pcDefinedUtf8 }
+ { VBA_FORMAT_TYPE_USERDEFINED, OUString(pcUtf8), NF_NUMBER_STANDARD, pcDefinedUtf8 }
static VbaFormatInfo pFormatInfoTable[] =
{
@@ -703,16 +703,16 @@ static VbaFormatInfo pFormatInfoTable[] =
VBA_FORMAT_OFFSET( "dddddd", NF_DATE_SYSTEM_LONG ),
VBA_FORMAT_USERDEFINED( "ttttt", "H:MM:SS AM/PM" ),
VBA_FORMAT_OFFSET( "ww", NF_DATE_WW ),
- { VBA_FORMAT_TYPE_NULL, 0, NF_INDEX_TABLE_ENTRIES, 0 }
+ { VBA_FORMAT_TYPE_NULL, OUString(""), NF_INDEX_TABLE_ENTRIES, 0 }
};
-VbaFormatInfo* getFormatInfo( const String& rFmt )
+VbaFormatInfo* getFormatInfo( const OUString& rFmt )
{
VbaFormatInfo* pInfo = NULL;
sal_Int16 i = 0;
- while( (pInfo = pFormatInfoTable + i )->mpVbaFormat != NULL )
+ while( (pInfo = pFormatInfoTable + i )->meType != VBA_FORMAT_TYPE_NULL )
{
- if( rFmt.EqualsIgnoreCaseAscii( pInfo->mpVbaFormat ) )
+ if( rFmt.equalsIgnoreAsciiCase( pInfo->mpVbaFormat ) )
break;
i++;
}
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index f2e6656..62896ac 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1687,7 +1687,7 @@ bool SfxLibraryContainer::implLoadLibraryIndexFile( SfxLibrary* pLib,
if( bStorage )
{
aLibInfoPath = maInfoFileName;
- aLibInfoPath += String( "-lb.xml" );
+ aLibInfoPath += "-lb.xml";
try
{
commit e8ecf30ea61625c3397a635c5c409bbc004685bc
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 09:58:03 2013 +0200
convert FRAMEWORK module from String to OUString
Change-Id: Iafa6b5f213d37093e7e46065c9264c7bb7fae377
diff --git a/framework/inc/services/licensedlg.hxx b/framework/inc/services/licensedlg.hxx
index a60acee..3d0d385 100644
--- a/framework/inc/services/licensedlg.hxx
+++ b/framework/inc/services/licensedlg.hxx
@@ -74,10 +74,10 @@ class LicenseDialog : public ModalDialog
PushButton aPBDecline;
PushButton aPBAccept;
FixedImage aArrow;
- String aStrAccept;
- String aStrNotAccept;
- String aOldCancelText;
- sal_Bool bEndReached;
+ OUString aStrAccept;
+ OUString aStrNotAccept;
+ OUString aOldCancelText;
+ sal_Bool bEndReached;
void EnableControls();
diff --git a/framework/inc/xml/imagesconfiguration.hxx b/framework/inc/xml/imagesconfiguration.hxx
index 0961438..7a5fbda 100644
--- a/framework/inc/xml/imagesconfiguration.hxx
+++ b/framework/inc/xml/imagesconfiguration.hxx
@@ -46,14 +46,14 @@ struct ImageItemDescriptor
{
ImageItemDescriptor() : nIndex( -1 ) {}
- String aCommandURL; // URL command to dispatch
- long nIndex; // index of the bitmap inside the bitmaplist
+ OUString aCommandURL; // URL command to dispatch
+ long nIndex; // index of the bitmap inside the bitmaplist
};
struct ExternalImageItemDescriptor
{
- String aCommandURL; // URL command to dispatch
- String aURL; // a URL to an external bitmap
+ OUString aCommandURL; // URL command to dispatch
+ OUString aURL; // a URL to an external bitmap
};
typedef boost::ptr_vector<ImageItemDescriptor> ImageItemListDescriptor;
@@ -67,13 +67,13 @@ struct ImageListItemDescriptor
~ImageListItemDescriptor() { delete pImageItemList; }
- String aURL; // an URL to a bitmap with several images inside
+ OUString aURL; // an URL to a bitmap with several images inside
Color aMaskColor; // a color used as transparent
- String aMaskURL; // an URL to an optional bitmap used as a mask
- ImageMaskMode nMaskMode; // an enum to describe the current mask mode
- ImageItemListDescriptor* pImageItemList; // an array of ImageItemDescriptors that describes every image
- String aHighContrastURL; // an URL to an optional high contrast bitmap with serveral images inside
- String aHighContrastMaskURL; // an URL to an optional high contrast bitmap as a mask
+ OUString aMaskURL; // an URL to an optional bitmap used as a mask
+ ImageMaskMode nMaskMode; // an enum to describe the current mask mode
+ ImageItemListDescriptor* pImageItemList; // an array of ImageItemDescriptors that describes every image
+ OUString aHighContrastURL; // an URL to an optional high contrast bitmap with serveral images inside
+ OUString aHighContrastMaskURL; // an URL to an optional high contrast bitmap as a mask
};
typedef boost::ptr_vector<ImageListItemDescriptor> ImageListDescriptor;
diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index 387451e..b645b3b 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -849,13 +849,13 @@ AcceleratorCache::TKeyList::const_iterator lcl_getPreferredKey(const Accelerator
{
const css::awt::KeyEvent& rAWTKey = *pIt;
const KeyCode aVCLKey = ::svt::AcceleratorExecute::st_AWTKey2VCLKey(rAWTKey);
- const String sName = aVCLKey.GetName();
+ const OUString sName = aVCLKey.GetName();
- if (sName.Len () > 0)
+ if (!sName.isEmpty())
return pIt;
}
- return lKeys.end ();
+ return lKeys.end();
}
//-----------------------------------------------
diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx
index 6818e6a..4ec18d4 100644
--- a/framework/source/classes/menumanager.cxx
+++ b/framework/source/classes/menumanager.cxx
@@ -584,7 +584,7 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
{
// Do handle file URL differently => convert it to a system
// path and abbreviate it with a special function:
- String aFileSystemPath( aURL.getFSysPath( INetURLObject::FSYS_DETECT ) );
+ OUString aFileSystemPath( aURL.getFSysPath( INetURLObject::FSYS_DETECT ) );
OUString aSystemPath( aFileSystemPath );
OUString aCompactedSystemPath;
@@ -592,14 +592,14 @@ void MenuManager::UpdateSpecialFileMenu( Menu* pMenu )
aTipHelpText = aSystemPath;
oslFileError nError = osl_abbreviateSystemPath( aSystemPath.pData, &aCompactedSystemPath.pData, 46, NULL );
if ( !nError )
- aMenuTitle = String( aCompactedSystemPath );
+ aMenuTitle = aCompactedSystemPath;
else
aMenuTitle = aSystemPath;
}
else
{
// Use INetURLObject to abbreviate all other URLs
- String aShortURL;
+ OUString aShortURL;
aShortURL = aURL.getAbbreviated( xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS );
aMenuTitle += aShortURL;
aTipHelpText = aURLString;
diff --git a/framework/source/fwe/classes/addonmenu.cxx b/framework/source/fwe/classes/addonmenu.cxx
index 9a7af5c2..51b96ef 100644
--- a/framework/source/fwe/classes/addonmenu.cxx
+++ b/framework/source/fwe/classes/addonmenu.cxx
@@ -151,10 +151,10 @@ sal_uInt16 AddonMenuManager::GetNextPos( sal_uInt16 nPos )
}
-static sal_uInt16 FindMenuId( Menu* pMenu, const String aCommand )
+static sal_uInt16 FindMenuId( Menu* pMenu, const OUString aCommand )
{
sal_uInt16 nPos = 0;
- String aCmd;
+ OUString aCmd;
for ( nPos = 0; nPos < pMenu->GetItemCount(); nPos++ )
{
sal_uInt16 nId = pMenu->GetItemId( nPos );
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 2a503b0..d8bfdbb 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -1548,7 +1548,7 @@ Image AddonsOptions_Impl::ReadImageFromURL(const OUString& aImageURL)
Graphic aGraphic;
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
- rGF.ImportGraphic( aGraphic, String(), *pStream, GRFILTER_FORMAT_DONTKNOW );
+ rGF.ImportGraphic( aGraphic, OUString(), *pStream, GRFILTER_FORMAT_DONTKNOW );
BitmapEx aBitmapEx = aGraphic.GetBitmapEx();
diff --git a/framework/source/helper/vclstatusindicator.cxx b/framework/source/helper/vclstatusindicator.cxx
index 3eab485..077faf2 100644
--- a/framework/source/helper/vclstatusindicator.cxx
+++ b/framework/source/helper/vclstatusindicator.cxx
@@ -98,7 +98,7 @@ void SAL_CALL VCLStatusIndicator::reset()
if (m_pStatusBar)
{
m_pStatusBar->SetProgressValue(0);
- m_pStatusBar->SetText(String());
+ m_pStatusBar->SetText(OUString());
}
// <- SOLAR SAFE ----------------------------
}
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index cc4569a..bd2f04e 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -970,11 +970,11 @@ void ToolbarLayoutManager::setDockingAreaOffsets( const ::Rectangle aOffsets )
OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const
{
- String aAddonGenericTitle(FWK_RESSTR(STR_TOOLBAR_TITLE_ADDON));
+ OUString aAddonGenericTitle(FWK_RESSTR(STR_TOOLBAR_TITLE_ADDON));
const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper();
- String aNumStr = rI18nHelper.GetNum( nNumber, 0, sal_False, sal_False );
- aAddonGenericTitle.SearchAndReplaceAscii( "%num%", aNumStr );
+ OUString aNumStr = rI18nHelper.GetNum( nNumber, 0, sal_False, sal_False );
+ aAddonGenericTitle = aAddonGenericTitle.replaceFirst( "%num%", aNumStr );
return OUString( aAddonGenericTitle );
}
@@ -1446,8 +1446,8 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno
pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( pWindow )
{
- String aText = pWindow->GetText();
- if ( aText.Len() == 0 )
+ OUString aText = pWindow->GetText();
+ if ( aText.isEmpty() )
pWindow->SetText( rElement.m_aUIName );
if ( rElement.m_bNoClose )
pWindow->SetStyle( pWindow->GetStyle() & ~WB_CLOSEABLE );
@@ -1469,8 +1469,8 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno
if ( pWindow )
{
SolarMutexGuard aGuard;
- String aText = pWindow->GetText();
- if ( aText.Len() == 0 )
+ OUString aText = pWindow->GetText();
+ if ( aText.isEmpty() )
pWindow->SetText( rElement.m_aUIName );
}
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index bcc9864..d39c90e 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -698,7 +698,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL Desktop::queryDispatch( co
// Remove uno and cmd protocol part as we want to support both of them. We store only the command part
// in our hash map. All other protocols are stored with the protocol part.
- String aCommand( aURL.Main );
+ OUString aCommand( aURL.Main );
if ( aURL.Protocol.equalsIgnoreAsciiCaseAsciiL( UNO_PROTOCOL, sizeof( UNO_PROTOCOL )-1 ))
aCommand = aURL.Path;
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 0a4eefc..e0d1388 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -2064,7 +2064,7 @@ css::uno::Reference< css::frame::XDispatch > SAL_CALL Frame::queryDispatch( cons
// Remove uno and cmd protocol part as we want to support both of them. We store only the command part
// in our hash map. All other protocols are stored with the protocol part.
- String aCommand( aURL.Main );
+ OUString aCommand( aURL.Main );
if ( aURL.Protocol.equalsIgnoreAsciiCaseAsciiL( UNO_PROTOCOL, sizeof( UNO_PROTOCOL )-1 ))
aCommand = aURL.Path;
diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx
index 3b9cdb6..b0ee908 100644
--- a/framework/source/services/license.cxx
+++ b/framework/source/services/license.cxx
@@ -352,8 +352,8 @@ LicenseDialog::LicenseDialog(const OUString & aLicensePath, ResMgr *pResMgr) :
aStyle |= WB_REPEAT;
aPBPageDown.SetStyle( aStyle );
- String aText = aInfo2FT.GetText();
- aText.SearchAndReplaceAll( OUString("%PAGEDOWN"), aPBPageDown.GetText() );
+ OUString aText = aInfo2FT.GetText();
+ aText = aText.replaceAll( "%PAGEDOWN", aPBPageDown.GetText() );
aInfo2FT.SetText( aText );
aPBDecline.SetText( aStrNotAccept );
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index ffb9737..e04ba8a 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -207,7 +207,7 @@ void CmdImageList::impl_fillCommandToImageNameMap()
}
// We have to map commands which uses special characters like '/',':','?','\','<'.'>','|'
- String aExt = OUString(".png");
+ OUString aExt = OUString(".png");
m_aImageCommandNameVector.resize(aCmdImageSeq.getLength() );
m_aImageNameVector.resize( aCmdImageSeq.getLength() );
@@ -218,7 +218,7 @@ void CmdImageList::impl_fillCommandToImageNameMap()
// Create a image name vector that must be provided to the vcl imagelist. We also need
// a command to image name map to speed up access time for image retrieval.
OUString aUNOString( ".uno:" );
- String aEmptyString;
+ OUString aEmptyString;
const sal_uInt32 nCount = m_aImageCommandNameVector.size();
for ( sal_uInt32 i = 0; i < nCount; i++ )
{
diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx
index cbf868e..bbdab81 100644
--- a/framework/source/uielement/fontsizemenucontroller.cxx
+++ b/framework/source/uielement/fontsizemenucontroller.cxx
@@ -182,8 +182,8 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
sal_uLong nCount = aFontSizeNames.Count();
for( sal_uLong i = 0; i < nCount; i++ )
{
- String aSizeName = aFontSizeNames.GetIndexName( i );
- long nSize = aFontSizeNames.GetIndexSize( i );
+ OUString aSizeName = aFontSizeNames.GetIndexName( i );
+ long nSize = aFontSizeNames.GetIndexSize( i );
m_pHeightArray[nPos] = nSize;
nPos++; // Id is nPos+1
pVCLPopupMenu->InsertItem( nPos, aSizeName, MIB_RADIOCHECK | MIB_AUTOCHECK );
@@ -200,8 +200,8 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
pTempAry = pAry;
while ( *pTempAry )
{
- String aSizeName = aFontSizeNames.Size2Name( *pTempAry );
- if ( aSizeName.Len() )
+ OUString aSizeName = aFontSizeNames.Size2Name( *pTempAry );
+ if ( !aSizeName.isEmpty() )
{
m_pHeightArray[nPos] = *pTempAry;
nPos++; // Id is nPos+1
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 340fd28..5b9af9d 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -68,10 +68,10 @@ static OUString getEnumCommand( const OUString& rCommand )
INetURLObject aURL( rCommand );
OUString aEnumCommand;
- String aURLPath = aURL.GetURLPath();
- xub_StrLen nIndex = aURLPath.Search( '.' );
- if (( nIndex > 0 ) && ( nIndex < aURLPath.Len() ))
- aEnumCommand = aURLPath.Copy( nIndex+1 );
+ OUString aURLPath = aURL.GetURLPath();
+ sal_Int32 nIndex = aURLPath.indexOf( '.' );
+ if (( nIndex > 0 ) && ( nIndex < aURLPath.getLength() ))
+ aEnumCommand = aURLPath.copy( nIndex+1 );
return aEnumCommand;
}
diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx
index 0e97c0f..08485e3 100644
--- a/framework/source/uielement/headermenucontroller.cxx
+++ b/framework/source/uielement/headermenucontroller.cxx
@@ -162,7 +162,7 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra
if ( bAllOneState && ( nCount > 1 ))
{
// Insert special item for all command
- pVCLPopupMenu->InsertItem( ALL_MENUITEM_ID, String( FwlResId( STR_MENU_HEADFOOTALL )), 0, OString(), 0 );
+ pVCLPopupMenu->InsertItem( ALL_MENUITEM_ID, OUString( FwlResId( STR_MENU_HEADFOOTALL )), 0, OString(), 0 );
OUStringBuffer aStrBuf( aCmd );
aStrBuf.appendAscii( "?On:bool=" );
diff --git a/framework/source/uielement/imagebuttontoolbarcontroller.cxx b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
index f7e7f57..533d96f 100644
--- a/framework/source/uielement/imagebuttontoolbarcontroller.cxx
+++ b/framework/source/uielement/imagebuttontoolbarcontroller.cxx
@@ -177,7 +177,7 @@ sal_Bool ImageButtonToolbarController::ReadImageFromURL( sal_Bool bBigImage, con
Graphic aGraphic;
GraphicFilter& rGF = GraphicFilter::GetGraphicFilter();
- rGF.ImportGraphic( aGraphic, String(), *pStream, GRFILTER_FORMAT_DONTKNOW );
+ rGF.ImportGraphic( aGraphic, OUString(), *pStream, GRFILTER_FORMAT_DONTKNOW );
BitmapEx aBitmapEx = aGraphic.GetBitmapEx();
diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx
index 38a4def..5fd07ce 100644
--- a/framework/source/uielement/langselectionmenucontroller.cxx
+++ b/framework/source/uielement/langselectionmenucontroller.cxx
@@ -248,7 +248,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
{
pPopupMenu->InsertItem( nItemId, rStr );
aCmd = aCmd_Language;
- aCmd += String( rStr );
+ aCmd += rStr;
pPopupMenu->SetItemCommand( nItemId, aCmd );
if (rStr == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu )
{
@@ -261,19 +261,19 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup
// entry for LANGUAGE_NONE
++nItemId;
- pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_NONE )) );
+ pPopupMenu->InsertItem( nItemId, OUString(FwlResId( STR_LANGSTATUS_NONE )) );
aCmd = aCmd_Language + "LANGUAGE_NONE";
pPopupMenu->SetItemCommand( nItemId, aCmd );
// entry for 'Reset to default language'
++nItemId;
- pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_RESET_TO_DEFAULT_LANGUAGE )) );
+ pPopupMenu->InsertItem( nItemId, OUString(FwlResId( STR_RESET_TO_DEFAULT_LANGUAGE )) );
aCmd = aCmd_Language + "RESET_LANGUAGES";
pPopupMenu->SetItemCommand( nItemId, aCmd );
// entry for opening the Format/Character dialog
++nItemId;
- pPopupMenu->InsertItem( nItemId, String(FwlResId( STR_LANGSTATUS_MORE )));
+ pPopupMenu->InsertItem( nItemId, OUString(FwlResId( STR_LANGSTATUS_MORE )));
pPopupMenu->SetItemCommand( nItemId, aCmd_Dialog );
}
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index f7feca0..9db444c 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -87,7 +87,7 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo
// insert basic
OUString aCommand(".uno:MacroDialog");
- String aDisplayName = RetrieveLabelFromCommand( aCommand );
+ OUString aDisplayName = RetrieveLabelFromCommand( aCommand );
pPopupMenu->InsertItem( 2, aDisplayName );
pPopupMenu->SetItemCommand( 2, aCommand );
@@ -189,15 +189,15 @@ void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, sal_uInt16 sta
if ( serviceNames[ index ].indexOf( providerKey ) == 0 )
{
OUString serviceName = serviceNames[ index ];
- String aCommand = aCmdBase;
- String aDisplayName = String( serviceName.copy( providerKey.getLength() ) );
- if( aDisplayName.Equals( OUString("Java") ) || aDisplayName.Equals( OUString("Basic") ) )
+ OUString aCommand = aCmdBase;
+ OUString aDisplayName = serviceName.copy( providerKey.getLength() );
+ if( aDisplayName == "Java" || aDisplayName == "Basic" )
{
// no entries for Java & Basic added elsewhere
break;
}
- aCommand.Append( aDisplayName );
- aDisplayName.Append( ellipsis );
+ aCommand += aDisplayName;
+ aDisplayName += ellipsis;
pPopupMenu->InsertItem( itemId, aDisplayName );
pPopupMenu->SetItemCommand( itemId, aCommand );
itemId++;
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index ff46fb4..e0bac02 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -737,7 +737,7 @@ void MenuBarManager::CheckAndAddMenuExtension( Menu* pMenu )
sal_uInt16 nNewItemId( 0 );
sal_uInt16 nInsertPos( MENU_APPEND );
sal_uInt16 nBeforePos( MENU_APPEND );
- String aCommandBefore( OUString(".uno:About"));
+ OUString aCommandBefore( ".uno:About" );
for ( sal_uInt16 n = 0; n < pMenu->GetItemCount(); n++ )
{
sal_uInt16 nItemId = pMenu->GetItemId( n );
@@ -847,8 +847,8 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
if (( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) &&
( pMenu->GetItemText( nItemId ).isEmpty() ))
{
- String aCommand = pMenu->GetItemCommand( nItemId );
- if ( aCommand.Len() > 0 ) {
+ OUString aCommand = pMenu->GetItemCommand( nItemId );
+ if ( !aCommand.isEmpty() ) {
pMenu->SetItemText( nItemId, RetrieveLabelFromCommand( aCommand ));
}
}
@@ -1235,7 +1235,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
framework::AddonMenuManager::MergeAddonHelpMenu( rFrame, (MenuBar *)pMenu );
}
- String aEmpty;
+ OUString aEmpty;
sal_Bool bAccessibilityEnabled( Application::GetSettings().GetMiscSettings().GetEnableATToolSupport() );
sal_uInt16 nItemCount = pMenu->GetItemCount();
OUString aItemCommand;
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index 156979c..8b58377 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -102,8 +102,8 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, sal_Bool bSetImage
if ( !bImageSet )
{
- String aCmd( pPopupMenu->GetItemCommand( nItemId ) );
- if ( aCmd.Len() )
+ OUString aCmd( pPopupMenu->GetItemCommand( nItemId ) );
+ if ( !aCmd.isEmpty() )
aImage = GetImageFromURL( xFrame, aCmd, false );
if ( !!aImage )
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index aa2a270..423028d 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -519,7 +519,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
}
}
- String aLabelStr = String( FwkResId( STR_RESTORE_TOOLBARS ));
+ OUString aLabelStr( FwkResId( STR_RESTORE_TOOLBARS ));
OUString aRestoreCmd( CMD_RESTOREVISIBILITY );
addCommand( m_xPopupMenu, aRestoreCmd, aLabelStr );
}
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index aae448f..2280126 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -283,7 +283,7 @@ throw( SAXException, RuntimeException )
}
} // for
- if ( m_pImages->aURL.Len() == 0 )
+ if ( m_pImages->aURL.isEmpty() )
{
delete m_pImages;
m_pImages = NULL;
@@ -356,7 +356,7 @@ throw( SAXException, RuntimeException )
}
// Check required attribute "command"
- if ( pItem->aCommandURL.Len() == 0 )
+ if ( pItem->aCommandURL.isEmpty() )
{
delete pItem;
delete m_pImages;
@@ -459,7 +459,7 @@ throw( SAXException, RuntimeException )
}
// Check required attribute "command"
- if ( pItem->aCommandURL.Len() == 0 )
+ if ( pItem->aCommandURL.isEmpty() )
{
delete pItem;
delete m_pImages;
@@ -473,7 +473,7 @@ throw( SAXException, RuntimeException )
}
// Check required attribute "href"
- if ( pItem->aURL.Len() == 0 )
+ if ( pItem->aURL.isEmpty() )
{
delete pItem;
delete m_pImages;
@@ -704,7 +704,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor*
m_aAttributeType,
pImageList->aMaskURL );
- if ( pImageList->aHighContrastMaskURL.Len() > 0 )
+ if ( !pImageList->aHighContrastMaskURL.isEmpty() )
{
pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_HIGHCONTRASTMASKURL ),
m_aAttributeType,
@@ -728,7 +728,7 @@ void OWriteImagesDocumentHandler::WriteImageList( const ImageListItemDescriptor*
OUString( ATTRIBUTE_MASKMODE_COLOR ) );
}
- if ( pImageList->aHighContrastURL.Len() > 0 )
+ if ( !pImageList->aHighContrastURL.isEmpty() )
{
pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_HIGHCONTRASTURL ),
m_aAttributeType,
@@ -798,14 +798,14 @@ void OWriteImagesDocumentHandler::WriteExternalImage( const ExternalImageItemDes
m_aAttributeType,
m_aAttributeValueSimple );
- if ( pExternalImage->aURL.Len() > 0 )
+ if ( !pExternalImage->aURL.isEmpty() )
{
pList->AddAttribute( m_aXMLXlinkNS + OUString( ATTRIBUTE_HREF ),
m_aAttributeType,
pExternalImage->aURL );
}
- if ( pExternalImage->aCommandURL.Len() > 0 )
+ if ( !pExternalImage->aCommandURL.isEmpty() )
{
pList->AddAttribute( m_aXMLImageNS + OUString( ATTRIBUTE_COMMAND ),
m_aAttributeType,
commit 1591130dc2b62e5fdec45274b1b06d63df0051b3
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 09:31:10 2013 +0200
convert DRAWINGLAYER module from String to OUString
Change-Id: I0856974cb9fe33418e3be0a5b977100be3bdce00
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index c9f4af1..85cb987 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1008,8 +1008,8 @@ namespace drawinglayer
case drawinglayer::primitive2d::FIELD_TYPE_URL :
{
const OUString& rURL = rFieldPrimitive.getString();
- const String aOldString(rURL);
- mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const sal_uInt8* >(aOldString.GetBuffer()), 2 * aOldString.Len()));
+ const OUString aOldString(rURL);
+ mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const sal_uInt8* >(aOldString.getStr()), 2 * aOldString.getLength()));
break;
}
}
commit abe49a84273f79b11f333136bedfc753d79bf306
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 09:27:47 2013 +0200
convert CPPCANVAS module from String to OUString
Change-Id: I12a219a50cc3a9b07c9852cc0d417f71797b9e15
diff --git a/cppcanvas/source/inc/implrenderer.hxx b/cppcanvas/source/inc/implrenderer.hxx
index 79a2967..c70bf54 100644
--- a/cppcanvas/source/inc/implrenderer.hxx
+++ b/cppcanvas/source/inc/implrenderer.hxx
@@ -263,7 +263,7 @@ static float GetSwapFloat( SvStream& rSt )
bool bSubsettableActions );
void createTextAction( const ::Point& rStartPoint,
- const String rString,
+ const OUString rString,
int nIndex,
int nLength,
const sal_Int32* pCharWidths,
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index a88ae12..3bee95f 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -750,7 +750,7 @@ namespace cppcanvas
if (width == 0) { // non native formats
GraphicFilter filter;
- filter.ImportGraphic (graphic, String (), s);
+ filter.ImportGraphic (graphic, OUString(), s);
SAL_INFO("cppcanvas.emf", "EMF+\tbitmap width: " << graphic.GetBitmap().GetSizePixel().Width() << " height: " << graphic.GetBitmap().GetSizePixel().Height());
}
@@ -764,7 +764,7 @@ namespace cppcanvas
// workaround buggy metafiles, which have wrong mfSize set (n#705956 for example)
SvMemoryStream mfStream (((char *)s.GetData()) + s.Tell(), bUseWholeStream ? s.remainingSize() : dataSize - 16, STREAM_READ);
- filter.ImportGraphic (graphic, String (), mfStream);
+ filter.ImportGraphic (graphic, OUString(), mfStream);
// debug code - write the stream to debug file /tmp/emf-stream.emf
#if OSL_DEBUG_LEVEL > 1
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index c9489afd..a8145bb 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -849,14 +849,14 @@ namespace cppcanvas
// create text effects such as shadow/relief/embossed
void ImplRenderer::createTextAction( const ::Point& rStartPoint,
- const String rString,
+ const OUString rString,
int nIndex,
int nLength,
const sal_Int32* pCharWidths,
const ActionFactoryParameters& rParms,
bool bSubsettableActions )
{
- ENSURE_OR_THROW( nIndex >= 0 && nLength <= rString.Len() + nIndex,
+ ENSURE_OR_THROW( nIndex >= 0 && nLength <= rString.getLength() + nIndex,
"ImplRenderer::createTextWithEffectsAction(): Invalid text index" );
if( !nLength )
@@ -975,11 +975,11 @@ namespace cppcanvas
nMaxWidth += nWidth + 1;
long nFullStrikeoutWidth = 0;
- String aStrikeoutText;
+ OUString aStrikeoutText;
while( (nFullStrikeoutWidth+=nStrikeoutWidth ) < nMaxWidth+1 )
- aStrikeoutText += pChars[0];
+ aStrikeoutText += OUString(pChars[0]);
- xub_StrLen nLen = aStrikeoutText.Len();
+ sal_Int32 nLen = aStrikeoutText.getLength();
if( nLen )
{
@@ -1008,7 +1008,7 @@ namespace cppcanvas
aShadowColor,
aStrikeoutText,
nStartPos,
- aStrikeoutText.Len(),
+ aStrikeoutText.getLength(),
pStrikeoutCharWidths,
rParms.mrVDev,
rParms.mrCanvas,
diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx
index 61b9182..927d344 100644
--- a/cppcanvas/source/mtfrenderer/textaction.cxx
+++ b/cppcanvas/source/mtfrenderer/textaction.cxx
@@ -189,7 +189,7 @@ namespace cppcanvas
return aCharWidthSeq;
}
- uno::Sequence< double > setupDXArray( const ::String& rText,
+ uno::Sequence< double > setupDXArray( const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
VirtualDevice& rVDev,
@@ -1935,7 +1935,7 @@ namespace cppcanvas
const ::Color& rReliefColor,
const ::basegfx::B2DSize& rShadowOffset,
const ::Color& rShadowColor,
- const String& rText,
+ const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
const sal_Int32* pDXArray,
@@ -2085,7 +2085,7 @@ namespace cppcanvas
const ::Color& rReliefColor,
const ::Size& rShadowOffset,
const ::Color& rShadowColor,
- const String& rText,
+ const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
const sal_Int32* pDXArray,
diff --git a/cppcanvas/source/mtfrenderer/textaction.hxx b/cppcanvas/source/mtfrenderer/textaction.hxx
index b3218b0a..f40f03e 100644
--- a/cppcanvas/source/mtfrenderer/textaction.hxx
+++ b/cppcanvas/source/mtfrenderer/textaction.hxx
@@ -31,7 +31,6 @@ class VirtualDevice;
class Point;
class Size;
class Color;
-class String;
/* Definition of internal::TextActionFactory class */
@@ -71,7 +70,7 @@ namespace cppcanvas
const ::Color& rReliefColor,
const ::Size& rShadowOffset,
const ::Color& rShadowColor,
- const ::String& rText,
+ const OUString& rText,
sal_Int32 nStartPos,
sal_Int32 nLen,
const sal_Int32* pDXArray,
commit e6d91ff22428f909cf26b18599fdeb5e675c8228
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 09:11:03 2013 +0200
convert ACCESSIBILITY module from String to OUString
Change-Id: Ia4d2e1feef575cb911e981fbb8b6359755ab0dd9
diff --git a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
index c4eca89..a864fbe 100644
--- a/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
+++ b/accessibility/inc/accessibility/helper/IComboListBoxHelper.hxx
@@ -38,7 +38,7 @@ namespace accessibility
public:
virtual ~IComboListBoxHelper() = 0;
- virtual String GetEntry( sal_uInt16 nPos ) const = 0;
+ virtual OUString GetEntry( sal_uInt16 nPos ) const = 0;
virtual Rectangle GetDropDownPosSizePixel( ) const = 0;
virtual Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const = 0;
virtual Rectangle GetWindowExtentsRelative( Window* pRelativeWindow ) = 0;
diff --git a/accessibility/inc/accessibility/helper/listboxhelper.hxx b/accessibility/inc/accessibility/helper/listboxhelper.hxx
index 2c45f96..8da885d 100644
--- a/accessibility/inc/accessibility/helper/listboxhelper.hxx
+++ b/accessibility/inc/accessibility/helper/listboxhelper.hxx
@@ -46,7 +46,7 @@ public:
m_aComboListBox( _pListBox ){}
// -----------------------------------------------------------------------------
- virtual String GetEntry( sal_uInt16 nPos ) const
+ virtual OUString GetEntry( sal_uInt16 nPos ) const
{
return m_aComboListBox.GetEntry( nPos );
}
diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
index 8ff90ea..fc83bd5 100644
--- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
+++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx
@@ -144,7 +144,7 @@ namespace accessibility
m_pPanelDeck->AddListener( *this );
m_aChildren.resize( m_pPanelDeck->GetPanelCount() );
- const String sAccessibleDescription( TK_RES_STRING( RID_STR_ACC_DESC_PANELDECL_TABBAR ) );
+ const OUString sAccessibleDescription( TK_RES_STRING( RID_STR_ACC_DESC_PANELDECL_TABBAR ) );
i_rTabBar.SetAccessibleName( sAccessibleDescription );
i_rTabBar.SetAccessibleDescription( sAccessibleDescription );
diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
index fd739fb..d36c8a9 100644
--- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
+++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx
@@ -494,13 +494,13 @@ throw(RuntimeException)
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( m_aMutex );
- String sText = getText();
- if ( ( 0 > nStartIndex ) || ( sText.Len() <= nStartIndex )
- || ( 0 > nEndIndex ) || ( sText.Len() <= nEndIndex ) )
+ OUString sText = getText();
+ if ( ( 0 > nStartIndex ) || ( sText.getLength() <= nStartIndex )
+ || ( 0 > nEndIndex ) || ( sText.getLength() <= nEndIndex ) )
throw IndexOutOfBoundsException();
sal_Int32 nLen = nEndIndex - nStartIndex + 1;
- ::svt::OStringTransfer::CopyString( sText.Copy( (sal_uInt16)nStartIndex, (sal_uInt16)nLen ), m_pIconCtrl );
+ ::svt::OStringTransfer::CopyString( sText.copy( nStartIndex, nLen ), m_pIconCtrl );
return sal_True;
}
diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx
index ebb69f1..6bc4baa 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -580,13 +580,13 @@ namespace accessibility
::osl::MutexGuard aGuard( m_aMutex );
EnsureIsAlive();
- String sText = getText();
- if ( ( 0 > nStartIndex ) || ( sText.Len() <= nStartIndex )
- || ( 0 > nEndIndex ) || ( sText.Len() <= nEndIndex ) )
+ OUString sText = getText();
+ if ( ( 0 > nStartIndex ) || ( sText.getLength() <= nStartIndex )
+ || ( 0 > nEndIndex ) || ( sText.getLength() <= nEndIndex ) )
throw IndexOutOfBoundsException();
sal_Int32 nLen = nEndIndex - nStartIndex + 1;
- ::svt::OStringTransfer::CopyString( sText.Copy( (sal_uInt16)nStartIndex, (sal_uInt16)nLen ), getListBox() );
+ ::svt::OStringTransfer::CopyString( sText.copy( nStartIndex, nLen ), getListBox() );
return sal_True;
}
commit ee0d567ff0f6f94bfd93a82ef85befec067e0b35
Author: Noel Grandin <noel at peralex.com>
Date: Mon Sep 16 09:06:37 2013 +0200
convert SVTOOLS module from String to OUString
Change-Id: I647e952769c79b95e11af778b07d64d3a6fbe226
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 3b2874c..5317426 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -1066,8 +1066,8 @@ OUString SvHeaderTabListBox::GetAccessibleObjectDescription( ::svt::AccessibleBr
if( _eType == ::svt::BBTYPE_TABLECELL && _nPos != -1 )
{
- const String sVar1( RTL_CONSTASCII_USTRINGPARAM( "%1" ) );
- const String sVar2( RTL_CONSTASCII_USTRINGPARAM( "%2" ) );
+ const OUString sVar1( "%1" );
+ const OUString sVar2( "%2" );
sal_uInt16 nColumnCount = GetColumnCount();
if (nColumnCount > 0)
@@ -1075,12 +1075,12 @@ OUString SvHeaderTabListBox::GetAccessibleObjectDescription( ::svt::AccessibleBr
sal_Int32 nRow = _nPos / nColumnCount;
sal_uInt16 nColumn = static_cast< sal_uInt16 >( _nPos % nColumnCount );
- String aText( SVT_RESSTR(STR_SVT_ACC_DESC_TABLISTBOX) );
- aText.SearchAndReplace( sVar1, OUString::number( nRow ) );
- String sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
- if ( sColHeader.Len() == 0 )
+ OUString aText( SVT_RESSTR(STR_SVT_ACC_DESC_TABLISTBOX) );
+ aText = aText.replaceFirst( sVar1, OUString::number( nRow ) );
+ OUString sColHeader = m_pImpl->m_pHeaderBar->GetItemText( m_pImpl->m_pHeaderBar->GetItemId( nColumn ) );
+ if ( sColHeader.isEmpty() )
sColHeader = OUString::number( nColumn );
- aText.SearchAndReplace( sVar2, sColHeader );
+ aText = aText.replaceFirst( sVar2, sColHeader );
aRetText = aText;
}
}
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index d145c12..ad63c28 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -85,7 +85,7 @@ public:
inline SvtURLBox_Impl( )
{
- FilterMatch::createWildCardFilterList(String(),m_aFilters);
+ FilterMatch::createWildCardFilterList(OUString(),m_aFilters);
}
};
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index 2e2112b..1b6dc0d 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -178,7 +178,7 @@ namespace svt
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list