[Libreoffice-commits] core.git: include/svtools include/vcl svtools/source vcl/source
Caolán McNamara
caolanm at redhat.com
Fri Jul 12 08:48:21 PDT 2013
include/svtools/ctrlbox.hxx | 49 +++++++++++++++++-----------------
include/svtools/svtabbx.hxx | 4 +-
include/svtools/svxbox.hxx | 10 ++++--
include/svtools/treelistbox.hxx | 4 +-
include/vcl/lstbox.hxx | 2 -
svtools/source/contnr/svtabbx.cxx | 14 ++++-----
svtools/source/contnr/treelistbox.cxx | 6 ++--
vcl/source/control/lstbox.cxx | 2 -
8 files changed, 47 insertions(+), 44 deletions(-)
New commits:
commit 8ad3d846a46a2780e1759f58334b04ce2286ff00
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jul 12 15:42:47 2013 +0100
XubString->OUString
Change-Id: I07f4db038114174a65ed453096d566d699e8fce8
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index c83a94e..bbef331 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -199,10 +199,19 @@ public:
XubString GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const
{ return ListBox::GetSelectEntry( nSelIndex ); }
Color GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const;
- sal_Bool IsEntrySelected( const XubString& rStr ) const
- { return ListBox::IsEntrySelected( rStr ); }
-
- sal_Bool IsEntrySelected( const Color& rColor ) const;
+ bool IsEntrySelected(const OUString& rStr ) const
+ {
+ return ListBox::IsEntrySelected(rStr);
+ }
+
+ bool IsEntrySelected(const Color& rColor) const
+ {
+ sal_uInt16 nPos = GetEntryPos( rColor );
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ return IsEntryPosSelected( nPos );
+ else
+ return sal_False;
+ }
private:
// declared as private because some compilers would generate the default functions
@@ -220,15 +229,6 @@ inline void ColorListBox::SelectEntry( const Color& rColor, sal_Bool bSelect )
ListBox::SelectEntryPos( nPos, bSelect );
}
-inline sal_Bool ColorListBox::IsEntrySelected( const Color& rColor ) const
-{
- sal_uInt16 nPos = GetEntryPos( rColor );
- if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- return IsEntryPosSelected( nPos );
- else
- return sal_False;
-}
-
inline Color ColorListBox::GetSelectEntryColor( sal_uInt16 nSelIndex ) const
{
sal_uInt16 nPos = GetSelectEntryPos( nSelIndex );
@@ -348,8 +348,18 @@ public:
void SelectEntry( const XubString& 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;
- inline sal_Bool IsEntrySelected( const XubString& rStr ) const { return ListBox::IsEntrySelected( rStr ); }
- sal_Bool IsEntrySelected( sal_uInt16 nStyle1 = STYLE_SOLID ) const;
+ bool IsEntrySelected(const OUString& rStr) const
+ {
+ return ListBox::IsEntrySelected(rStr);
+ }
+ bool IsEntrySelected(sal_uInt16 nStyle = STYLE_SOLID) const
+ {
+ sal_uInt16 nPos = GetEntryPos( nStyle );
+ if ( nPos != LISTBOX_ENTRY_NOTFOUND )
+ return IsEntryPosSelected( nPos );
+ else
+ return sal_False;
+ }
inline void SetUnit( FieldUnit eNewUnit ) { eUnit = eNewUnit; }
inline FieldUnit GetUnit() const { return eUnit; }
@@ -374,15 +384,6 @@ private:
void* GetEntryData( sal_uInt16 nPos ) const;
};
-inline sal_Bool LineListBox::IsEntrySelected( sal_uInt16 nStyle ) const
-{
- sal_uInt16 nPos = GetEntryPos( nStyle );
- if ( nPos != LISTBOX_ENTRY_NOTFOUND )
- return IsEntryPosSelected( nPos );
- else
- return sal_False;
-}
-
inline void LineListBox::SetColor( const Color& rColor )
{
aColor = rColor;
diff --git a/include/svtools/svtabbx.hxx b/include/svtools/svtabbx.hxx
index 4a722fa..c88b418 100644
--- a/include/svtools/svtabbx.hxx
+++ b/include/svtools/svtabbx.hxx
@@ -98,8 +98,8 @@ public:
String GetEntryText( SvTreeListEntry*, sal_uInt16 nCol ) const;
String GetEntryText( sal_uLong nPos, sal_uInt16 nCol = 0xffff ) const;
using SvTreeListBox::SetEntryText;
- void SetEntryText( const XubString&, sal_uLong, sal_uInt16 nCol=0xffff );
- void SetEntryText(const XubString&,SvTreeListEntry*,sal_uInt16 nCol=0xffff);
+ void SetEntryText(const OUString&, sal_uLong, sal_uInt16 nCol=0xffff);
+ void SetEntryText(const OUString&, SvTreeListEntry*, sal_uInt16 nCol=0xffff);
String GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const;
sal_uLong GetEntryPos( const XubString&, sal_uInt16 nCol = 0xffff );
sal_uLong GetEntryPos( const SvTreeListEntry* pEntry ) const;
diff --git a/include/svtools/svxbox.hxx b/include/svtools/svxbox.hxx
index 4ccc566..c86f790 100644
--- a/include/svtools/svxbox.hxx
+++ b/include/svtools/svxbox.hxx
@@ -77,7 +77,12 @@ public:
sal_uInt16 GetEntryPos( const SvxBoxEntry& rEntry ) const;
const SvxBoxEntry& GetSvxBoxEntry( sal_uInt16 nIdx ) const;
- inline sal_Bool IsEntrySelected( const SvxBoxEntry& rEntry ) const;
+ inline bool IsEntrySelected(const SvxBoxEntry& rEntry) const;
+ {
+ return ListBox::IsEntrySelected(aEntry.aName);
+ }
+
+
const SvxBoxEntry& GetSelectSvxBoxEntry( sal_uInt16 nIdx = 0 ) const;
inline void SelectEntry( const SvxBoxEntry& rEntry,
sal_Bool bSelect = sal_True );
@@ -103,9 +108,6 @@ private:
// inlines ---------------------------------------------------------------
-inline sal_Bool SvxListBox::IsEntrySelected( const SvxBoxEntry& aEntry ) const
- { return ListBox::IsEntrySelected( aEntry.aName ); }
-
inline void SvxListBox::SelectEntry( const SvxBoxEntry& aEntry, sal_Bool bSelect )
{ ListBox::SelectEntry( aEntry.aName, bSelect ); }
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 4c09d74..4fe013f 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -529,7 +529,7 @@ protected:
void EditItemText( SvTreeListEntry* pEntry, SvLBoxString* pItem,
const Selection& );
- void EditedText( const XubString& );
+ void EditedText(const OUString&);
// Recalculate all tabs depending on TreeListStyle and Bitmap sizes
// Is called automatically when inserting/changing Bitmaps, changing the Model etc.
@@ -632,7 +632,7 @@ public:
void SetCheckButtonInvisible( SvTreeListEntry* );
SvButtonState GetCheckButtonState( SvTreeListEntry* ) const;
- void SetEntryText(SvTreeListEntry*, const XubString& );
+ void SetEntryText(SvTreeListEntry*, const OUString& );
void SetExpandedEntryBmp( SvTreeListEntry* _pEntry, const Image& _rImage );
void SetCollapsedEntryBmp( SvTreeListEntry* _pEntry, const Image& _rImage );
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 61f8b24..a691629 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -135,7 +135,7 @@ public:
virtual XubString GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const;
virtual sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
- virtual sal_Bool IsEntrySelected( const XubString& rStr ) const;
+ virtual bool IsEntrySelected(const OUString& rStr) const;
virtual sal_Bool IsEntryPosSelected( sal_uInt16 nPos ) const;
virtual void SetNoSelection();
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 053dfa2..6e77b49 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -310,28 +310,28 @@ String SvTabListBox::GetEntryText( sal_uLong nPos, sal_uInt16 nCol ) const
return GetEntryText( pEntry, nCol );
}
-void SvTabListBox::SetEntryText( const XubString& rStr, sal_uLong nPos, sal_uInt16 nCol )
+void SvTabListBox::SetEntryText(const OUString& rStr, sal_uLong nPos, sal_uInt16 nCol)
{
SvTreeListEntry* pEntry = SvTreeListBox::GetEntry( nPos );
SetEntryText( rStr, pEntry, nCol );
}
-void SvTabListBox::SetEntryText( const XubString& rStr, SvTreeListEntry* pEntry, sal_uInt16 nCol )
+void SvTabListBox::SetEntryText(const OUString& rStr, SvTreeListEntry* pEntry, sal_uInt16 nCol)
{
DBG_ASSERT(pEntry,"SetEntryText:Invalid Entry");
if( !pEntry )
return;
- String sOldText = GetEntryText( pEntry, nCol );
- if ( sOldText == rStr )
+ OUString sOldText = GetEntryText(pEntry, nCol);
+ if (sOldText == rStr)
return;
sal_uInt16 nTextColumn = nCol;
- const sal_Unicode* pCurToken = rStr.GetBuffer();
+ const sal_Unicode* pCurToken = rStr.getStr();
sal_uInt16 nCurTokenLen;
const sal_Unicode* pNextToken = GetToken( pCurToken, nCurTokenLen );
- XubString aTemp;
+ OUString aTemp;
sal_uInt16 nCount = pEntry->ItemCount();
sal_uInt16 nCur = 0;
while( nCur < nCount )
@@ -344,7 +344,7 @@ void SvTabListBox::SetEntryText( const XubString& rStr, SvTreeListEntry* pEntry,
if( pCurToken )
aTemp = OUString(pCurToken, nCurTokenLen);
else
- aTemp.Erase(); // delete all columns without a token
+ aTemp = OUString(); // delete all columns without a token
((SvLBoxString*)pStr)->SetText( aTemp );
pCurToken = pNextToken;
pNextToken = GetToken( pCurToken, nCurTokenLen );
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 3f02d6e..f761e9a 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -1890,12 +1890,12 @@ SvTreeListEntry* SvTreeListBox::InsertEntry( const XubString& aText,
return pEntry;
}
-void SvTreeListBox::SetEntryText( SvTreeListEntry* pEntry, const XubString& aStr)
+void SvTreeListBox::SetEntryText(SvTreeListEntry* pEntry, const OUString& rStr)
{
DBG_CHKTHIS(SvTreeListBox,0);
SvLBoxString* pItem = (SvLBoxString*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
DBG_ASSERT(pItem,"SetText:Item not found");
- pItem->SetText( aStr );
+ pItem->SetText(rStr);
pItem->InitViewData( this, pEntry, 0 );
GetModel()->InvalidateEntry( pEntry );
}
@@ -2825,7 +2825,7 @@ void SvTreeListBox::SetChildrenNotTransient()
pImp->SetChildrenNotTransient();
}
-void SvTreeListBox::EditedText( const XubString& rStr )
+void SvTreeListBox::EditedText( const OUString& rStr )
{
DBG_CHKTHIS(SvTreeListBox,0);
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index abd4f23..fa9c420 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -1115,7 +1115,7 @@ sal_uInt16 ListBox::GetSelectEntryPos( sal_uInt16 nIndex ) const
}
-sal_Bool ListBox::IsEntrySelected( const XubString& rStr ) const
+bool ListBox::IsEntrySelected(const OUString& rStr) const
{
return IsEntryPosSelected( GetEntryPos( rStr ) );
}
More information about the Libreoffice-commits
mailing list