[Libreoffice-commits] core.git: cui/source editeng/source framework/source include/svtools include/vcl padmin/source svtools/source svx/source sw/source vcl/source
Caolán McNamara
caolanm at redhat.com
Mon Aug 12 00:33:35 PDT 2013
cui/source/tabpages/chardlg.cxx | 2
editeng/source/editeng/impedit2.cxx | 8 -
framework/source/uielement/menubarmanager.cxx | 6 -
include/svtools/ctrlbox.hxx | 20 ++--
include/svtools/headbar.hxx | 10 +-
include/svtools/tabbar.hxx | 8 -
include/vcl/accel.hxx | 6 -
include/vcl/cmdevt.hxx | 8 -
include/vcl/lstbox.hxx | 12 +-
include/vcl/menu.hxx | 30 +++---
include/vcl/texteng.hxx | 2
include/vcl/vclevent.hxx | 2
padmin/source/padialog.cxx | 16 +--
svtools/source/control/calendar.cxx | 26 ++---
svtools/source/control/ctrlbox.cxx | 46 +++++-----
svtools/source/control/headbar.cxx | 60 ++++++-------
svtools/source/control/tabbar.cxx | 2
svtools/source/uno/contextmenuhelper.cxx | 2
svx/source/gallery2/galbrws1.hxx | 2
sw/source/core/doc/extinput.cxx | 2
vcl/source/control/edit.cxx | 6 -
vcl/source/control/group.cxx | 8 -
vcl/source/control/lstbox.cxx | 22 ++---
vcl/source/edit/textdoc.cxx | 15 +--
vcl/source/edit/textdoc.hxx | 6 -
vcl/source/edit/texteng.cxx | 35 +++----
vcl/source/edit/textund2.hxx | 8 -
vcl/source/edit/textundo.cxx | 18 ++--
vcl/source/edit/textview.cxx | 6 -
vcl/source/edit/xtextedt.cxx | 14 +--
vcl/source/gdi/print2.cxx | 22 ++---
vcl/source/window/cmdevt.cxx | 14 +--
vcl/source/window/dlgctrl.cxx | 10 +-
vcl/source/window/menu.cxx | 114 +++++++++++++-------------
vcl/source/window/splitwin.cxx | 2
vcl/source/window/status.cxx | 14 +--
vcl/source/window/toolbox.cxx | 8 -
vcl/source/window/window.cxx | 4
vcl/source/window/winproc.cxx | 18 ++--
39 files changed, 304 insertions(+), 310 deletions(-)
New commits:
commit 9dd40c656feda2ccadb07d618a95b9ff63ab61ff
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 11 17:00:11 2013 +0100
XubString->OUString
Change-Id: I04c7da143425a9d8cc4fae155ad45a469df953c1
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 2a106a7..8167a91 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3356,7 +3356,7 @@ void SvxCharTwoLinesPage::SetBracket( sal_Unicode cBracket, sal_Bool bStart )
{
if ( (sal_uLong)pBox->GetEntryData(i) != CHRDLG_ENCLOSE_SPECIAL_CHAR )
{
- const sal_Unicode cChar = pBox->GetEntry(i).GetChar(0);
+ const sal_Unicode cChar = pBox->GetEntry(i)[0];
if ( cChar == cBracket )
{
pBox->SelectEntryPos(i);
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index a421372..1297b78 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -419,8 +419,8 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
if ( mpIMEInfos->bWasCursorOverwrite )
{
- sal_uInt16 nOldIMETextLen = mpIMEInfos->nLen;
- sal_uInt16 nNewIMETextLen = pData->GetText().Len();
+ sal_Int32 nOldIMETextLen = mpIMEInfos->nLen;
+ sal_Int32 nNewIMETextLen = pData->GetText().getLength();
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.Len() ) )
@@ -449,13 +449,13 @@ void ImpEditEngine::Command( const CommandEvent& rCEvt, EditView* pView )
}
if ( pData->GetTextAttr() )
{
- mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().Len() );
+ mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().getLength() );
mpIMEInfos->bCursor = pData->IsCursorVisible();
}
else
{
mpIMEInfos->DestroyAttribs();
- mpIMEInfos->nLen = pData->GetText().Len();
+ mpIMEInfos->nLen = pData->GetText().getLength();
}
ParaPortion* pPortion = FindParaPortion( mpIMEInfos->aPos.GetNode() );
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 7f7f69a..34f1b3e 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -845,7 +845,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu )
{
sal_uInt16 nItemId = pMenu->GetItemId( nPos );
if (( pMenu->GetItemType( nPos ) != MENUITEM_SEPARATOR ) &&
- ( pMenu->GetItemText( nItemId ).Len() == 0 ))
+ ( pMenu->GetItemText( nItemId ).isEmpty() ))
{
String aCommand = pMenu->GetItemCommand( nItemId );
if ( aCommand.Len() > 0 ) {
@@ -1252,7 +1252,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
}
if (( pMenu->IsMenuBar() || bAccessibilityEnabled ) &&
- ( pMenu->GetItemText( nItemId ).Len() == 0 ))
+ ( pMenu->GetItemText( nItemId ).isEmpty() ))
{
if ( !aItemCommand.isEmpty() )
pMenu->SetItemText( nItemId, RetrieveLabelFromCommand( aItemCommand ));
@@ -1272,7 +1272,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
{
// Retrieve module identifier from Help Command entry
OUString aModuleIdentifier( rModuleIdentifier );
- if ( pMenu->GetHelpCommand( nItemId ).Len() > 0 )
+ if (!pMenu->GetHelpCommand(nItemId).isEmpty())
{
aModuleIdentifier = pMenu->GetHelpCommand( nItemId );
pMenu->SetHelpCommand( nItemId, aEmpty );
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 621d8f8..dfc7efe 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -177,9 +177,9 @@ public:
virtual void UserDraw( const UserDrawEvent& rUDEvt );
using ListBox::InsertEntry;
- virtual sal_uInt16 InsertEntry( const XubString& rStr,
+ virtual sal_uInt16 InsertEntry( const OUString& rStr,
sal_uInt16 nPos = LISTBOX_APPEND );
- virtual sal_uInt16 InsertEntry( const Color& rColor, const XubString& rStr,
+ virtual sal_uInt16 InsertEntry( const Color& rColor, const OUString& rStr,
sal_uInt16 nPos = LISTBOX_APPEND );
void InsertAutomaticEntryColor(const Color &rAutoColorValue);
bool IsAutomaticSelected() { return !GetSelectEntryPos(); }
@@ -193,7 +193,7 @@ public:
virtual Color GetEntryColor( sal_uInt16 nPos ) const;
Size GetImageSize() const { return aImageSize; }
- void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True )
+ void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True )
{ ListBox::SelectEntry( rStr, bSelect ); }
void SelectEntry( const Color& rColor, sal_Bool bSelect = sal_True );
Color GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const;
@@ -297,7 +297,7 @@ class SVT_DLLPUBLIC LineListBox : public ListBox
{
ImpLineList* pLineList;
long m_nWidth;
- XubString m_sNone;
+ OUString m_sNone;
VirtualDevice aVirDev;
Size aTxtSize;
@@ -324,10 +324,10 @@ public:
/** Set the width in Twips */
void SetWidth( long nWidth );
long GetWidth() const { return m_nWidth; }
- void SetNone( const XubString& sNone );
+ void SetNone( const OUString& sNone );
using ListBox::InsertEntry;
- virtual sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
/** Insert a listbox entry with all widths in Twips. */
void InsertEntry( BorderWidthImpl aWidthImpl,
sal_uInt16 nStyle, long nMinWidth = 0,
@@ -343,7 +343,7 @@ public:
virtual sal_uInt16 GetEntryPos( sal_uInt16 nStyle = STYLE_SOLID ) const;
sal_uInt16 GetEntryStyle( sal_uInt16 nPos ) const;
- void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
+ void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True ) { ListBox::SelectEntry( rStr, bSelect ); }
void SelectEntry( sal_uInt16 nStyle = STYLE_SOLID, sal_Bool bSelect = sal_True );
sal_uInt16 GetSelectEntryStyle( sal_uInt16 nSelIndex = 0 ) const;
bool IsEntrySelected(const OUString& rStr) const
@@ -401,7 +401,7 @@ inline void LineListBox::SetWidth( long nWidth )
UpdateEntries( nOldWidth );
}
-inline void LineListBox::SetNone( const XubString& sNone )
+inline void LineListBox::SetNone( const OUString& sNone )
{
m_sNone = sNone;
}
@@ -449,7 +449,7 @@ private:
class SVT_DLLPUBLIC FontStyleBox : public ComboBox
{
- XubString aLastStyle;
+ OUString aLastStyle;
private:
using ComboBox::SetText;
@@ -463,7 +463,7 @@ public:
virtual void Modify();
void SetText( const OUString& rText );
- void Fill( const XubString& rName, const FontList* pList );
+ void Fill( const OUString& rName, const FontList* pList );
private:
// declared as private because some compilers would generate the default functions
diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx
index 5145231..1ff3d91 100644
--- a/include/svtools/headbar.hxx
+++ b/include/svtools/headbar.hxx
@@ -308,7 +308,7 @@ public:
virtual void Select();
virtual void DoubleClick();
- void InsertItem( sal_uInt16 nItemId, const XubString& rText,
+ void InsertItem( sal_uInt16 nItemId, const OUString& rText,
long nSize, HeaderBarItemBits nBits = HIB_STDSTYLE,
sal_uInt16 nPos = HEADERBAR_APPEND );
void RemoveItem( sal_uInt16 nItemId );
@@ -336,11 +336,11 @@ public:
void SetItemBits( sal_uInt16 nItemId, HeaderBarItemBits nNewBits );
HeaderBarItemBits GetItemBits( sal_uInt16 nItemId ) const;
- void SetItemText( sal_uInt16 nItemId, const XubString& rText );
- XubString GetItemText( sal_uInt16 nItemId ) const;
+ void SetItemText( sal_uInt16 nItemId, const OUString& rText );
+ OUString GetItemText( sal_uInt16 nItemId ) const;
- XubString GetHelpText( sal_uInt16 nItemId ) const;
- OString GetHelpId( sal_uInt16 nItemId ) const;
+ OUString GetHelpText( sal_uInt16 nItemId ) const;
+ OString GetHelpId( sal_uInt16 nItemId ) const;
Size CalcWindowSizePixel() const;
diff --git a/include/svtools/tabbar.hxx b/include/svtools/tabbar.hxx
index 265723e..0bf3be6 100644
--- a/include/svtools/tabbar.hxx
+++ b/include/svtools/tabbar.hxx
@@ -512,14 +512,14 @@ public:
void SetPageText( sal_uInt16 nPageId, const OUString& rText );
OUString GetPageText( sal_uInt16 nPageId ) const;
- XubString GetHelpText( sal_uInt16 nPageId ) const;
- OString GetHelpId( sal_uInt16 nPageId ) const;
+ OUString GetHelpText( sal_uInt16 nPageId ) const;
+ OString GetHelpId( sal_uInt16 nPageId ) const;
long GetSplitSize() const { return mnSplitSize; }
- void SetHelpText( const XubString& rText )
+ void SetHelpText( const OUString& rText )
{ Window::SetHelpText( rText ); }
- XubString GetHelpText() const
+ OUString GetHelpText() const
{ return Window::GetHelpText(); };
void SetHelpId( const OString& rId )
{ Window::SetHelpId( rId ); }
diff --git a/include/vcl/accel.hxx b/include/vcl/accel.hxx
index 79136b1..491634f 100644
--- a/include/vcl/accel.hxx
+++ b/include/vcl/accel.hxx
@@ -40,7 +40,7 @@ class VCL_DLLPUBLIC Accelerator : public Resource
private:
ImplAccelData* mpData;
- XubString maHelpStr;
+ OUString maHelpStr;
Link maActivateHdl;
Link maDeactivateHdl;
Link maSelectHdl;
@@ -87,8 +87,8 @@ public:
Accelerator* GetAccel( sal_uInt16 nItemId ) const;
- void SetHelpText( const XubString& rHelpText ) { maHelpStr = rHelpText; }
- const XubString& GetHelpText() const { return maHelpStr; }
+ void SetHelpText( const OUString& rHelpText ) { maHelpStr = rHelpText; }
+ const OUString& GetHelpText() const { return maHelpStr; }
void SetActivateHdl( const Link& rLink ) { maActivateHdl = rLink; }
const Link& GetActivateHdl() const { return maActivateHdl; }
diff --git a/include/vcl/cmdevt.hxx b/include/vcl/cmdevt.hxx
index 75714f2..45ac7a8 100644
--- a/include/vcl/cmdevt.hxx
+++ b/include/vcl/cmdevt.hxx
@@ -45,7 +45,7 @@
class VCL_DLLPUBLIC CommandExtTextInputData
{
private:
- XubString maText;
+ OUString maText;
sal_uInt16* mpTextAttr;
xub_StrLen mnCursorPos;
xub_StrLen mnDeltaStart;
@@ -54,7 +54,7 @@ private:
sal_Bool mbOnlyCursor;
public:
- CommandExtTextInputData( const XubString& rText,
+ CommandExtTextInputData( const OUString& rText,
const sal_uInt16* pTextAttr,
xub_StrLen nCursorPos,
sal_uInt16 nCursorFlags,
@@ -64,7 +64,7 @@ public:
CommandExtTextInputData( const CommandExtTextInputData& rData );
~CommandExtTextInputData();
- const XubString& GetText() const { return maText; }
+ const OUString& GetText() const { return maText; }
const sal_uInt16* GetTextAttr() const { return mpTextAttr; }
sal_uInt16 GetCharTextAttr( sal_uInt16 nIndex ) const;
xub_StrLen GetCursorPos() const { return mnCursorPos; }
@@ -78,7 +78,7 @@ public:
inline sal_uInt16 CommandExtTextInputData::GetCharTextAttr( sal_uInt16 nIndex ) const
{
- if ( mpTextAttr && (nIndex < maText.Len()) )
+ if ( mpTextAttr && (nIndex < maText.getLength()) )
return mpTextAttr[nIndex];
else
return 0;
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 9cd5459..132c132 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -114,21 +114,21 @@ public:
void EnableDDAutoWidth( sal_Bool b );
- virtual sal_uInt16 InsertEntry( const XubString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual sal_uInt16 InsertEntry( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND );
virtual sal_uInt16 InsertEntry( const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
- virtual sal_uInt16 InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
- virtual void RemoveEntry( const XubString& rStr );
+ virtual sal_uInt16 InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND );
+ virtual void RemoveEntry( const OUString& rStr );
virtual void RemoveEntry( sal_uInt16 nPos );
virtual void Clear();
- virtual sal_uInt16 GetEntryPos( const XubString& rStr ) const;
+ virtual sal_uInt16 GetEntryPos( const OUString& rStr ) const;
virtual sal_uInt16 GetEntryPos( const void* pData ) const;
Image GetEntryImage( sal_uInt16 nPos ) const;
- virtual XubString GetEntry( sal_uInt16 nPos ) const;
+ virtual OUString GetEntry( sal_uInt16 nPos ) const;
virtual sal_uInt16 GetEntryCount() const;
- virtual void SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True );
+ virtual void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True );
virtual void SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True );
virtual sal_uInt16 GetSelectEntryCount() const;
diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx
index f05ee5d..5cc1af4 100644
--- a/include/vcl/menu.hxx
+++ b/include/vcl/menu.hxx
@@ -164,7 +164,7 @@ protected:
SAL_DLLPRIVATE void ImplFillLayoutData() const;
SAL_DLLPRIVATE SalMenu* ImplGetSalMenu() { return mpSalMenu; }
SAL_DLLPRIVATE void ImplSetSalMenu( SalMenu *pMenu );
- SAL_DLLPRIVATE const XubString& ImplGetHelpText( sal_uInt16 nItemId ) const;
+ SAL_DLLPRIVATE OUString ImplGetHelpText( sal_uInt16 nItemId ) const;
// returns native check and option menu symbol height in rCheckHeight and rRadioHeight
// return value is maximum width and height of checkboxes and radiobuttons
@@ -194,7 +194,7 @@ public:
virtual void Select();
virtual void RequestHelp( const HelpEvent& rHEvt );
- void InsertItem( sal_uInt16 nItemId, const XubString& rStr,
+ void InsertItem( sal_uInt16 nItemId, const OUString& rStr,
MenuItemBits nItemBits = 0,
const OString &rIdent = OString(),
sal_uInt16 nPos = MENU_APPEND );
@@ -203,7 +203,7 @@ public:
const OString &rIdent = OString(),
sal_uInt16 nPos = MENU_APPEND );
void InsertItem( sal_uInt16 nItemId,
- const XubString& rString, const Image& rImage,
+ const OUString& rString, const Image& rImage,
MenuItemBits nItemBits = 0,
const OString &rIdent = OString(),
sal_uInt16 nPos = MENU_APPEND );
@@ -267,8 +267,8 @@ public:
void RemoveDisabledEntries( sal_Bool bCheckPopups = sal_True, sal_Bool bRemoveEmptyPopups = sal_False );
sal_Bool HasValidEntries( sal_Bool bCheckPopups = sal_True );
- void SetItemText( sal_uInt16 nItemId, const XubString& rStr );
- XubString GetItemText( sal_uInt16 nItemId ) const;
+ void SetItemText( sal_uInt16 nItemId, const OUString& rStr );
+ OUString GetItemText( sal_uInt16 nItemId ) const;
void SetItemImage( sal_uInt16 nItemId, const Image& rImage );
Image GetItemImage( sal_uInt16 nItemId ) const;
@@ -278,19 +278,19 @@ public:
sal_Bool GetItemImageMirrorMode( sal_uInt16 ) const;
void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand );
- const OUString GetItemCommand( sal_uInt16 nItemId ) const;
+ OUString GetItemCommand( sal_uInt16 nItemId ) const;
- void SetHelpText( sal_uInt16 nItemId, const XubString& rString );
- const XubString& GetHelpText( sal_uInt16 nItemId ) const;
+ void SetHelpText( sal_uInt16 nItemId, const OUString& rString );
+ OUString GetHelpText( sal_uInt16 nItemId ) const;
- void SetTipHelpText( sal_uInt16 nItemId, const XubString& rString );
- const XubString& GetTipHelpText( sal_uInt16 nItemId ) const;
+ void SetTipHelpText( sal_uInt16 nItemId, const OUString& rString );
+ OUString GetTipHelpText( sal_uInt16 nItemId ) const;
- void SetHelpCommand( sal_uInt16 nItemId, const XubString& rString );
- const XubString& GetHelpCommand( sal_uInt16 nItemId ) const;
+ void SetHelpCommand( sal_uInt16 nItemId, const OUString& rString );
+ OUString GetHelpCommand( sal_uInt16 nItemId ) const;
void SetHelpId( sal_uInt16 nItemId, const OString& rHelpId );
- OString GetHelpId( sal_uInt16 nItemId ) const;
+ OString GetHelpId( sal_uInt16 nItemId ) const;
void SetActivateHdl( const Link& rLink ) { aActivateHdl = rLink; }
const Link& GetActivateHdl() const { return aActivateHdl; }
@@ -343,8 +343,8 @@ public:
Window* GetWindow() const { return pWindow; }
- void SetAccessibleName( sal_uInt16 nItemId, const XubString& rStr );
- XubString GetAccessibleName( sal_uInt16 nItemId ) const;
+ void SetAccessibleName( sal_uInt16 nItemId, const OUString& rStr );
+ OUString GetAccessibleName( sal_uInt16 nItemId ) const;
// returns whether the item a position nItemPos is highlighted or not.
bool IsHighlighted( sal_uInt16 nItemPos ) const;
diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx
index 85b5a7b..d2146d3 100644
--- a/include/vcl/texteng.hxx
+++ b/include/vcl/texteng.hxx
@@ -144,7 +144,7 @@ protected:
void ImpRemoveText();
TextPaM ImpDeleteText( const TextSelection& rSel );
TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, sal_Bool bOverwrite = sal_False );
- TextPaM ImpInsertText( const TextSelection& rSel, const String& rText );
+ TextPaM ImpInsertText( const TextSelection& rSel, const OUString& rText );
TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, sal_Bool bKeepEndingAttribs = sal_True );
TextPaM ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs = sal_True );
void ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndoAction* pCurUndo = 0 );
diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx
index bc4fa01..a214f39 100644
--- a/include/vcl/vclevent.hxx
+++ b/include/vcl/vclevent.hxx
@@ -62,7 +62,7 @@ namespace com { namespace sun { namespace star {
#define VCLEVENT_WINDOW_MOUSEMOVE 1015 // pData = MouseEvent*
#define VCLEVENT_WINDOW_MOUSEBUTTONDOWN 1016 // pData = MouseEvent*
#define VCLEVENT_WINDOW_MOUSEBUTTONUP 1017 // pData = MouseEvent*
-#define VCLEVENT_WINDOW_FRAMETITLECHANGED 1018 // pData = XubString* = oldTitle
+#define VCLEVENT_WINDOW_FRAMETITLECHANGED 1018 // pData = OUString* = oldTitle
#define VCLEVENT_APPLICATION_DATACHANGED 1019 // pData = DataChangedEvent*
#define VCLEVENT_WINDOW_ENABLED 1020
#define VCLEVENT_WINDOW_DISABLED 1021
diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx
index 1bb7661..5bf769a 100644
--- a/padmin/source/padialog.cxx
+++ b/padmin/source/padialog.cxx
@@ -180,7 +180,7 @@ String PADialog::getSelectedDevice()
{
int nPos = m_aDevicesLB.GetSelectEntryPos();
int nLen = (int)(sal_IntPtr)m_aDevicesLB.GetEntryData( nPos );
- return m_aDevicesLB.GetEntry( nPos ).Copy( 0, nLen );
+ return m_aDevicesLB.GetEntry( nPos ).copy( 0, nLen );
}
IMPL_LINK( PADialog, DelPressedHdl, ListBox*, pBox )
@@ -592,10 +592,10 @@ void PADialog::AddDevice()
void PADialog::RemDevice()
{
- String aPrinter( getSelectedDevice() );
- String aDefPrinter( m_rPIManager.getDefaultPrinter() );
+ OUString aPrinter( getSelectedDevice() );
+ OUString aDefPrinter( m_rPIManager.getDefaultPrinter() );
// do not remove the default printer
- if( aPrinter.Equals( aDefPrinter ) )
+ if( aPrinter.equals( aDefPrinter ) )
return;
if( ! m_rPIManager.removePrinter( aPrinter ) )
@@ -609,9 +609,9 @@ void PADialog::RemDevice()
m_aPrinters.remove( aPrinter );
m_aDevicesLB.RemoveEntry( m_aDevicesLB.GetSelectEntryPos() );
- for( int i=0; i < m_aDevicesLB.GetEntryCount(); i++ )
+ for (int i=0; i < m_aDevicesLB.GetEntryCount(); ++i)
{
- if( m_aDevicesLB.GetEntry( i ).CompareTo( aDefPrinter, aDefPrinter.Len() ) == COMPARE_EQUAL )
+ if (m_aDevicesLB.GetEntry(i).equals(aDefPrinter))
{
m_aDevicesLB.SelectEntryPos( i, sal_True );
UpdateText();
@@ -627,9 +627,9 @@ void PADialog::RemDevice()
void PADialog::ConfigureDevice()
{
- String aPrinter( getSelectedDevice() );
+ OUString aPrinter(getSelectedDevice());
- if( ! aPrinter.Len() )
+ if (aPrinter.isEmpty())
return;
PrinterInfo aInfo( m_rPIManager.getPrinterInfo( aPrinter ) );
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 6d4a100..0dea0c5 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -1688,23 +1688,23 @@ void Calendar::RequestHelp( const HelpEvent& rHEvt )
maCalendarWrapper.setGregorianDateTime( aDate);
sal_uInt16 nWeek = (sal_uInt16) maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
sal_uInt16 nMonth = aDate.GetMonth();
- XubString aStr( maDayText );
- aStr.AppendAscii( ": " );
- aStr.Append( OUString::number( aDate.GetDayOfYear() ) );
- aStr.AppendAscii( " / " );
- aStr.Append( maWeekText );
- aStr.AppendAscii( ": " );
- aStr.Append( OUString::number( nWeek ) );
+ OUString aStr( maDayText );
+ aStr += ": ";
+ aStr += OUString::number(aDate.GetDayOfYear());
+ aStr += " / ";
+ aStr += maWeekText;
+ aStr += ": ";
+ aStr += OUString::number(nWeek);
// Evt. noch Jahr hinzufuegen, wenn es nicht das gleiche ist
if ( (nMonth == 12) && (nWeek == 1) )
{
- aStr.AppendAscii( ", " );
- aStr.Append( OUString::number( aDate.GetYear()+1 ) );
+ aStr += ", ";
+ aStr += OUString::number(aDate.GetYear()+1);
}
else if ( (nMonth == 1) && (nWeek > 50) )
{
- aStr.AppendAscii( ", " );
- aStr.Append( OUString::number( aDate.GetYear()-1 ) );
+ aStr += ", ";
+ aStr += OUString::number(aDate.GetYear()-1);
}
Help::ShowQuickHelp( this, aDateRect, aStr );
return;
@@ -2253,7 +2253,7 @@ PushButton* ImplCFieldFloatWin::EnableTodayBtn( sal_Bool bEnable )
if ( !mpTodayBtn )
{
mpTodayBtn = new PushButton( this, WB_NOPOINTERFOCUS );
- XubString aTodayText(SVT_RESSTR(STR_SVT_CALENDAR_TODAY));
+ OUString aTodayText(SVT_RESSTR(STR_SVT_CALENDAR_TODAY));
mpTodayBtn->SetText( aTodayText );
Size aSize;
aSize.Width() = mpTodayBtn->GetCtrlTextWidth( mpTodayBtn->GetText() );
@@ -2285,7 +2285,7 @@ PushButton* ImplCFieldFloatWin::EnableNoneBtn( sal_Bool bEnable )
if ( !mpNoneBtn )
{
mpNoneBtn = new PushButton( this, WB_NOPOINTERFOCUS );
- XubString aNoneText(SVT_RESSTR(STR_SVT_CALENDAR_NONE));
+ OUString aNoneText(SVT_RESSTR(STR_SVT_CALENDAR_NONE));
mpNoneBtn->SetText( aNoneText );
Size aSize;
aSize.Width() = mpNoneBtn->GetCtrlTextWidth( mpNoneBtn->GetText() );
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 5cfd358..c90ae7e 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -136,7 +136,7 @@ ColorListBox::~ColorListBox()
// -----------------------------------------------------------------------
-sal_uInt16 ColorListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
+sal_uInt16 ColorListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR )
@@ -159,7 +159,7 @@ sal_uInt16 ColorListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
// -----------------------------------------------------------------------
-sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const XubString& rStr,
+sal_uInt16 ColorListBox::InsertEntry( const Color& rColor, const OUString& rStr,
sal_uInt16 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
@@ -529,7 +529,7 @@ sal_uInt16 LineListBox::GetSelectEntryStyle( sal_uInt16 nSelIndex ) const
sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
{
- if ( m_sNone.Len( ) > 0 )
+ if (!m_sNone.isEmpty())
nPos--;
nStyle = GetEntryStyle( nPos );
}
@@ -808,7 +808,7 @@ LineListBox::~LineListBox()
sal_uInt16 LineListBox::GetStylePos( sal_uInt16 nListPos, long nWidth )
{
sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND;
- if ( m_sNone.Len( ) > 0 )
+ if (!m_sNone.isEmpty())
nListPos--;
sal_uInt16 i = 0;
@@ -839,7 +839,7 @@ void LineListBox::SelectEntry( sal_uInt16 nStyle, sal_Bool bSelect )
// -----------------------------------------------------------------------
-sal_uInt16 LineListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
+sal_uInt16 LineListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
{
nPos = ListBox::InsertEntry( rStr, nPos );
if ( nPos != LISTBOX_ERROR ) {
@@ -907,7 +907,7 @@ sal_uInt16 LineListBox::GetEntryPos( sal_uInt16 nStyle ) const
if ( GetEntryStyle( i ) == nStyle )
{
size_t nPos = i;
- if ( m_sNone.Len() > 0 )
+ if (!m_sNone.isEmpty())
nPos ++;
return (sal_uInt16)nPos;
}
@@ -954,7 +954,7 @@ void LineListBox::UpdateEntries( long nOldWidth )
ListBox::RemoveEntry( 0 );
// Add the new entries based on the defined width
- if ( m_sNone.Len( ) > 0 )
+ if (!m_sNone.isEmpty())
ListBox::InsertEntry( m_sNone, LISTBOX_APPEND );
sal_uInt16 n = 0;
@@ -1142,9 +1142,9 @@ void FontNameBox::ImplDestroyFontList()
void FontNameBox::Fill( const FontList* pList )
{
// store old text and clear box
- XubString aOldText = GetText();
- XubString rEntries = GetMRUEntries();
- sal_Bool bLoadFromFile = ! rEntries.Len();
+ OUString aOldText = GetText();
+ OUString rEntries = GetMRUEntries();
+ bool bLoadFromFile = rEntries.isEmpty();
Clear();
ImplDestroyFontList();
@@ -1176,7 +1176,7 @@ void FontNameBox::Fill( const FontList* pList )
ImplCalcUserItemSize();
// restore text
- if ( aOldText.Len() )
+ if (!aOldText.isEmpty())
SetText( aOldText );
}
@@ -1476,7 +1476,7 @@ void FontStyleBox::Modify()
{
CharClass aChrCls( ::comphelper::getProcessComponentContext(),
GetSettings().GetLanguageTag() );
- XubString aStr = GetText();
+ OUString aStr = GetText();
sal_uInt16 nEntryCount = GetEntryCount();
if ( GetEntryPos( aStr ) == COMBOBOX_ENTRY_NOTFOUND )
@@ -1484,7 +1484,7 @@ void FontStyleBox::Modify()
aStr = aChrCls.uppercase(aStr);
for ( sal_uInt16 i = 0; i < nEntryCount; i++ )
{
- XubString aEntryText = aChrCls.uppercase(GetEntry(i));
+ OUString aEntryText = aChrCls.uppercase(GetEntry(i));
if ( aStr == aEntryText )
{
@@ -1499,12 +1499,12 @@ void FontStyleBox::Modify()
// -------------------------------------------------------------------
-void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
+void FontStyleBox::Fill( const OUString& rName, const FontList* pList )
{
// note: this method must call ComboBox::SetText(),
// else aLastStyle will overwritten
// store prior selection position and clear box
- XubString aOldText = GetText();
+ OUString aOldText = GetText();
sal_uInt16 nPos = GetEntryPos( aOldText );
Clear();
@@ -1608,7 +1608,7 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
if ( bNormal || bItalic || bBold )
InsertEntry( pList->GetBoldItalicStr() );
}
- if ( aOldText.Len() )
+ if (!aOldText.isEmpty())
{
if ( GetEntryPos( aLastStyle ) != LISTBOX_ENTRY_NOTFOUND )
ComboBox::SetText( aLastStyle );
@@ -1628,7 +1628,7 @@ void FontStyleBox::Fill( const XubString& rName, const FontList* pList )
InsertEntry( pList->GetItalicStr() );
InsertEntry( pList->GetBoldStr() );
InsertEntry( pList->GetBoldItalicStr() );
- if ( aOldText.Len() )
+ if (!aOldText.isEmpty())
{
if ( nPos > GetEntryCount() )
ComboBox::SetText( GetEntry( 0 ) );
@@ -1711,7 +1711,7 @@ void FontSizeBox::Modify()
if ( bRelativeMode )
{
- XubString aStr = comphelper::string::stripStart(GetText(), ' ');
+ OUString aStr = comphelper::string::stripStart(GetText(), ' ');
sal_Bool bNewMode = bRelative;
sal_Bool bOldPtRelMode = bPtRelative;
@@ -1719,7 +1719,7 @@ void FontSizeBox::Modify()
if ( bRelative )
{
bPtRelative = sal_False;
- const sal_Unicode* pStr = aStr.GetBuffer();
+ const sal_Unicode* pStr = aStr.getStr();
while ( *pStr )
{
if ( ((*pStr < '0') || (*pStr > '9')) && (*pStr != '%') )
@@ -1739,13 +1739,13 @@ void FontSizeBox::Modify()
}
else
{
- if ( STRING_NOTFOUND != aStr.Search( '%' ) )
+ if ( -1 != aStr.indexOf('%') )
{
bNewMode = sal_True;
bPtRelative = sal_False;
}
- if ( '-' == aStr.GetChar( 0 ) || '+' == aStr.GetChar( 0 ) )
+ if ( '-' == aStr[0] || '+' == aStr[0] )
{
bNewMode = sal_True;
bPtRelative = sal_True;
@@ -1795,7 +1795,7 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList )
bStdSize = sal_False;
Selection aSelection = GetSelection();
- XubString aStr = GetText();
+ OUString aStr = GetText();
Clear();
sal_uInt16 nPos = 0;
@@ -1876,7 +1876,7 @@ void FontSizeBox::SetRelative( sal_Bool bNewRelative )
if ( bRelativeMode )
{
Selection aSelection = GetSelection();
- XubString aStr = comphelper::string::stripStart(GetText(), ' ');
+ OUString aStr = comphelper::string::stripStart(GetText(), ' ');
if ( bNewRelative )
{
diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index b4b158e..2facccf 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -34,11 +34,11 @@ public:
sal_uInt16 mnId;
HeaderBarItemBits mnBits;
long mnSize;
- OString maHelpId;
+ OString maHelpId;
Image maImage;
- XubString maOutText;
- XubString maText;
- XubString maHelpText;
+ OUString maOutText;
+ OUString maText;
+ OUString maHelpText;
};
// =======================================================================
@@ -404,7 +404,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
pItem->maOutText = pItem->maText;
Size aImageSize = pItem->maImage.GetSizePixel();
Size aTxtSize( pDev->GetTextWidth( pItem->maOutText ), 0 );
- if ( pItem->maOutText.Len() )
+ if (!pItem->maOutText.isEmpty())
aTxtSize.Height() = pDev->GetTextHeight();
long nArrowWidth = 0;
if ( nBits & (HIB_UPARROW | HIB_DOWNARROW) )
@@ -429,18 +429,19 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
if ( nTxtWidth > nMaxTxtWidth )
{
bLeftText = sal_True;
- // 3 == Len of "..."
- pItem->maOutText.AppendAscii( "..." );
+ OUStringBuffer aBuf(pItem->maOutText);
+ aBuf.append("...");
do
{
- pItem->maOutText.Erase( pItem->maOutText.Len()-3-1, 1 );
- nTxtWidth = pDev->GetTextWidth( pItem->maOutText );
+ aBuf.remove(aBuf.getLength()-3-1, 1);
+ nTxtWidth = pDev->GetTextWidth( aBuf.toString() );
}
- while ( (nTxtWidth > nMaxTxtWidth) && (pItem->maOutText.Len() > 3) );
- if ( pItem->maOutText.Len() == 3 )
+ while ( (nTxtWidth > nMaxTxtWidth) && (aBuf.getLength() > 3) );
+ pItem->maOutText = aBuf.makeStringAndClear();
+ if ( pItem->maOutText.getLength() == 3 )
{
nTxtWidth = 0;
- pItem->maOutText.Erase();
+ pItem->maOutText = OUString();
}
}
@@ -481,7 +482,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
// TextPosition berechnen
long nTxtPosY = 0;
- if ( pItem->maOutText.Len() || (nArrowWidth && aTxtSize.Height()) )
+ if ( !pItem->maOutText.isEmpty() || (nArrowWidth && aTxtSize.Height()) )
{
if ( nBits & HIB_TOP )
{
@@ -503,7 +504,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
}
// Text ausgebeben
- if ( pItem->maOutText.Len() )
+ if (!pItem->maOutText.isEmpty())
{
if( aSelectionTextColor != Color( COL_TRANSPARENT ) )
{
@@ -576,7 +577,7 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev,
nArrowX -= nArrowWidth;
else
nArrowX += nTxtWidth+HEADERBAR_ARROWOFF;
- if ( !(nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && !pItem->maText.Len() )
+ if ( !(nBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && pItem->maText.isEmpty() )
{
if ( nBits & HIB_RIGHT )
nArrowX -= aImageSize.Width();
@@ -1127,8 +1128,8 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
aItemRect.Right() = aPt.X();
aItemRect.Bottom() = aPt.Y();
- XubString aStr = GetHelpText( nItemId );
- if ( !aStr.Len() || !(rHEvt.GetMode() & HELPMODE_BALLOON) )
+ OUString aStr = GetHelpText( nItemId );
+ if ( aStr.isEmpty() || !(rHEvt.GetMode() & HELPMODE_BALLOON) )
{
ImplHeadItem* pItem = (*mpItemList)[ GetItemPos( nItemId ) ];
// Wir zeigen die Quick-Hilfe nur an, wenn Text nicht
@@ -1136,11 +1137,11 @@ void HeaderBar::RequestHelp( const HelpEvent& rHEvt )
// an, wenn das Item keinen Text besitzt
if ( pItem->maOutText != pItem->maText )
aStr = pItem->maText;
- else if ( pItem->maText.Len() )
- aStr.Erase();
+ else if (!pItem->maText.isEmpty())
+ aStr = OUString();
}
- if ( aStr.Len() )
+ if (!aStr.isEmpty())
{
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
@@ -1251,7 +1252,7 @@ void HeaderBar::DoubleClick()
// -----------------------------------------------------------------------
-void HeaderBar::InsertItem( sal_uInt16 nItemId, const XubString& rText,
+void HeaderBar::InsertItem( sal_uInt16 nItemId, const OUString& rText,
long nSize, HeaderBarItemBits nBits, sal_uInt16 nPos )
{
DBG_ASSERT( nItemId, "HeaderBar::InsertItem(): ItemId == 0" );
@@ -1447,7 +1448,7 @@ HeaderBarItemBits HeaderBar::GetItemBits( sal_uInt16 nItemId ) const
// -----------------------------------------------------------------------
-void HeaderBar::SetItemText( sal_uInt16 nItemId, const XubString& rText )
+void HeaderBar::SetItemText( sal_uInt16 nItemId, const OUString& rText )
{
sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
@@ -1459,24 +1460,23 @@ void HeaderBar::SetItemText( sal_uInt16 nItemId, const XubString& rText )
// -----------------------------------------------------------------------
-XubString HeaderBar::GetItemText( sal_uInt16 nItemId ) const
+OUString HeaderBar::GetItemText( sal_uInt16 nItemId ) const
{
sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
return (*mpItemList)[ nPos ]->maText;
- else
- return String();
+ return OUString();
}
// -----------------------------------------------------------------------
-XubString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
+OUString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
{
sal_uInt16 nPos = GetItemPos( nItemId );
if ( nPos != HEADERBAR_ITEM_NOTFOUND )
{
ImplHeadItem* pItem = (*mpItemList)[ nPos ];
- if ( !pItem->maHelpText.Len() && !pItem->maHelpId.isEmpty() )
+ if ( pItem->maHelpText.isEmpty() && !pItem->maHelpId.isEmpty() )
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
@@ -1485,8 +1485,8 @@ XubString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
return pItem->maHelpText;
}
- else
- return XubString();
+
+ return OUString();
}
// -----------------------------------------------------------------------
@@ -1512,7 +1512,7 @@ Size HeaderBar::CalcWindowSizePixel() const
ImplHeadItem* pItem = (*mpItemList)[ i ];
// Image-Groessen beruecksichtigen
long nImageHeight = pItem->maImage.GetSizePixel().Height();
- if ( !(pItem->mnBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && pItem->maText.Len() )
+ if ( !(pItem->mnBits & (HIB_LEFTIMAGE | HIB_RIGHTIMAGE)) && !pItem->maText.isEmpty() )
nImageHeight += aSize.Height();
if ( nImageHeight > nMaxImageSize )
nMaxImageSize = nImageHeight;
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 2e63b7d..216b95a3 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -2479,7 +2479,7 @@ OUString TabBar::GetPageText( sal_uInt16 nPageId ) const
// -----------------------------------------------------------------------
-XubString TabBar::GetHelpText( sal_uInt16 nPageId ) const
+OUString TabBar::GetHelpText( sal_uInt16 nPageId ) const
{
sal_uInt16 nPos = GetPagePos( nPageId );
if ( nPos != PAGE_NOT_FOUND )
diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx
index 5a39529..e18fc08 100644
--- a/svtools/source/uno/contextmenuhelper.cxx
+++ b/svtools/source/uno/contextmenuhelper.cxx
@@ -588,7 +588,7 @@ ContextMenuHelper::completeMenuProperties(
else
pMenu->SetItemImage( nId, Image() );
- if ( pMenu->GetItemText( nId ).Len() == 0 )
+ if (!pMenu->GetItemText(nId).isEmpty())
{
OUString aLabel( getLabelFromCommandURL( aCmdURL ));
pMenu->SetItemText( nId, aLabel );
diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx
index 8c667c1..4005c93 100644
--- a/svx/source/gallery2/galbrws1.hxx
+++ b/svx/source/gallery2/galbrws1.hxx
@@ -133,7 +133,7 @@ public:
void SelectTheme( const String& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); }
void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); }
- String GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetEntry( mpThemes->GetSelectEntryPos() ) : String(); }
+ OUString GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetEntry( mpThemes->GetSelectEntryPos() ) : OUString(); }
void ShowContextMenu();
sal_Bool KeyInput( const KeyEvent& rKEvt, Window* pWindow );
diff --git a/sw/source/core/doc/extinput.cxx b/sw/source/core/doc/extinput.cxx
index 04bc95c..3879776 100644
--- a/sw/source/core/doc/extinput.cxx
+++ b/sw/source/core/doc/extinput.cxx
@@ -194,7 +194,7 @@ void SwExtTextInput::SetInputData( const CommandExtTextInputData& rData )
if( rData.GetTextAttr() )
{
const sal_uInt16 *pAttrs = rData.GetTextAttr();
- aAttrs.insert( aAttrs.begin(), pAttrs, pAttrs + rData.GetText().Len() );
+ aAttrs.insert( aAttrs.begin(), pAttrs, pAttrs + rData.GetText().getLength() );
}
}
}
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index ffd256a..fe5f8b3 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2227,8 +2227,8 @@ void Edit::Command( const CommandEvent& rCEvt )
maText.insert( mpIMEInfos->nPos, pData->GetText() );
if ( mpIMEInfos->bWasCursorOverwrite )
{
- sal_uInt16 nOldIMETextLen = mpIMEInfos->nLen;
- sal_uInt16 nNewIMETextLen = pData->GetText().Len();
+ sal_Int32 nOldIMETextLen = mpIMEInfos->nLen;
+ sal_Int32 nNewIMETextLen = pData->GetText().getLength();
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
( nNewIMETextLen < mpIMEInfos->aOldTextAfterStartPos.getLength() ) )
{
@@ -2250,7 +2250,7 @@ void Edit::Command( const CommandEvent& rCEvt )
if ( pData->GetTextAttr() )
{
- mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().Len() );
+ mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().getLength() );
mpIMEInfos->bCursor = pData->IsCursorVisible();
}
else
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 5b345d6..0e97fec 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -127,7 +127,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
long nTop;
long nTextOff;
const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
- XubString aText( GetText() );
+ OUString aText( GetText() );
Rectangle aRect( rPos, rSize );
sal_uInt16 nTextStyle = TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_ENDELLIPSIS | TEXT_DRAW_MNEMONIC;
@@ -153,7 +153,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
nDrawFlags |= WINDOW_DRAW_MONO;
}
- if ( !aText.Len() )
+ if (aText.isEmpty())
{
nTop = rPos.Y();
nTextOff = 0;
@@ -175,7 +175,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
else
pDev->SetLineColor( rStyleSettings.GetShadowColor() );
- if ( !aText.Len() )
+ if (aText.isEmpty())
pDev->DrawLine( Point( rPos.X(), nTop ), Point( rPos.X()+rSize.Width()-2, nTop ) );
else
{
@@ -193,7 +193,7 @@ void GroupBox::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags,
if ( !bIsPrinter && !(nDrawFlags & WINDOW_DRAW_MONO) )
{
pDev->SetLineColor( rStyleSettings.GetLightColor() );
- if ( !aText.Len() )
+ if (aText.isEmpty())
pDev->DrawLine( Point( rPos.X()+1, nTop+1 ), Point( rPos.X()+rSize.Width()-3, nTop+1 ) );
else
{
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index f72b2a2..25d9914 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -431,11 +431,11 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sa
if ( IsDropDownBox() )
{
- XubString aText = GetSelectEntry();
- long nTextHeight = pDev->GetTextHeight();
- long nTextWidth = pDev->GetTextWidth( aText );
- long nOffX = 3*nOnePixel;
- long nOffY = (aSize.Height()-nTextHeight) / 2;
+ OUString aText = GetSelectEntry();
+ long nTextHeight = pDev->GetTextHeight();
+ long nTextWidth = pDev->GetTextWidth( aText );
+ long nOffX = 3*nOnePixel;
+ long nOffY = (aSize.Height()-nTextHeight) / 2;
// Clipping?
if ( (nOffY < 0) ||
@@ -1012,7 +1012,7 @@ void ListBox::SetNoSelection()
}
-sal_uInt16 ListBox::InsertEntry( const XubString& rStr, sal_uInt16 nPos )
+sal_uInt16 ListBox::InsertEntry( const OUString& rStr, sal_uInt16 nPos )
{
sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr );
nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
@@ -1030,7 +1030,7 @@ sal_uInt16 ListBox::InsertEntry( const Image& rImage, sal_uInt16 nPos )
}
-sal_uInt16 ListBox::InsertEntry( const XubString& rStr, const Image& rImage, sal_uInt16 nPos )
+sal_uInt16 ListBox::InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos )
{
sal_uInt16 nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage );
nRealPos = sal::static_int_cast<sal_uInt16>(nRealPos - mpImplLB->GetEntryList()->GetMRUCount());
@@ -1039,7 +1039,7 @@ sal_uInt16 ListBox::InsertEntry( const XubString& rStr, const Image& rImage, sal
}
-void ListBox::RemoveEntry( const XubString& rStr )
+void ListBox::RemoveEntry( const OUString& rStr )
{
RemoveEntry( GetEntryPos( rStr ) );
}
@@ -1060,7 +1060,7 @@ Image ListBox::GetEntryImage( sal_uInt16 nPos ) const
}
-sal_uInt16 ListBox::GetEntryPos( const XubString& rStr ) const
+sal_uInt16 ListBox::GetEntryPos( const OUString& rStr ) const
{
sal_uInt16 nPos = mpImplLB->GetEntryList()->FindEntry( rStr );
if ( nPos != LISTBOX_ENTRY_NOTFOUND )
@@ -1078,7 +1078,7 @@ sal_uInt16 ListBox::GetEntryPos( const void* pData ) const
}
-XubString ListBox::GetEntry( sal_uInt16 nPos ) const
+OUString ListBox::GetEntry( sal_uInt16 nPos ) const
{
return mpImplLB->GetEntryList()->GetEntryText( nPos + mpImplLB->GetEntryList()->GetMRUCount() );
}
@@ -1127,7 +1127,7 @@ sal_Bool ListBox::IsEntryPosSelected( sal_uInt16 nPos ) const
}
-void ListBox::SelectEntry( const XubString& rStr, sal_Bool bSelect )
+void ListBox::SelectEntry( const OUString& rStr, sal_Bool bSelect )
{
SelectEntryPos( GetEntryPos( rStr ), bSelect );
}
diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx
index 5ef6cf1..3a2d349 100644
--- a/vcl/source/edit/textdoc.cxx
+++ b/vcl/source/edit/textdoc.cxx
@@ -458,7 +458,7 @@ void TextDoc::DestroyTextNodes()
maTextNodes.clear();
}
-String TextDoc::GetText( const sal_Unicode* pSep ) const
+OUString TextDoc::GetText( const sal_Unicode* pSep ) const
{
sal_uLong nLen = GetTextLen( pSep );
sal_uLong nNodes = maTextNodes.Count();
@@ -483,9 +483,10 @@ String TextDoc::GetText( const sal_Unicode* pSep ) const
return aASCIIText;
}
-XubString TextDoc::GetText( sal_uLong nPara ) const
+OUString TextDoc::GetText( sal_uLong nPara ) const
{
- XubString aText;
+ OUString aText;
+
TextNode* pNode = ( nPara < maTextNodes.Count() ) ? maTextNodes.GetObject( nPara ) : 0;
if ( pNode )
aText = pNode->GetText();
@@ -541,15 +542,15 @@ TextPaM TextDoc::InsertText( const TextPaM& rPaM, sal_Unicode c )
return aPaM;
}
-TextPaM TextDoc::InsertText( const TextPaM& rPaM, const XubString& rStr )
+TextPaM TextDoc::InsertText( const TextPaM& rPaM, const OUString& rStr )
{
- DBG_ASSERT( rStr.Search( 0x0A ) == STRING_NOTFOUND, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
- DBG_ASSERT( rStr.Search( 0x0D ) == STRING_NOTFOUND, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+ DBG_ASSERT( rStr.indexOf( 0x0A ) == -1, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
+ DBG_ASSERT( rStr.indexOf( 0x0D ) == -1, "TextDoc::InsertText: Zeilentrenner in Absatz nicht erlaubt!" );
TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() );
pNode->InsertText( rPaM.GetIndex(), rStr );
- TextPaM aPaM( rPaM.GetPara(), rPaM.GetIndex()+rStr.Len() );
+ TextPaM aPaM( rPaM.GetPara(), rPaM.GetIndex()+rStr.getLength() );
return aPaM;
}
diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx
index 85d94de..bced05d 100644
--- a/vcl/source/edit/textdoc.hxx
+++ b/vcl/source/edit/textdoc.hxx
@@ -116,14 +116,14 @@ public:
TextPaM RemoveChars( const TextPaM& rPaM, sal_uInt16 nChars );
TextPaM InsertText( const TextPaM& rPaM, sal_Unicode c );
- TextPaM InsertText( const TextPaM& rPaM, const String& rStr );
+ TextPaM InsertText( const TextPaM& rPaM, const OUString& rStr );
TextPaM InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs );
TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight );
sal_uLong GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const;
- String GetText( const sal_Unicode* pSep ) const;
- String GetText( sal_uLong nPara ) const;
+ OUString GetText( const sal_Unicode* pSep ) const;
+ OUString GetText( sal_uLong nPara ) const;
void SetLeftMargin( sal_uInt16 n ) { mnLeftMargin = n; }
sal_uInt16 GetLeftMargin() const { return mnLeftMargin; }
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx
index 14c864f..4974957 100644
--- a/vcl/source/edit/texteng.cxx
+++ b/vcl/source/edit/texteng.cxx
@@ -492,7 +492,7 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndo
{
// attributes have to be saved for UNDO before RemoveChars!
TextNode* pNode = mpDoc->GetNodes().GetObject( rPaM.GetPara() );
- XubString aStr( pNode->GetText().Copy( rPaM.GetIndex(), nChars ) );
+ OUString aStr( pNode->GetText().Copy( rPaM.GetIndex(), nChars ) );
// check if attributes are being deleted or changed
sal_uInt16 nStart = rPaM.GetIndex();
@@ -707,7 +707,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
// the text that needs to be checked is only the one
// before the current cursor position
- OUString aOldText( mpDoc->GetText( aPaM.GetPara() ).Copy(0, nTmpPos) );
+ OUString aOldText( mpDoc->GetText( aPaM.GetPara() ).copy(0, nTmpPos) );
OUString aNewText( aOldText );
if (aCTLOptions.IsCTLSequenceCheckingTypeAndReplace())
{
@@ -770,7 +770,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel,
}
-TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString& rStr )
+TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const OUString& rStr )
{
UndoActionStart();
@@ -781,40 +781,35 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const XubString
else
aPaM = rCurSel.GetEnd();
- XubString aText(convertLineEnd(rStr, LINEEND_LF));
+ OUString aText(convertLineEnd(rStr, LINEEND_LF));
- sal_uInt16 nStart = 0;
- while ( nStart < aText.Len() )
+ sal_Int32 nStart = 0;
+ while ( nStart < aText.getLength() )
{
- sal_uInt16 nEnd = aText.Search( LINE_SEP, nStart );
- if ( nEnd == STRING_NOTFOUND )
- nEnd = aText.Len(); // do not dereference!
+ sal_Int32 nEnd = aText.indexOf( LINE_SEP, nStart );
+ if (nEnd == -1)
+ nEnd = aText.getLength(); // do not dereference!
// Start == End => empty line
if ( nEnd > nStart )
{
sal_uLong nL = aPaM.GetIndex();
nL += ( nEnd-nStart );
- if ( nL > STRING_MAXLEN )
- {
- sal_uInt16 nDiff = (sal_uInt16) (nL-STRING_MAXLEN);
- nEnd = nEnd - nDiff;
- }
- XubString aLine( aText, nStart, nEnd-nStart );
+ OUString aLine(aText.copy(nStart, nEnd-nStart));
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( new TextUndoInsertChars( this, aPaM, aLine ) );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( aPaM.GetPara() );
- pPortion->MarkInvalid( aPaM.GetIndex(), aLine.Len() );
- if ( aLine.Search( '\t' ) != STRING_NOTFOUND )
+ pPortion->MarkInvalid( aPaM.GetIndex(), aLine.getLength() );
+ if (aLine.indexOf( '\t' ) != -1)
pPortion->SetNotSimpleInvalid();
aPaM = mpDoc->InsertText( aPaM, aLine );
- ImpCharsInserted( aPaM.GetPara(), aPaM.GetIndex()-aLine.Len(), aLine.Len() );
+ ImpCharsInserted( aPaM.GetPara(), aPaM.GetIndex()-aLine.getLength(), aLine.getLength() );
}
- if ( nEnd < aText.Len() )
+ if ( nEnd < aText.getLength() )
aPaM = ImpInsertParaBreak( aPaM );
nStart = nEnd+1;
@@ -1352,7 +1347,7 @@ void TextEngine::UndoActionStart( sal_uInt16 nId )
if ( IsUndoEnabled() && !IsInUndo() )
{
String aComment;
- GetUndoManager().EnterListAction( aComment, XubString(), nId );
+ GetUndoManager().EnterListAction( aComment, OUString(), nId );
}
}
diff --git a/vcl/source/edit/textund2.hxx b/vcl/source/edit/textund2.hxx
index e813805..0678e59 100644
--- a/vcl/source/edit/textund2.hxx
+++ b/vcl/source/edit/textund2.hxx
@@ -82,11 +82,11 @@ class TextUndoInsertChars : public TextUndo
{
private:
TextPaM maTextPaM;
- String maText;
+ OUString maText;
public:
TYPEINFO();
- TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
+ TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
virtual void Undo();
virtual void Redo();
@@ -101,11 +101,11 @@ class TextUndoRemoveChars : public TextUndo
{
private:
TextPaM maTextPaM;
- String maText;
+ OUString maText;
public:
TYPEINFO();
- TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const String& rStr );
+ TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr );
virtual void Undo();
virtual void Redo();
diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx
index 324306c..0e218af 100644
--- a/vcl/source/edit/textundo.cxx
+++ b/vcl/source/edit/textundo.cxx
@@ -224,7 +224,7 @@ void TextUndoConnectParas::Redo()
OUString TextUndoConnectParas::GetComment () const
{
- return ResId(STR_TEXTUNDO_CONNECTPARAS, *ImplGetResMgr());
+ return ResId(STR_TEXTUNDO_CONNECTPARAS, *ImplGetResMgr()).toString();
}
TextUndoSplitPara::TextUndoSplitPara( TextEngine* pTextEngine, sal_uLong nPara, sal_uInt16 nPos )
@@ -255,7 +255,7 @@ OUString TextUndoSplitPara::GetComment () const
return ResId(STR_TEXTUNDO_SPLITPARA, *ImplGetResMgr());
}
-TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const XubString& rStr )
+TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr )
: TextUndo( pTextEngine ),
maTextPaM( rTextPaM ), maText( rStr )
{
@@ -264,7 +264,7 @@ TextUndoInsertChars::TextUndoInsertChars( TextEngine* pTextEngine, const TextPaM
void TextUndoInsertChars::Undo()
{
TextSelection aSel( maTextPaM, maTextPaM );
- aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.Len();
+ aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.getLength();
TextPaM aPaM = GetTextEngine()->ImpDeleteText( aSel );
SetSelection( aPaM );
}
@@ -274,7 +274,7 @@ void TextUndoInsertChars::Redo()
TextSelection aSel( maTextPaM, maTextPaM );
GetTextEngine()->ImpInsertText( aSel, maText );
TextPaM aNewPaM( maTextPaM );
- aNewPaM.GetIndex() = aNewPaM.GetIndex() + maText.Len();
+ aNewPaM.GetIndex() = aNewPaM.GetIndex() + maText.getLength();
SetSelection( TextSelection( aSel.GetStart(), aNewPaM ) );
}
@@ -288,7 +288,7 @@ bool TextUndoInsertChars::Merge( SfxUndoAction* pNextAction )
if ( maTextPaM.GetPara() != pNext->maTextPaM.GetPara() )
return false;
- if ( ( maTextPaM.GetIndex() + maText.Len() ) == pNext->maTextPaM.GetIndex() )
+ if ( ( maTextPaM.GetIndex() + maText.getLength() ) == pNext->maTextPaM.GetIndex() )
{
maText += pNext->maText;
return true;
@@ -301,10 +301,10 @@ OUString TextUndoInsertChars::GetComment () const
// multiple lines?
OUString sText(maText);
Shorten(sText);
- return OUString(ResId(STR_TEXTUNDO_INSERTCHARS, *ImplGetResMgr())).replaceAll("$1", sText);
+ return ResId(STR_TEXTUNDO_INSERTCHARS, *ImplGetResMgr()).toString().replaceAll("$1", sText);
}
-TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const XubString& rStr )
+TextUndoRemoveChars::TextUndoRemoveChars( TextEngine* pTextEngine, const TextPaM& rTextPaM, const OUString& rStr )
: TextUndo( pTextEngine ),
maTextPaM( rTextPaM ), maText( rStr )
{
@@ -314,14 +314,14 @@ void TextUndoRemoveChars::Undo()
{
TextSelection aSel( maTextPaM, maTextPaM );
GetTextEngine()->ImpInsertText( aSel, maText );
- aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.Len();
+ aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.getLength();
SetSelection( aSel );
}
void TextUndoRemoveChars::Redo()
{
TextSelection aSel( maTextPaM, maTextPaM );
- aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.Len();
+ aSel.GetEnd().GetIndex() = aSel.GetEnd().GetIndex() + maText.getLength();
TextPaM aPaM = GetTextEngine()->ImpDeleteText( aSel );
SetSelection( aPaM );
}
diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 1c6df89..7a083b8 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -950,8 +950,8 @@ void TextView::Command( const CommandEvent& rCEvt )
if ( mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite )
{
- sal_uInt16 nOldIMETextLen = mpImpl->mpTextEngine->mpIMEInfos->nLen;
- sal_uInt16 nNewIMETextLen = pData->GetText().Len();
+ sal_Int32 nOldIMETextLen = mpImpl->mpTextEngine->mpIMEInfos->nLen;
+ sal_Int32 nNewIMETextLen = pData->GetText().getLength();
if ( ( nOldIMETextLen > nNewIMETextLen ) &&
( nNewIMETextLen < mpImpl->mpTextEngine->mpIMEInfos->aOldTextAfterStartPos.Len() ) )
@@ -981,7 +981,7 @@ void TextView::Command( const CommandEvent& rCEvt )
if ( pData->GetTextAttr() )
{
- mpImpl->mpTextEngine->mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().Len() );
+ mpImpl->mpTextEngine->mpIMEInfos->CopyAttribs( pData->GetTextAttr(), pData->GetText().getLength() );
mpImpl->mpTextEngine->mpIMEInfos->bCursor = pData->IsCursorVisible();
}
else
diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx
index 3cc021f..c47dd16 100644
--- a/vcl/source/edit/xtextedt.cxx
+++ b/vcl/source/edit/xtextedt.cxx
@@ -56,12 +56,12 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
sal_uInt16 nLevel = 1;
while ( nLevel && ( nPara < nParas ) )
{
- XubString aStr = GetText( nPara );
- while ( nCur < aStr.Len() )
+ OUString aStr = GetText( nPara );
+ while ( nCur < aStr.getLength() )
{
- if ( aStr.GetChar( nCur ) == nSC )
+ if ( aStr[nCur] == nSC )
nLevel++;
- else if ( aStr.GetChar( nCur ) == nEC )
+ else if ( aStr[nCur] == nEC )
{
nLevel--;
if ( !nLevel )
@@ -94,16 +94,16 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const
{
if ( GetTextLen( nPara ) )
{
- XubString aStr = GetText( nPara );
+ OUString aStr = GetText( nPara );
while ( nCur )
{
- if ( aStr.GetChar( nCur ) == nSC )
+ if ( aStr[nCur] == nSC )
{
nLevel--;
if ( !nLevel )
break; // while nCur...
}
- else if ( aStr.GetChar( nCur ) == nEC )
+ else if ( aStr[nCur] == nEC )
nLevel++;
nCur--;
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx
index e513f16..71fd319 100644
--- a/vcl/source/gdi/print2.cxx
+++ b/vcl/source/gdi/print2.cxx
@@ -318,9 +318,8 @@ static bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rO
case META_TEXT_ACTION:
{
const MetaTextAction& rTextAct = static_cast<const MetaTextAction&>(rAct);
- const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
-
- if( aString.Len() )
+ const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
+ if (!aString.isEmpty())
bRet = true;
}
break;
@@ -328,9 +327,8 @@ static bool ImplIsNotTransparent( const MetaAction& rAct, const OutputDevice& rO
case META_TEXTARRAY_ACTION:
{
const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
- const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
-
- if( aString.Len() )
+ const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
+ if (!aString.isEmpty())
bRet = true;
}
break;
@@ -537,9 +535,9 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
case META_TEXT_ACTION:
{
const MetaTextAction& rTextAct = static_cast<const MetaTextAction&>(rAct);
- const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
+ const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
- if( aString.Len() )
+ if (!aString.isEmpty())
{
const Point aPtLog( rTextAct.GetPoint() );
@@ -555,8 +553,8 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
case META_TEXTARRAY_ACTION:
{
const MetaTextArrayAction& rTextAct = static_cast<const MetaTextArrayAction&>(rAct);
- const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
- const long nLen = aString.Len();
+ const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
+ const sal_Int32 nLen = aString.getLength();
if( nLen )
{
@@ -581,8 +579,8 @@ static Rectangle ImplCalcActionBounds( const MetaAction& rAct, const OutputDevic
case META_STRETCHTEXT_ACTION:
{
const MetaStretchTextAction& rTextAct = static_cast<const MetaStretchTextAction&>(rAct);
- const XubString aString( rTextAct.GetText(), rTextAct.GetIndex(), rTextAct.GetLen() );
- const long nLen = aString.Len();
+ const OUString aString( rTextAct.GetText().copy(rTextAct.GetIndex(), rTextAct.GetLen()) );
+ const sal_Int32 nLen = aString.getLength();
// #i16195# Literate copy from TextArray action, the
// semantics for the ImplLayout call are copied from the
diff --git a/vcl/source/window/cmdevt.cxx b/vcl/source/window/cmdevt.cxx
index 1b1dd01..ef0591c 100644
--- a/vcl/source/window/cmdevt.cxx
+++ b/vcl/source/window/cmdevt.cxx
@@ -22,7 +22,7 @@
#include <vcl/cmdevt.hxx>
-CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
+CommandExtTextInputData::CommandExtTextInputData( const OUString& rText,
const sal_uInt16* pTextAttr,
xub_StrLen nCursorPos,
sal_uInt16 nCursorFlags,
@@ -31,10 +31,10 @@ CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
sal_Bool bOnlyCursor ) :
maText( rText )
{
- if ( pTextAttr && maText.Len() )
+ if ( pTextAttr && !maText.isEmpty() )
{
- mpTextAttr = new sal_uInt16[maText.Len()];
- memcpy( mpTextAttr, pTextAttr, maText.Len()*sizeof(sal_uInt16) );
+ mpTextAttr = new sal_uInt16[maText.getLength()];
+ memcpy( mpTextAttr, pTextAttr, maText.getLength()*sizeof(sal_uInt16) );
}
else
mpTextAttr = NULL;
@@ -50,10 +50,10 @@ CommandExtTextInputData::CommandExtTextInputData( const XubString& rText,
CommandExtTextInputData::CommandExtTextInputData( const CommandExtTextInputData& rData ) :
maText( rData.maText )
{
- if ( rData.mpTextAttr && maText.Len() )
+ if ( rData.mpTextAttr && !maText.isEmpty() )
{
- mpTextAttr = new sal_uInt16[maText.Len()];
- memcpy( mpTextAttr, rData.mpTextAttr, maText.Len()*sizeof(sal_uInt16) );
+ mpTextAttr = new sal_uInt16[maText.getLength()];
+ memcpy( mpTextAttr, rData.mpTextAttr, maText.getLength()*sizeof(sal_uInt16) );
}
else
mpTextAttr = NULL;
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index ad3dc48..c623130 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -427,11 +427,11 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni
pWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_True );
while( bSearch && pWindow )
{
- const XubString aStr = pWindow->GetText();
- sal_uInt16 nPos = aStr.Search( '~' );
- while ( nPos != STRING_NOTFOUND )
+ const OUString aStr = pWindow->GetText();
+ sal_Int32 nPos = aStr.indexOf( '~' );
+ while (nPos != -1)
{
- cCompareChar = aStr.GetChar( nPos+1 );
+ cCompareChar = aStr[nPos+1];
cCompareChar = xCharClass->toUpper( OUString(cCompareChar), 0, 1, rLocale )[0];
if ( cCompareChar == cCharCode )
{
@@ -453,7 +453,7 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni
rIndex = i;
return pWindow;
}
- nPos = aStr.Search( '~', nPos+1 );
+ nPos = aStr.indexOf( '~', nPos+1 );
}
// #i93011# it would have made sense to have this really recursive
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 8d91515..e544cc0 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -113,11 +113,11 @@ struct MenuItemData
MenuItemBits nBits; // MenuItem-Bits
Menu* pSubMenu; // Pointer to SubMenu
Menu* pAutoSubMenu; // Pointer to SubMenu from Resource
- XubString aText; // Menu-Text
- XubString aHelpText; // Help-String
- XubString aTipHelpText; // TipHelp-String (eg, expanded filenames)
- XubString aCommandStr; // CommandString
- XubString aHelpCommandStr; // Help command string (to reference external help)
+ OUString aText; // Menu-Text
+ OUString aHelpText; // Help-String
+ OUString aTipHelpText; // TipHelp-String (eg, expanded filenames)
+ OUString aCommandStr; // CommandString
+ OUString aHelpCommandStr; // Help command string (to reference external help)
OString sIdent;
OString aHelpId; // Help-Id
sal_uLong nUserValue; // User value
@@ -130,15 +130,15 @@ struct MenuItemData
sal_Bool bMirrorMode;
long nItemImageAngle;
Size aSz; // only temporarily valid
- XubString aAccessibleName; // accessible name
- XubString aAccessibleDescription; // accessible description
+ OUString aAccessibleName; // accessible name
+ OUString aAccessibleDescription; // accessible description
SalMenuItem* pSalMenuItem; // access to native menu
MenuItemData() :
pSubMenu(NULL), pAutoSubMenu(NULL), nItemImageAngle(0), pSalMenuItem ( NULL )
{}
- MenuItemData( const XubString& rStr, const Image& rImage ) :
+ MenuItemData( const OUString& rStr, const Image& rImage ) :
pSubMenu(NULL),
pAutoSubMenu(NULL),
aText( rStr ),
@@ -181,7 +181,7 @@ public:
sal_uInt16 nId,
MenuItemType eType,
MenuItemBits nBits,
- const XubString& rStr,
+ const OUString& rStr,
const Image& rImage,
Menu* pMenu,
size_t nPos,
@@ -229,7 +229,7 @@ MenuItemData* MenuItemList::Insert(
sal_uInt16 nId,
MenuItemType eType,
MenuItemBits nBits,
- const XubString& rStr,
+ const OUString& rStr,
const Image& rImage,
Menu* pMenu,
size_t nPos,
@@ -292,7 +292,7 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos)
aSalMIData.eType = MENUITEM_SEPARATOR;
aSalMIData.nBits = 0;
aSalMIData.pMenu = NULL;
- aSalMIData.aText = XubString();
+ aSalMIData.aText = OUString();
aSalMIData.aImage = Image();
// Native-support: returns NULL if not supported
@@ -370,11 +370,11 @@ MenuItemData* MenuItemList::SearchItem(
MenuItemData* pData = maItemList[ rPos ];
if ( pData->bEnabled )
{
- sal_uInt16 n = pData->aText.Search( '~' );
- if ( n != STRING_NOTFOUND )
+ sal_Int32 n = pData->aText.indexOf('~');
+ if ( n != -1 )
{
KeyCode mnKeyCode;
- sal_Unicode mnUnicode = pData->aText.GetChar(n+1);
+ sal_Unicode mnUnicode = pData->aText[n+1];
Window* pDefWindow = ImplGetDefaultWindow();
if( ( pDefWindow
&& pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode,
@@ -430,15 +430,15 @@ size_t MenuItemList::GetItemCount( KeyCode aKeyCode ) const
MenuItemData* pData = maItemList[ --nPos ];
if ( pData->bEnabled )
{
- sal_uInt16 n = pData->aText.Search( '~' );
- if ( n != STRING_NOTFOUND )
+ sal_Int32 n = pData->aText.indexOf('~');
+ if (n != -1)
{
KeyCode mnKeyCode;
// if MapUnicodeToKeyCode fails or is unsupported we try the pure ascii mapping of the keycodes
// so we have working shortcuts when ascii mnemonics are used
Window* pDefWindow = ImplGetDefaultWindow();
if( ( pDefWindow
- && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1),
+ && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText[n+1],
Application::GetSettings().GetUILanguageTag().getLanguageType(), mnKeyCode )
&& aKeyCode.GetCode() == mnKeyCode.GetCode()
)
@@ -769,7 +769,7 @@ static void ImplSetMenuItemData( MenuItemData* pData )
// convert data
if ( !pData->aImage )
pData->eType = MENUITEM_STRING;
- else if ( !pData->aText.Len() )
+ else if ( pData->aText.isEmpty() )
pData->eType = MENUITEM_IMAGE;
else
pData->eType = MENUITEM_STRINGIMAGE;
@@ -810,7 +810,7 @@ static bool ImplHandleHelpEvent( Window* pMenuWindow, Menu* pMenu, sal_uInt16 nH
aPos = rHEvt.GetMousePosPixel();
Rectangle aRect( aPos, Size() );
- if( pMenu->GetHelpText( nId ).Len() )
+ if (!pMenu->GetHelpText(nId).isEmpty())
Help::ShowBalloon( pMenuWindow, aPos, pMenu->GetHelpText( nId ) );
else
{
@@ -1202,7 +1202,7 @@ void Menu::RemoveEventListener( const Link& rEventListener )
maEventListeners.removeListener( rEventListener );
}
-void Menu::InsertItem(sal_uInt16 nItemId, const XubString& rStr, MenuItemBits nItemBits,
+void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr, MenuItemBits nItemBits,
const OString &rIdent, sal_uInt16 nPos)
{
DBG_ASSERT( nItemId, "Menu::InsertItem(): ItemId == 0" );
@@ -1235,11 +1235,11 @@ void Menu::InsertItem(sal_uInt16 nItemId, const XubString& rStr, MenuItemBits nI
void Menu::InsertItem(sal_uInt16 nItemId, const Image& rImage,
MenuItemBits nItemBits, const OString &rIdent, sal_uInt16 nPos)
{
- InsertItem(nItemId, ImplGetSVEmptyStr(), nItemBits, rIdent, nPos);
+ InsertItem(nItemId, OUString(), nItemBits, rIdent, nPos);
SetItemImage( nItemId, rImage );
}
-void Menu::InsertItem(sal_uInt16 nItemId, const XubString& rStr,
+void Menu::InsertItem(sal_uInt16 nItemId, const OUString& rStr,
const Image& rImage, MenuItemBits nItemBits,
const OString &rIdent, sal_uInt16 nPos)
{
@@ -1292,7 +1292,7 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos )
if ( bSep )
InsertSeparator(OString(), nPos);
- String aHelpText;
+ OUString aHelpText;
if ( nObjMask & RSC_MENUITEM_HELPTEXT )
{
aHelpText = ReadStringRes();
@@ -1675,11 +1675,11 @@ KeyEvent Menu::GetActivationKey( sal_uInt16 nItemId ) const
MenuItemData* pData = pItemList->GetData( nItemId );
if( pData )
{
- sal_uInt16 nPos = pData->aText.Search( '~' );
- if( nPos != STRING_NOTFOUND && nPos < pData->aText.Len()-1 )
+ sal_Int32 nPos = pData->aText.indexOf( '~' );
+ if( nPos != -1 && nPos < pData->aText.getLength()-1 )
{
sal_uInt16 nCode = 0;
- sal_Unicode cAccel = pData->aText.GetChar( nPos+1 );
+ sal_Unicode cAccel = pData->aText[nPos+1];
if( cAccel >= 'a' && cAccel <= 'z' )
nCode = KEY_A + (cAccel-'a');
else if( cAccel >= 'A' && cAccel <= 'Z' )
@@ -1837,7 +1837,7 @@ void Menu::ShowItem( sal_uInt16 nItemId, sal_Bool bVisible )
}
}
-void Menu::SetItemText( sal_uInt16 nItemId, const XubString& rStr )
+void Menu::SetItemText( sal_uInt16 nItemId, const OUString& rStr )
{
size_t nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
@@ -1845,7 +1845,7 @@ void Menu::SetItemText( sal_uInt16 nItemId, const XubString& rStr )
if ( !pData )
return;
- if ( !rStr.Equals( pData->aText ) )
+ if ( !rStr.equals( pData->aText ) )
{
pData->aText = rStr;
ImplSetMenuItemData( pData );
@@ -1866,15 +1866,15 @@ void Menu::SetItemText( sal_uInt16 nItemId, const XubString& rStr )
}
}
-XubString Menu::GetItemText( sal_uInt16 nItemId ) const
+OUString Menu::GetItemText( sal_uInt16 nItemId ) const
{
size_t nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
if ( pData )
return pData->aText;
- else
- return ImplGetSVEmptyStr();
+
+ return OUString();
}
void Menu::SetItemImage( sal_uInt16 nItemId, const Image& rImage )
@@ -1987,7 +1987,7 @@ void Menu::SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand )
pData->aCommandStr = rCommand;
}
-const OUString Menu::GetItemCommand( sal_uInt16 nItemId ) const
+OUString Menu::GetItemCommand( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -1997,7 +1997,7 @@ const OUString Menu::GetItemCommand( sal_uInt16 nItemId ) const
return OUString();
}
-void Menu::SetHelpCommand( sal_uInt16 nItemId, const XubString& rStr )
+void Menu::SetHelpCommand( sal_uInt16 nItemId, const OUString& rStr )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2005,17 +2005,17 @@ void Menu::SetHelpCommand( sal_uInt16 nItemId, const XubString& rStr )
pData->aHelpCommandStr = rStr;
}
-const XubString& Menu::GetHelpCommand( sal_uInt16 nItemId ) const
+OUString Menu::GetHelpCommand( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
return pData->aHelpCommandStr;
- else
- return ImplGetSVEmptyStr();
+
+ return OUString();
}
-void Menu::SetHelpText( sal_uInt16 nItemId, const XubString& rStr )
+void Menu::SetHelpText( sal_uInt16 nItemId, const OUString& rStr )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2023,38 +2023,38 @@ void Menu::SetHelpText( sal_uInt16 nItemId, const XubString& rStr )
pData->aHelpText = rStr;
}
-const XubString& Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
+OUString Menu::ImplGetHelpText( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
{
- if ( !pData->aHelpText.Len() &&
- (( !pData->aHelpId.isEmpty() ) || ( pData->aCommandStr.Len() )))
+ if ( pData->aHelpText.isEmpty() &&
+ (( !pData->aHelpId.isEmpty() ) || ( !pData->aCommandStr.isEmpty() )))
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
{
- if ( pData->aCommandStr.Len() )
+ if (!pData->aCommandStr.isEmpty())
pData->aHelpText = pHelp->GetHelpText( pData->aCommandStr, NULL );
- if( !pData->aHelpText.Len() && !pData->aHelpId.isEmpty() )
+ if( pData->aHelpText.isEmpty() && !pData->aHelpId.isEmpty() )
pData->aHelpText = pHelp->GetHelpText( OStringToOUString( pData->aHelpId, RTL_TEXTENCODING_UTF8 ), NULL );
}
}
return pData->aHelpText;
}
- else
- return ImplGetSVEmptyStr();
+
+ return OUString();
}
-const XubString& Menu::GetHelpText( sal_uInt16 nItemId ) const
+OUString Menu::GetHelpText( sal_uInt16 nItemId ) const
{
return ImplGetHelpText( nItemId );
}
-void Menu::SetTipHelpText( sal_uInt16 nItemId, const XubString& rStr )
+void Menu::SetTipHelpText( sal_uInt16 nItemId, const OUString& rStr )
{
MenuItemData* pData = pItemList->GetData( nItemId );
@@ -2062,14 +2062,14 @@ void Menu::SetTipHelpText( sal_uInt16 nItemId, const XubString& rStr )
pData->aTipHelpText = rStr;
}
-const XubString& Menu::GetTipHelpText( sal_uInt16 nItemId ) const
+OUString Menu::GetTipHelpText( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
return pData->aTipHelpText;
- else
- return ImplGetSVEmptyStr();
+
+ return OUString();
}
void Menu::SetHelpId( sal_uInt16 nItemId, const OString& rHelpId )
@@ -2841,7 +2841,7 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
long nMaxItemTextWidth = aOutSz.Width() - aTmpPos.X() - nExtra - nOuterSpaceX;
if( !bIsMenuBar && pData->aAccelKey.GetCode() && !ImplAccelDisabled() )
{
- XubString aAccText = pData->aAccelKey.GetName();
+ OUString aAccText = pData->aAccelKey.GetName();
nMaxItemTextWidth -= pWin->GetTextWidth( aAccText ) + 3*nExtra;
}
if( !bIsMenuBar && pData->pSubMenu )
@@ -2857,14 +2857,14 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
// Accel
if ( !bLayout && !bIsMenuBar && pData->aAccelKey.GetCode() && !ImplAccelDisabled() )
{
- XubString aAccText = pData->aAccelKey.GetName();
+ OUString aAccText = pData->aAccelKey.GetName();
aTmpPos.X() = aOutSz.Width() - pWin->GetTextWidth( aAccText );
aTmpPos.X() -= 4*nExtra;
aTmpPos.X() -= nOuterSpaceX;
aTmpPos.Y() = aPos.Y();
aTmpPos.Y() += nTextOffsetY;
- pWin->DrawCtrlText( aTmpPos, aAccText, 0, aAccText.Len(), nTextStyle );
+ pWin->DrawCtrlText( aTmpPos, aAccText, 0, aAccText.getLength(), nTextStyle );
}
// SubMenu?
@@ -3193,26 +3193,26 @@ Rectangle Menu::GetBoundingRectangle( sal_uInt16 nPos ) const
return aRet;
}
-void Menu::SetAccessibleName( sal_uInt16 nItemId, const XubString& rStr )
+void Menu::SetAccessibleName( sal_uInt16 nItemId, const OUString& rStr )
{
size_t nPos;
MenuItemData* pData = pItemList->GetData( nItemId, nPos );
- if ( pData && !rStr.Equals( pData->aAccessibleName ) )
+ if ( pData && !rStr.equals( pData->aAccessibleName ) )
{
pData->aAccessibleName = rStr;
ImplCallEventListeners( VCLEVENT_MENU_ACCESSIBLENAMECHANGED, nPos );
}
}
-XubString Menu::GetAccessibleName( sal_uInt16 nItemId ) const
+OUString Menu::GetAccessibleName( sal_uInt16 nItemId ) const
{
MenuItemData* pData = pItemList->GetData( nItemId );
if ( pData )
return pData->aAccessibleName;
- else
- return ImplGetSVEmptyStr();
+
+ return OUString();
}
void Menu::ImplSetSalMenu( SalMenu *pSalMenu )
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 28f1780..2322189 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -2698,7 +2698,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt )
aHelpRect.Bottom() = aPt.Y();
// Text ermitteln und anzeigen
- XubString aStr;
+ OUString aStr;
ResMgr* pResMgr = ImplGetResMgr();
if( pResMgr )
aStr = ResId( nHelpResId, *pResMgr ).toString();
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index b5bf08b..07f13e5 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -363,10 +363,10 @@ void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth )
if ( aTextRect.Right() > aTextRect.Left() )
{
// Position ermitteln
- XubString aStr = GetText();
- sal_uInt16 nPos = aStr.Search( '\n' );
- if ( nPos != STRING_NOTFOUND )
- aStr.Erase( nPos );
+ OUString aStr = GetText();
+ sal_Int32 nPos = aStr.indexOf('\n');
+ if (nPos != -1)
+ aStr = aStr.copy(0, nPos);
aTextRect.Bottom() = aTextRect.Top()+GetTextHeight()+1;
@@ -809,15 +809,15 @@ void StatusBar::RequestHelp( const HelpEvent& rHEvt )
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
{
- XubString aStr = GetHelpText( nItemId );
+ OUString aStr = GetHelpText( nItemId );
Help::ShowBalloon( this, aItemRect.Center(), aItemRect, aStr );
return;
}
else if ( rHEvt.GetMode() & HELPMODE_QUICK )
{
- XubString aStr = GetQuickHelpText( nItemId );
+ OUString aStr(GetQuickHelpText(nItemId));
// Show quickhelp if available
- if( aStr.Len() )
+ if (!aStr.isEmpty())
{
Help::ShowQuickHelp( this, aItemRect, aStr );
return;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index b825161..8e9889b 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -4310,13 +4310,13 @@ void ToolBox::RequestHelp( const HelpEvent& rHEvt )
aTempRect.Bottom() = aPt.Y();
// get text and display it
- XubString aStr = GetQuickHelpText( nItemId );
- const XubString& rHelpStr = GetHelpText( nItemId );
- if ( !aStr.Len() )
+ OUString aStr = GetQuickHelpText( nItemId );
+ const OUString& rHelpStr = GetHelpText( nItemId );
+ if (aStr.isEmpty())
aStr = MnemonicGenerator::EraseAllMnemonicChars( GetItemText( nItemId ) );
if ( rHEvt.GetMode() & HELPMODE_BALLOON )
{
- if ( rHelpStr.Len() )
+ if (!rHelpStr.isEmpty())
aStr = rHelpStr;
Help::ShowBalloon( this, aHelpPos, aTempRect, aStr );
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 28c157e..fe0cd52 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -4183,10 +4183,10 @@ void Window::ImplNewInputContext()
SalInputContext aNewContext;
const Font& rFont = rInputContext.GetFont();
- const XubString& rFontName = rFont.GetName();
+ const OUString& rFontName = rFont.GetName();
ImplFontEntry* pFontEntry = NULL;
aNewContext.mpFont = NULL;
- if ( rFontName.Len() )
+ if (!rFontName.isEmpty())
{
Size aSize = pFocusWin->ImplLogicToDevicePixel( rFont.GetSize() );
if ( !aSize.Height() )
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 8485971..a5bc661 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1223,7 +1223,7 @@ static long ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent,
// -----------------------------------------------------------------------
static long ImplHandleExtTextInput( Window* pWindow,
- const XubString& rText,
+ const OUString& rText,
const sal_uInt16* pTextAttr,
sal_uLong nCursorPos, sal_uInt16 nCursorFlags )
{
@@ -1266,12 +1266,12 @@ static long ImplHandleExtTextInput( Window* pWindow,
return 0;
// Test for changes
- sal_Bool bOnlyCursor = sal_False;
- xub_StrLen nMinLen = std::min( pWinData->mpExtOldText->getLength(), sal_Int32(rText.Len()) );
- xub_StrLen nDeltaStart = 0;
+ bool bOnlyCursor = false;
+ sal_Int32 nMinLen = std::min( pWinData->mpExtOldText->getLength(), rText.getLength() );
+ sal_Int32 nDeltaStart = 0;
while ( nDeltaStart < nMinLen )
{
- if ( (*pWinData->mpExtOldText)[nDeltaStart] != rText.GetChar( nDeltaStart ) )
+ if ( (*pWinData->mpExtOldText)[nDeltaStart] != rText[nDeltaStart] )
break;
nDeltaStart++;
}
@@ -1294,8 +1294,8 @@ static long ImplHandleExtTextInput( Window* pWindow,
}
}
if ( (nDeltaStart >= nMinLen) &&
- (pWinData->mpExtOldText->getLength() == rText.Len()) )
- bOnlyCursor = sal_True;
+ (pWinData->mpExtOldText->getLength() == rText.getLength()) )
+ bOnlyCursor = true;
// Call Event and store the information
CommandExtTextInputData aData( rText, pTextAttr,
@@ -1310,8 +1310,8 @@ static long ImplHandleExtTextInput( Window* pWindow,
}
if ( pTextAttr )
{
- pWinData->mpExtOldAttrAry = new sal_uInt16[rText.Len()];
- memcpy( pWinData->mpExtOldAttrAry, pTextAttr, rText.Len()*sizeof( sal_uInt16 ) );
+ pWinData->mpExtOldAttrAry = new sal_uInt16[rText.getLength()];
+ memcpy( pWinData->mpExtOldAttrAry, pTextAttr, rText.getLength()*sizeof( sal_uInt16 ) );
}
return !ImplCallCommand( pChild, COMMAND_EXTTEXTINPUT, &aData );
}
More information about the Libreoffice-commits
mailing list