[Libreoffice-commits] core.git: cui/source extensions/source include/svtools include/vcl sd/source sfx2/source starmath/source sw/source vcl/source

Caolán McNamara caolanm at redhat.com
Fri Jul 26 12:38:01 PDT 2013


 cui/source/options/fontsubs.cxx               |    2 +-
 cui/source/tabpages/chardlg.cxx               |    8 ++++----
 extensions/source/dbpilots/commonpagesdbp.cxx |    2 +-
 include/svtools/ctrlbox.hxx                   |    2 --
 include/vcl/lstbox.hxx                        |    6 +++---
 sd/source/ui/dlg/animobjs.cxx                 |    2 +-
 sfx2/source/doc/new.cxx                       |    2 +-
 starmath/source/dialog.cxx                    |    2 +-
 sw/source/ui/fldui/fldvar.cxx                 |    2 +-
 sw/source/ui/index/cnttab.cxx                 |    2 +-
 sw/source/ui/index/swuiidxmrk.cxx             |    2 +-
 vcl/source/control/lstbox.cxx                 |    2 +-
 12 files changed, 16 insertions(+), 18 deletions(-)

New commits:
commit 225d50da607a8a4115f45b2c433cb280fac70361
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 26 17:21:28 2013 +0100

    convert GetSelectEntry family to OUString
    
    Change-Id: Id3282e2efd6573bed7fd172021dae9aee9342fae

diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 86e26ae..230ab85 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -175,7 +175,7 @@ sal_Bool  SvxFontSubstTabPage::FillItemSet( SfxItemSet& )
         comphelper::ConfigurationChanges::create());
     if(m_pFontHeightLB->GetSavedValue() != m_pFontHeightLB->GetSelectEntryPos())
         officecfg::Office::Common::Font::SourceViewFont::FontHeight::set(
-            static_cast< sal_Int16 >(m_pFontHeightLB->GetSelectEntry().ToInt32()),
+            static_cast< sal_Int16 >(m_pFontHeightLB->GetSelectEntry().toInt32()),
             batch);
     if(m_pNonPropFontsOnlyCB->GetSavedValue() != m_pNonPropFontsOnlyCB->IsChecked())
         officecfg::Office::Common::Font::SourceViewFont::
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index ce57a4d..2a106a7 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -3473,9 +3473,9 @@ sal_Bool SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet )
     const SfxPoolItem* pOld = GetOldItem( rSet, SID_ATTR_CHAR_TWO_LINES );
     sal_Bool bOn = m_pTwoLinesBtn->IsChecked();
     sal_Unicode cStart = ( bOn && m_pStartBracketLB->GetSelectEntryPos() > 0 )
-        ? m_pStartBracketLB->GetSelectEntry().GetChar(0) : 0;
+        ? m_pStartBracketLB->GetSelectEntry()[0] : 0;
     sal_Unicode cEnd = ( bOn && m_pEndBracketLB->GetSelectEntryPos() > 0 )
-        ? m_pEndBracketLB->GetSelectEntry().GetChar(0) : 0;
+        ? m_pEndBracketLB->GetSelectEntry()[0] : 0;
 
     if ( pOld )
     {
@@ -3499,9 +3499,9 @@ sal_Bool SvxCharTwoLinesPage::FillItemSet( SfxItemSet& rSet )
 void    SvxCharTwoLinesPage::UpdatePreview_Impl()
 {
     sal_Unicode cStart = m_pStartBracketLB->GetSelectEntryPos() > 0
-        ? m_pStartBracketLB->GetSelectEntry().GetChar(0) : 0;
+        ? m_pStartBracketLB->GetSelectEntry()[0] : 0;
     sal_Unicode cEnd = m_pEndBracketLB->GetSelectEntryPos() > 0
-        ? m_pEndBracketLB->GetSelectEntry().GetChar(0) : 0;
+        ? m_pEndBracketLB->GetSelectEntry()[0] : 0;
     m_pPreviewWin->SetBrackets(cStart, cEnd);
     m_pPreviewWin->SetTwoLines(m_pTwoLinesBtn->IsChecked());
     m_pPreviewWin->Invalidate();
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 77e019c..fea3a5c 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -430,7 +430,7 @@ namespace dbp
     //---------------------------------------------------------------------
     void OMaybeListSelectionPage::implCommit(String& _rSelection)
     {
-        _rSelection = m_pYes->IsChecked() ? m_pList->GetSelectEntry() : String();
+        _rSelection = m_pYes->IsChecked() ? m_pList->GetSelectEntry() : OUString();
     }
 
     //---------------------------------------------------------------------
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 79c976b..621d8f8 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -196,8 +196,6 @@ public:
     void            SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True )
                         { ListBox::SelectEntry( rStr, bSelect ); }
     void            SelectEntry( const Color& rColor, sal_Bool bSelect = sal_True );
-    XubString       GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const
-                        { return ListBox::GetSelectEntry( nSelIndex ); }
     Color           GetSelectEntryColor( sal_uInt16 nSelIndex = 0 ) const;
     bool            IsEntrySelected(const OUString& rStr ) const
     {
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index a691629..9cd5459 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -131,9 +131,9 @@ public:
     virtual void        SelectEntry( const XubString& rStr, sal_Bool bSelect = sal_True );
     virtual void        SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True );
 
-    virtual sal_uInt16      GetSelectEntryCount() const;
-    virtual XubString   GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const;
-    virtual sal_uInt16      GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
+    virtual sal_uInt16  GetSelectEntryCount() const;
+    virtual OUString    GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const;
+    virtual sal_uInt16  GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const;
 
     virtual bool        IsEntrySelected(const OUString& rStr) const;
     virtual sal_Bool        IsEntryPosSelected( sal_uInt16 nPos ) const;
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index 09272d3..0d81e9e 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -1119,7 +1119,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView )
             sal_uInt16          nPos = aLbLoopCount.GetSelectEntryPos();
 
             if( nPos != LISTBOX_ENTRY_NOTFOUND && nPos != aLbLoopCount.GetEntryCount() - 1 ) // endless
-                nLoopCount = (long) aLbLoopCount.GetSelectEntry().ToInt32();
+                nLoopCount = (long) aLbLoopCount.GetSelectEntry().toInt32();
 
             aAnimBmp.aBmpEx = *pBitmapEx;
             aAnimBmp.aPosPix = aPt;
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index cb25ce9..d27c475 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -372,7 +372,7 @@ IMPL_LINK_NOARG_INLINE_END(SfxNewFileDialog_Impl, LoadFile)
 sal_uInt16  SfxNewFileDialog_Impl::GetSelectedTemplatePos() const
 {
     sal_uInt16 nEntry=aTemplateLb.GetSelectEntryPos();
-    String aSel=aRegionLb.GetSelectEntry().Copy();
+    String aSel=aRegionLb.GetSelectEntry();
     sal_uInt16 nc=aSel.Search('(');
     if (nc-1&&nc!=STRING_NOTFOUND)
         aSel.Erase(nc-1);
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index c445fb3..1f1ef6b 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1950,7 +1950,7 @@ void SmSymDefineDialog::UpdateButtons()
         bool bEqual = pOrigSymbol
                     && aTmpSymbolSetName.equalsIgnoreAsciiCase(aOldSymbolSetName.GetText())
                     && aTmpSymbolName.equals(pOrigSymbol->GetName())
-                    && aFonts.GetSelectEntry().EqualsIgnoreCaseAscii(
+                    && aFonts.GetSelectEntry().equalsIgnoreAsciiCase(
                             pOrigSymbol->GetFace().GetName())
                     && aStyles.GetText().equalsIgnoreAsciiCase(
                             GetFontStyles().GetStyleName(pOrigSymbol->GetFace()))
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 70f80d2..292a2de 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -1153,7 +1153,7 @@ sal_Bool SwFldVarPage::FillItemSet(SfxItemSet& )
         {
             nSubType = (nFormat == ULONG_MAX) ? nsSwGetSetExpType::GSE_STRING : nsSwGetSetExpType::GSE_EXPR;
 
-            if (nFormat == ULONG_MAX && aNumFormatLB.GetSelectEntry().Equals(SW_RESSTR(FMT_USERVAR_CMD)))
+            if (nFormat == ULONG_MAX && aNumFormatLB.GetSelectEntry() == SW_RESSTR(FMT_USERVAR_CMD))
                 nSubType |= nsSwExtendedSubType::SUB_CMD;
 
             if (aInvisibleCB.IsChecked())
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index d98b2d8..c90851e 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2632,7 +2632,7 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken)
     if(aAuthInsertPB.IsVisible())
     {
         bool bText = TOKEN_TEXT == pToken->eTokenType;
-        aAuthInsertPB.Enable(bText && aAuthFieldsLB.GetSelectEntry().Len());
+        aAuthInsertPB.Enable(bText && !aAuthFieldsLB.GetSelectEntry().isEmpty());
         aAuthRemovePB.Enable(!bText);
     }
 
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index c754910..1e1d863 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1217,7 +1217,7 @@ IMPL_LINK( SwAuthorMarkPane, CompEntryHdl, ListBox*, pBox)
                             pEntry->GetAuthorField((ToxAuthorityField)i) : OUString();
         }
     }
-    if(!pBox->GetSelectEntry().Len())
+    if (pBox->GetSelectEntry().isEmpty())
     {
         for(sal_uInt16 i = 0; i < AUTH_FIELD_END; i++)
             m_sFields[i] = aEmptyStr;
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index fa9c420..f72b2a2 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -1090,7 +1090,7 @@ sal_uInt16 ListBox::GetEntryCount() const
 }
 
 
-XubString ListBox::GetSelectEntry( sal_uInt16 nIndex ) const
+OUString ListBox::GetSelectEntry(sal_uInt16 nIndex) const
 {
     return GetEntry( GetSelectEntryPos( nIndex ) );
 }


More information about the Libreoffice-commits mailing list