[Libreoffice-commits] .: 6 commits - comphelper/inc comphelper/qa cui/source sot/source svtools/inc svtools/source svx/inc svx/source sw/source unotools/inc unotools/source unusedcode.easy vcl/inc vcl/source xmloff/inc xmloff/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Nov 10 01:53:37 PST 2011


 comphelper/inc/comphelper/string.hxx   |   23 +++++
 comphelper/qa/string/test_string.cxx   |   19 ++++
 cui/source/dialogs/hltpbase.cxx        |   29 ------
 cui/source/inc/hltpbase.hxx            |    1 
 cui/source/options/optinet2.hxx        |    1 
 sot/source/sdstor/stgole.cxx           |    6 -
 sot/source/sdstor/storinfo.cxx         |    7 -
 svtools/inc/svtools/imap.hxx           |    4 
 svtools/inc/svtools/transfer.hxx       |    2 
 svtools/source/filter/filter2.cxx      |   54 +++++------
 svtools/source/misc/imap2.cxx          |   27 +++--
 svtools/source/misc/transfer.cxx       |   31 +++---
 svtools/source/misc/transfer2.cxx      |    4 
 svx/inc/svx/contdlg.hxx                |    4 
 svx/inc/svx/fntctrl.hxx                |    1 
 svx/inc/svx/strarray.hxx               |    2 
 svx/inc/svx/svdhdl.hxx                 |    3 
 svx/inc/svx/svdhlpln.hxx               |    5 -
 svx/inc/svx/svdpntv.hxx                |    2 
 svx/source/dialog/_contdlg.cxx         |    8 -
 svx/source/dialog/fntctrl.cxx          |   24 +----
 svx/source/dialog/strarray.cxx         |   29 ------
 svx/source/gallery2/galobj.cxx         |    4 
 svx/source/svdraw/svdedxv.cxx          |   12 --
 svx/source/svdraw/svdhdl.cxx           |   17 ---
 svx/source/svdraw/svdhlpln.cxx         |   18 ---
 svx/source/svdraw/svdpntv.cxx          |    5 -
 svx/source/unodraw/unoshap2.cxx        |    4 
 svx/source/xml/xmlgrhlp.cxx            |   18 +--
 sw/source/core/inc/viewimp.hxx         |    7 -
 sw/source/core/view/viewimp.cxx        |    7 -
 sw/source/ui/inc/swuicnttab.hxx        |    1 
 sw/source/ui/index/cnttab.cxx          |   11 --
 unotools/inc/unotools/inetoptions.hxx  |   38 --------
 unotools/source/config/inetoptions.cxx |   63 -------------
 unusedcode.easy                        |   13 --
 vcl/inc/vcl/graphictools.hxx           |    2 
 vcl/source/gdi/graphictools.cxx        |  151 ---------------------------------
 xmloff/inc/xmloff/nmspmap.hxx          |    3 
 xmloff/source/core/nmspmap.cxx         |   14 ---
 40 files changed, 130 insertions(+), 544 deletions(-)

New commits:
commit 58692c30e390d24c20108a7c3140d96638898696
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 10 09:28:22 2011 +0000

    callcatcher: remove unused methods

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index c577095..4b6fd2c 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -513,35 +513,6 @@ SvxMacroTableDtor* SvxHyperlinkTabPageBase::GetMacroTable()
 
 /*************************************************************************
 |*
-|* Does the given file exists ?
-|*
-|************************************************************************/
-
-sal_Bool SvxHyperlinkTabPageBase::FileExists( const INetURLObject& rURL )
-{
-    sal_Bool bRet = sal_False;
-
-    if( rURL.GetFull().getLength() > 0 )
-    {
-        try
-        {
-            Content     aCnt( rURL.GetMainURL( INetURLObject::NO_DECODE ), ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() );
-            ::rtl::OUString aTitle;
-
-            aCnt.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Title" ) ) ) >>= aTitle;
-            bRet = ( aTitle.getLength() > 0 );
-        }
-        catch( ... )
-        {
-            OSL_FAIL( "FileExists: ucb error" );
-        }
-    }
-
-    return bRet;
-}
-
-/*************************************************************************
-|*
 |* try to detect the current protocol that is used in aStrURL
 |*
 |************************************************************************/
diff --git a/cui/source/inc/hltpbase.hxx b/cui/source/inc/hltpbase.hxx
index b13fe07..686d561 100644
--- a/cui/source/inc/hltpbase.hxx
+++ b/cui/source/inc/hltpbase.hxx
@@ -147,7 +147,6 @@ protected:
 
     String              aEmptyStr;
 
-    sal_Bool            FileExists( const INetURLObject& rURL );
     static String   GetSchemeFromURL( String aStrURL );
 
     inline void     DisableClose( sal_Bool _bDisable ) { mbIsCloseDisabled = _bDisable; }
diff --git a/svx/inc/svx/contdlg.hxx b/svx/inc/svx/contdlg.hxx
index 26e30a8..cb88430 100644
--- a/svx/inc/svx/contdlg.hxx
+++ b/svx/inc/svx/contdlg.hxx
@@ -49,10 +49,6 @@ class SVX_DLLPUBLIC SvxContourDlgChildWindow : public SfxChildWindow
     SvxContourDlgChildWindow( Window*, sal_uInt16, SfxBindings*, SfxChildWinInfo* );
 
     SFX_DECL_CHILDWINDOW( SvxContourDlgChildWindow );
-
-    static void UpdateContourDlg( const Graphic& rGraphic, sal_Bool bGraphicLinked,
-                                  const PolyPolygon* pPolyPoly = NULL,
-                                  void* pEditingObj = NULL );
 };
 
 #ifndef _REDUCED_ContourDlg_HXX_
diff --git a/svx/inc/svx/strarray.hxx b/svx/inc/svx/strarray.hxx
index ba2d62e..2583612 100644
--- a/svx/inc/svx/strarray.hxx
+++ b/svx/inc/svx/strarray.hxx
@@ -43,8 +43,6 @@ public:
     ~SvxStringArray();
 
     const String&   GetStringByPos( sal_uInt32 nPos ) const;
-    const String&   GetStringByType( long nType ) const;
-    long            GetValueByStr( const String& rStr ) const;
 };
 
 
diff --git a/svx/inc/svx/svdhdl.hxx b/svx/inc/svx/svdhdl.hxx
index cadd4a4..91a067a 100644
--- a/svx/inc/svx/svdhdl.hxx
+++ b/svx/inc/svx/svdhdl.hxx
@@ -460,7 +460,6 @@ protected:
     unsigned                    bRotateShear : 1;
     unsigned                    bDistortShear : 1;
     unsigned                    bMoveOutside : 1;      // Handles nach aussen ruecken (fuer TextEdit)
-    unsigned                    bFineHandles : 1;
 
 private:
     SVX_DLLPRIVATE SdrHdlList(const SdrHdlList&): aList(1024,64,64)  {}
@@ -497,8 +496,6 @@ public:
     sal_Bool IsRotateShear() const                     { return bRotateShear; }
     void     SetDistortShear(sal_Bool bOn);
     sal_Bool IsDistortShear() const                    { return bDistortShear; }
-    void     SetFineHdl(sal_Bool bOn);
-    sal_Bool IsFineHdl() const                        { return bFineHandles; }
 
     // AddHdl uebernimmt das Handle in sein Eigentum. Es muss
     // also auf dem Heap stehen, da Clear() ein delete macht.
diff --git a/svx/inc/svx/svdhlpln.hxx b/svx/inc/svx/svdhlpln.hxx
index a6a11d4..0106c2d 100644
--- a/svx/inc/svx/svdhlpln.hxx
+++ b/svx/inc/svx/svdhlpln.hxx
@@ -70,11 +70,6 @@ public:
     bool            IsHit(const Point& rPnt, sal_uInt16 nTolLog, const OutputDevice& rOut) const;
     // OutputDevice wird benoetigt, da Fangpunkte eine feste Pixelgroesse haben
     Rectangle       GetBoundRect(const OutputDevice& rOut) const;
-
-    /* returns true if this and the given help line would be rendered at the same pixel position
-        of the given OutputDevice. This can be used to avoid drawing multiple help lines with xor
-        on same position which could render them invisible */
-    bool            IsVisibleEqual( const SdrHelpLine& rHelpLine, const OutputDevice& rOut ) const;
 };
 
 #define SDRHELPLINE_NOTFOUND 0xFFFF
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index a100128..24e9e3b 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -105,14 +105,6 @@ SvxContourDlgChildWindow::SvxContourDlgChildWindow( Window* _pParent, sal_uInt16
     pDlg->Initialize( pInfo );
 }
 
-void SvxContourDlgChildWindow::UpdateContourDlg( const Graphic& rGraphic, sal_Bool bGraphicLinked,
-                                                 const PolyPolygon* pPolyPoly, void* pEditingObj )
-{
-    if ( SfxViewFrame::Current() &&
-         SfxViewFrame::Current()->HasChildWindow( SvxContourDlgChildWindow::GetChildWindowId() ) )
-        SVXCONTOURDLG()->Update( rGraphic, bGraphicLinked, pPolyPoly, pEditingObj );
-}
-
 SvxContourDlg::SvxContourDlg( SfxBindings* _pBindings, SfxChildWindow* pCW,
                               Window* _pParent, const ResId& rResId ) :
 
diff --git a/svx/source/dialog/strarray.cxx b/svx/source/dialog/strarray.cxx
index 10b4f07..ae0c446 100644
--- a/svx/source/dialog/strarray.cxx
+++ b/svx/source/dialog/strarray.cxx
@@ -69,33 +69,4 @@ const String& SvxStringArray::GetStringByPos( sal_uInt32 nPos ) const
         return String::EmptyString();
 }
 
-//------------------------------------------------------------------------
-
-const String& SvxStringArray::GetStringByType( long nType ) const
-{
-    sal_uInt32 nPos = FindIndex( nType );
-
-    if ( RESARRAY_INDEX_NOTFOUND != nPos && nPos < Count() )
-        return ResStringArray::GetString( nPos );
-    else
-        return String::EmptyString();
-}
-
-//------------------------------------------------------------------------
-
-long SvxStringArray::GetValueByStr( const String& rStr ) const
-{
-    long nType = 0;
-    sal_uInt32 nCount = Count();
-
-    for ( sal_uInt32 i = 0; i < nCount; ++i )
-        if ( rStr == ResStringArray::GetString( i ) )
-        {
-            nType = GetValue( i );
-            break;
-        }
-    return nType;
-}
-
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index 98cd7a8..75146b8 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -2029,7 +2029,6 @@ SdrHdlList::SdrHdlList(SdrMarkView* pV)
     bRotateShear = sal_False;
     bMoveOutside = sal_False;
     bDistortShear = sal_False;
-    bFineHandles = sal_False;
 }
 
 SdrHdlList::~SdrHdlList()
@@ -2079,22 +2078,6 @@ void SdrHdlList::SetDistortShear(sal_Bool bOn)
     bDistortShear = bOn;
 }
 
-void SdrHdlList::SetFineHdl(sal_Bool bOn)
-{
-    if(bFineHandles != bOn)
-    {
-        // remember new state
-        bFineHandles = bOn;
-
-        // propagate change to IAOs
-        for(sal_uInt32 i=0; i<GetHdlCount(); i++)
-        {
-            SdrHdl* pHdl = GetHdl(i);
-            pHdl->Touch();
-        }
-    }
-}
-
 SdrHdl* SdrHdlList::RemoveHdl(sal_uIntPtr nNum)
 {
     SdrHdl* pRetval = (SdrHdl*)aList.Remove(nNum);
diff --git a/svx/source/svdraw/svdhlpln.cxx b/svx/source/svdraw/svdhlpln.cxx
index 30d4dd3..21ef6a2 100644
--- a/svx/source/svdraw/svdhlpln.cxx
+++ b/svx/source/svdraw/svdhlpln.cxx
@@ -86,24 +86,6 @@ Rectangle SdrHelpLine::GetBoundRect(const OutputDevice& rOut) const
     return aRet;
 }
 
-bool SdrHelpLine::IsVisibleEqual( const SdrHelpLine& rHelpLine, const OutputDevice& rOut ) const
-{
-    if( eKind == rHelpLine.eKind)
-    {
-        Point aPt1(rOut.LogicToPixel(aPos)), aPt2(rOut.LogicToPixel(rHelpLine.aPos));
-        switch( eKind )
-        {
-            case SDRHELPLINE_POINT:
-                return aPt1 == aPt2;
-            case SDRHELPLINE_VERTICAL:
-                return aPt1.X() == aPt2.X();
-            case SDRHELPLINE_HORIZONTAL:
-                return aPt1.Y() == aPt2.Y();
-        }
-    }
-    return false;
-}
-
 void SdrHelpLineList::Clear()
 {
     sal_uInt16 nAnz=GetCount();
diff --git a/sw/source/core/inc/viewimp.hxx b/sw/source/core/inc/viewimp.hxx
index cc94622..aefc22d 100755
--- a/sw/source/core/inc/viewimp.hxx
+++ b/sw/source/core/inc/viewimp.hxx
@@ -109,13 +109,6 @@ class SwViewImp
     SwPagePreviewLayout* mpPgPrevwLayout;
 
     /**
-        Signal whether to stop printing.
-
-        @param _useless just to fit macro
-    */
-    DECL_LINK(SetStopPrt, void * _useless = NULL);
-
-    /**
        Returns if printer shall be stopped.
 
        @retval sal_True The printer shall be stopped.
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index a1ea19b..7c053e0 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -465,11 +465,4 @@ void SwViewImp::FireAccessibleEvents()
         GetAccessibleMap().FireEvents();
 }
 
-IMPL_LINK(SwViewImp, SetStopPrt, void *, EMPTYARG)
-{
-    bStopPrt = sal_True;
-
-    return 0;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/inc/swuicnttab.hxx b/sw/source/ui/inc/swuicnttab.hxx
index a2ff8e8..727cdae 100644
--- a/sw/source/ui/inc/swuicnttab.hxx
+++ b/sw/source/ui/inc/swuicnttab.hxx
@@ -222,7 +222,6 @@ class SwTOXSelectTabPage : public SfxTabPage
     sal_Bool            bFirstCall;
 
     DECL_LINK(TOXTypeHdl,   ListBox* );
-    DECL_LINK(TOXAreaHdl,   ListBox* );
     DECL_LINK(AddStylesHdl, PushButton* );
     DECL_LINK(MenuEnableHdl, Menu*);
     DECL_LINK(MenuExecuteHdl, Menu*);
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index fa75af6..3fc515d 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -1553,17 +1553,6 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox)
     return 0;
 };
 
-IMPL_LINK(SwTOXSelectTabPage, TOXAreaHdl,   ListBox*, pBox)
-{
-    OSL_FAIL("not implemented");
-    switch((long)pBox->GetEntryData( pBox->GetSelectEntryPos() ))
-    {
-        case AREA_DOCUMENT  : break;
-        case AREA_CHAPTER   : break;
-    }
-    return 0;
-}
-
 IMPL_LINK(SwTOXSelectTabPage, AddStylesHdl, PushButton*, pButton)
 {
     SwAddStylesDlg_Impl* pDlg = new SwAddStylesDlg_Impl(pButton,
diff --git a/unotools/source/config/inetoptions.cxx b/unotools/source/config/inetoptions.cxx
index 5d74102..1995a1a 100644
--- a/unotools/source/config/inetoptions.cxx
+++ b/unotools/source/config/inetoptions.cxx
@@ -105,18 +105,6 @@ public:
 
     inline void flush() { Commit(); }
 
-    void
-    addPropertiesChangeListener(
-        star::uno::Sequence< rtl::OUString > const & rPropertyNames,
-        star::uno::Reference< star::beans::XPropertiesChangeListener > const &
-            rListener);
-
-    void
-    removePropertiesChangeListener(
-        star::uno::Sequence< rtl::OUString > const & rPropertyNames,
-        star::uno::Reference< star::beans::XPropertiesChangeListener > const &
-            rListener);
-
 private:
     enum { ENTRY_COUNT = INDEX_HTTP_PROXY_PORT + 1 };
 
@@ -361,37 +349,6 @@ void SvtInetOptions::Impl::setProperty(Index nIndex,
 }
 
 //============================================================================
-void
-SvtInetOptions::Impl::addPropertiesChangeListener(
-    star::uno::Sequence< rtl::OUString > const & rPropertyNames,
-    star::uno::Reference< star::beans::XPropertiesChangeListener > const &
-        rListener)
-{
-    osl::MutexGuard aGuard(m_aMutex);
-    Map::mapped_type & rEntry = m_aListeners[rListener];
-    for (sal_Int32 i = 0; i < rPropertyNames.getLength(); ++i)
-        rEntry.insert(rPropertyNames[i]);
-}
-
-//============================================================================
-void
-SvtInetOptions::Impl::removePropertiesChangeListener(
-    star::uno::Sequence< rtl::OUString > const & rPropertyNames,
-    star::uno::Reference< star::beans::XPropertiesChangeListener > const &
-        rListener)
-{
-    osl::MutexGuard aGuard(m_aMutex);
-    Map::iterator aIt(m_aListeners.find(rListener));
-    if (aIt != m_aListeners.end())
-    {
-        for (sal_Int32 i = 0; i < rPropertyNames.getLength(); ++i)
-            aIt->second.erase(rPropertyNames[i]);
-        if (aIt->second.empty())
-            m_aListeners.erase(aIt);
-    }
-}
-
-//============================================================================
 //
 //  SvtInetOptions
 //
diff --git a/unusedcode.easy b/unusedcode.easy
index 7280eb2..d2be88e 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -520,7 +520,6 @@ SdrGrafObj::SetFileName(String const&)
 SdrGrafObj::SetFilterName(String const&)
 SdrGrafObj::StopAnimation(OutputDevice*, long)
 SdrHdl::isMouseOver() const
-SdrHelpLine::IsVisibleEqual(SdrHelpLine const&, OutputDevice const&) const
 SdrHint::GetObjList() const
 SdrHint::GetRect() const
 SdrHint::SdrHint()
@@ -750,8 +749,6 @@ SvXMLImport::SetError(int, rtl::OUString const&, rtl::OUString const&, rtl::OUSt
 SvXMLImport::SetError(int, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&)
 SvXMLImportContexts_Impl::DeleteAndDestroy(unsigned short, unsigned short)
 SvXMLImportPropertyMapper::importXML(std::__debug::vector<XMLPropertyState, std::allocator<XMLPropertyState> >&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>, SvXMLUnitConverter const&, SvXMLNamespaceMap const&, unsigned int) const
-SvXMLNamespaceMap::AddAtIndex(unsigned short, char const*, char const*, unsigned short)
-SvXMLNamespaceMap::GetKeyByIndex(unsigned short) const
 SvXMLNumFormatContext::AddCondition(int, rtl::OUString const&, LocaleDataWrapper const&)
 SvXMLStyleIndices_Impl::GetPos(SvXMLStyleIndex_Impl const*) const
 SvXMLStyleIndices_Impl::Remove(SvXMLStyleIndex_Impl*)
@@ -791,7 +788,6 @@ SvtGraphicFill::setHatchType(SvtGraphicFill::HatchType)
 SvtGraphicFill::setTiling(bool)
 SvtGraphicFill::setTransform(SvtGraphicFill::Transform const&)
 SvtGraphicFill::setTransparency(double)
-SvtGraphicFill::toString() const
 SvtGraphicStroke::setCapType(SvtGraphicStroke::CapType)
 SvtGraphicStroke::setDashArray(std::__debug::vector<double, std::allocator<double> > const&)
 SvtGraphicStroke::setEndArrow(PolyPolygon const&)
@@ -905,7 +901,6 @@ SvxContourDlg::SetExecState(unsigned char)
 SvxContourDlg::SetGraphic(Graphic const&)
 SvxContourDlg::SetGraphicLinked(unsigned char)
 SvxContourDlg::SetPolyPolygon(PolyPolygon const&)
-SvxContourDlgChildWindow::UpdateContourDlg(Graphic const&, unsigned char, PolyPolygon const*, void*)
 SvxDoCapitals::Do(String const&, unsigned short, unsigned short, unsigned char)
 SvxDrawOutlinerViewForwarder::SetShapePos(Point const&)
 SvxDrawPage::GetPageForSdrPage(SdrPage*)
@@ -922,7 +917,6 @@ SvxGraphCtrlAccessibleContext::setDescription(rtl::OUString const&)
 SvxGraphCtrlAccessibleContext::setName(rtl::OUString const&)
 SvxHtmlOptions::AddListenerLink(Link const&)
 SvxHtmlOptions::RemoveListenerLink(Link const&)
-SvxHyperlinkTabPageBase::FileExists(INetURLObject const&)
 SvxIMapDlg::GetTargetList() const
 SvxIconChoiceCtrlEntry::LockPos(unsigned char)
 SvxInsertStatusBarControl::GetDefItemWidth(StatusBar const&)
@@ -980,8 +974,6 @@ SvxShapePolyPolygonBezier::GetPolygonKind() const
 SvxShapeText::SvxShapeText()
 SvxSimpleTable::ClearAll()
 SvxSimpleTable::TableToTop()
-SvxStringArray::GetStringByType(long) const
-SvxStringArray::GetValueByStr(String const&) const
 SvxSuperContourDlg::DoAutoCreate()
 SvxSuperContourDlg::ReducePoints(long)
 SvxTPFilter::DisableRange(unsigned char)
@@ -1088,7 +1080,6 @@ SwSortTableLines::Remove(SwTableLine* const&, unsigned short)
 SwSortTableLines::Remove(unsigned short, unsigned short)
 SwSyncChildWin::GetChildWindowId()
 SwTOXMarks::DeleteAndDestroy(unsigned short, unsigned short)
-SwTOXSelectTabPage::LinkStubTOXAreaHdl(void*, void*)
 SwTOXSources::Insert(SwTOXSources const*, unsigned short, unsigned short, unsigned short)
 SwTOXSources::Remove(unsigned short, unsigned short)
 SwTOXSources::Replace(SwTOXSource const&, unsigned short)
@@ -1105,7 +1096,6 @@ SwVbaStyle::getOOoStyleTypeFromMSWord(int)
 SwVbaTableHelper::setTableWidth(int)
 SwView::LinkStubHtmlOptionsHdl(void*, void*)
 SwView::LinkStubSpellError(void*, void*)
-SwViewImp::LinkStubSetStopPrt(void*, void*)
 SwWriteTableCols::Insert(SwWriteTableCol* const&, unsigned short&)
 SwWriteTableCols::Insert(SwWriteTableCol* const*, unsigned short)
 SwWriteTableCols::Insert(SwWriteTableCols const*, unsigned short, unsigned short)
diff --git a/vcl/inc/vcl/graphictools.hxx b/vcl/inc/vcl/graphictools.hxx
index 333c916..3e0afda 100644
--- a/vcl/inc/vcl/graphictools.hxx
+++ b/vcl/inc/vcl/graphictools.hxx
@@ -389,8 +389,6 @@ public:
         it to the appropriate size.
      */
     void            getGraphic          ( Graphic& ) const;
-    /// Query a textual representation of the object's content
-    ::rtl::OString  toString            () const;
 
     // mutators
     /// Set path to fill
diff --git a/vcl/source/gdi/graphictools.cxx b/vcl/source/gdi/graphictools.cxx
index 251261d..14a0fa2 100644
--- a/vcl/source/gdi/graphictools.cxx
+++ b/vcl/source/gdi/graphictools.cxx
@@ -98,21 +98,6 @@ static ::rtl::OString dashToString( const SvtGraphicStroke::DashArray& rDashArra
     return aStr;
 }
 
-static ::rtl::OString colorToString( Color aColor )
-{
-    ::rtl::OString aStr;
-
-    aStr += "color: [ ";
-    aStr += ::rtl::OString::valueOf( aColor.GetRed() );
-    aStr += " ";
-    aStr += ::rtl::OString::valueOf( aColor.GetGreen() );
-    aStr += " ";
-    aStr += ::rtl::OString::valueOf( aColor.GetBlue() );
-    aStr += " ] ";
-
-    return aStr;
-}
-
 ////////////////////////////////////////////////////////////////////////////
 
 SvtGraphicFill::Transform::Transform()
@@ -494,142 +479,6 @@ void SvtGraphicFill::getGraphic( Graphic& rGraphic ) const
     rGraphic = maFillGraphic;
 }
 
-::rtl::OString SvtGraphicFill::toString() const
-{
-    ::rtl::OString aStr;
-
-    aStr += polyPolyToString( maPath );
-    aStr += "fill";
-    aStr += colorToString( getFillColor() );
-    aStr += " trans: ";
-    aStr += ::rtl::OString::valueOf( static_cast< double >(getTransparency()) );
-    aStr += " rule: ";
-    switch( getFillRule() )
-    {
-        case fillNonZero:
-            aStr += "nonzero";
-            break;
-
-        case fillEvenOdd:
-            aStr += "evenodd";
-            break;
-
-        default:
-            OSL_FAIL( "SvtGraphicFill::toString missing fill rule");
-            break;
-    }
-    aStr += " type: ";
-    switch( getFillType() )
-    {
-        case fillSolid:
-            aStr += "solid";
-            break;
-
-        case fillGradient:
-            aStr += "gradient";
-            break;
-
-        case fillHatch:
-            aStr += "hatch";
-            break;
-
-        case fillTexture:
-            aStr += "bitmap";
-            break;
-
-        default:
-            OSL_FAIL( "SvtGraphicStroke::toString missing fill type");
-            break;
-    }
-
-    aStr += " transform: [ ";
-    int i;
-    for(i=0; i<Transform::MatrixSize; ++i)
-        aStr += ::rtl::OString::valueOf( maFillTransform.matrix[i] );
-    aStr += " ] ";
-
-    aStr += " hatch: ";
-    switch( getHatchType() )
-    {
-        case hatchSingle:
-            aStr += "single";
-            break;
-
-        case hatchDouble:
-            aStr += "double";
-            break;
-
-        case hatchTriple:
-            aStr += "triple";
-            break;
-
-        default:
-            OSL_FAIL( "SvtGraphicStroke::toString missing hatch type");
-            break;
-    }
-
-    aStr += " hatch";
-    aStr += colorToString( getHatchColor() );
-
-    aStr += " gradient: ";
-    switch( getGradientType() )
-    {
-        case gradientLinear:
-            aStr += "linear";
-            break;
-
-        case gradientRadial:
-            aStr += "radial";
-            break;
-
-        case gradientRectangular:
-            aStr += "rectangular";
-            break;
-
-        default:
-            OSL_FAIL( "SvtGraphicStroke::toString missing gradient type");
-            break;
-    }
-
-    aStr += " grad1st";
-    aStr += colorToString( getGradient1stColor() );
-
-    aStr += " grad2nd";
-    aStr += colorToString( getGradient2ndColor() );
-
-    aStr += " gradstep";
-    aStr += ::rtl::OString::valueOf( (sal_Int32)getGradientStepCount() );
-
-    if( maFillGraphic.GetType() != GRAPHIC_NONE )
-    {
-        aStr += " fillgraphic: ";
-        switch( maFillGraphic.GetType() )
-        {
-            case GRAPHIC_BITMAP:
-                aStr += "bitmap";
-                break;
-
-            case GRAPHIC_GDIMETAFILE:
-                aStr += "metafile";
-                break;
-
-            case GRAPHIC_DEFAULT:
-                aStr += "default";
-                break;
-
-            default:
-                OSL_FAIL( "SvtGraphicStroke::toString missing graphic type");
-                break;
-        }
-
-        aStr += " of ";
-        aStr += ::rtl::OString::valueOf( static_cast< sal_Int32 >(maFillGraphic.GetSizeBytes()) );
-        aStr += " bytes";
-    }
-
-    return aStr;
-}
-
 void SvtGraphicFill::setPath( const PolyPolygon& rPath )
 {
     maPath = rPath;
diff --git a/xmloff/inc/xmloff/nmspmap.hxx b/xmloff/inc/xmloff/nmspmap.hxx
index e56983a..79139ef 100644
--- a/xmloff/inc/xmloff/nmspmap.hxx
+++ b/xmloff/inc/xmloff/nmspmap.hxx
@@ -159,10 +159,7 @@ public:
 
 /* deprecated */ sal_Bool AddAtIndex( sal_uInt16 nIdx, const ::rtl::OUString& rPrefix,
                      const ::rtl::OUString& rName, sal_uInt16 nKey = XML_NAMESPACE_UNKNOWN );
-/* deprecated */ sal_Bool AddAtIndex( sal_uInt16 nIdx, const sal_Char *pPrefix,
-                     const sal_Char *pName, sal_uInt16 nKey = XML_NAMESPACE_UNKNOWN );
 /* deprecated */ sal_uInt16 GetIndexByKey( sal_uInt16 nKey ) const;
-/* deprecated */ sal_uInt16 GetKeyByIndex( sal_uInt16 nIdx ) const;
 /* deprecated */ sal_uInt16 GetIndexByPrefix( const ::rtl::OUString& rPrefix ) const;
 /* deprecated */ sal_uInt16 GetFirstIndex() const;
 /* deprecated */ sal_uInt16 GetNextIndex( sal_uInt16 nOldIdx ) const;
diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx
index 977bf46..373c747 100644
--- a/xmloff/source/core/nmspmap.cxx
+++ b/xmloff/source/core/nmspmap.cxx
@@ -382,11 +382,6 @@ sal_uInt16 SvXMLNamespaceMap::GetNextKey( sal_uInt16 nLastKey ) const
 
 // All methods after this are deprecated...
 
-sal_uInt16 SvXMLNamespaceMap::GetKeyByIndex( sal_uInt16 nIdx ) const
-{
-    return nIdx;
-}
-
 sal_uInt16 SvXMLNamespaceMap::GetIndexByKey( sal_uInt16 nKey ) const
 {
     return nKey;
@@ -420,15 +415,6 @@ sal_Bool SvXMLNamespaceMap::AddAtIndex( sal_uInt16 /*nIdx*/, const OUString& rPr
     return bRet;
 }
 
-sal_Bool SvXMLNamespaceMap::AddAtIndex( sal_uInt16 nIdx, const sal_Char *pPrefix,
-                                     const sal_Char *pName, sal_uInt16 nKey )
-{
-    OUString sPrefix( OUString::createFromAscii(pPrefix) );
-    OUString sName( OUString::createFromAscii(pName) );
-
-    return AddAtIndex( nIdx, sPrefix, sName, nKey );
-}
-
 OUString SvXMLNamespaceMap::GetAttrNameByIndex( sal_uInt16 nIdx ) const
 {
     return GetAttrNameByKey( nIdx );
commit 8c69b4db58ce820e27c96dc0f33890b6946a5f4c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 10 08:51:23 2011 +0000

    bNoLines is always false

diff --git a/svx/inc/svx/fntctrl.hxx b/svx/inc/svx/fntctrl.hxx
index f625d6e..e71816d 100644
--- a/svx/inc/svx/fntctrl.hxx
+++ b/svx/inc/svx/fntctrl.hxx
@@ -80,7 +80,6 @@ public:
 
     sal_Bool            IsTwoLines() const;
     void                SetTwoLines(sal_Bool bSet);
-    void                SetNoLines(sal_Bool bSet);
 
     void                SetBrackets(sal_Unicode cStart, sal_Unicode cEnd);
 
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 33971f8..73f60c4 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -176,7 +176,6 @@ class FontPrevWin_Impl
                                     bDrawBaseLine   : 1,
                                     bPreviewBackgroundToCharacter : 1,
                                     bTwoLines       : 1,
-                                    bNoLines        : 1,
                                     bUseFontNameAsText : 1,
                                     bTextInited     : 1;
 
@@ -192,7 +191,6 @@ public:
         cStartBracket( 0 ), cEndBracket( 0 ), nFontWidthScale( 100 ),
         bSelection( sal_False ), bGetSelection( sal_False ), bUseResText( sal_False ),
         bDrawBaseLine( sal_True ), bPreviewBackgroundToCharacter( sal_False ), bTwoLines( sal_False ),
-        bNoLines( sal_False ),
         bUseFontNameAsText( sal_False ), bTextInited( sal_False )
     {
         SvtLanguageOptions aLanguageOptions;
@@ -819,18 +817,15 @@ void SvxFontPrevWindow::Paint( const Rectangle& )
         else
         {
 
-            if (!pImpl->bNoLines)
-            {
-                Color aLineCol = GetLineColor();
+            Color aLineCol = GetLineColor();
 
-                SetLineColor( rFont.GetColor() );
-                if ( pImpl->bDrawBaseLine )
-                {
-                    DrawLine( Point( 0,  nY ), Point( nX, nY ) );
-                    DrawLine( Point( nX + aTxtSize.Width(), nY ), Point( aLogSize.Width(), nY ) );
-                }
-                SetLineColor( aLineCol );
+            SetLineColor( rFont.GetColor() );
+            if ( pImpl->bDrawBaseLine )
+            {
+                DrawLine( Point( 0,  nY ), Point( nX, nY ) );
+                DrawLine( Point( nX + aTxtSize.Width(), nY ), Point( aLogSize.Width(), nY ) );
             }
+            SetLineColor( aLineCol );
 
             Point aTmpPoint( nX, nY );
             pImpl->DrawPrev( this, pPrinter, aTmpPoint, rFont );
@@ -848,11 +843,6 @@ void SvxFontPrevWindow::SetTwoLines(sal_Bool bSet)
     pImpl->bTwoLines = bSet;
 }
 
-void SvxFontPrevWindow::SetNoLines(sal_Bool bSet)
-{
-    pImpl->bNoLines = bSet;
-}
-
 void SvxFontPrevWindow::SetBrackets(sal_Unicode cStart, sal_Unicode cEnd)
 {
     pImpl->cStartBracket = cStart;
commit b3a9e9c728c8fc2e54e31c2a7bbabab37a303571
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 9 22:47:30 2011 +0000

    callcatcher: remove some unused methods

diff --git a/cui/source/options/optinet2.hxx b/cui/source/options/optinet2.hxx
index 15dc1f8..1978a4d 100644
--- a/cui/source/options/optinet2.hxx
+++ b/cui/source/options/optinet2.hxx
@@ -46,7 +46,6 @@ class HeaderBar;
 #include <readonlyimage.hxx>
 
 class SfxFilter;
-class SvtInetOptions;
 
 #ifndef SV_NODIALOG
 #define PROXY_CONTROLS  23
diff --git a/svx/inc/svx/svdpntv.hxx b/svx/inc/svx/svdpntv.hxx
index e345093..3240a4f 100644
--- a/svx/inc/svx/svdpntv.hxx
+++ b/svx/inc/svx/svdpntv.hxx
@@ -563,8 +563,6 @@ public:
     sal_Bool IsPrintPreview() const { return bPrintPreview; }
     void SetPrintPreview(bool bOn = true) { bPrintPreview=bOn; }
 
-    const svtools::ColorConfig& getColorConfig() const;
-
     virtual void onChangeColorConfig();
 
     // #103834# Set background color for svx at SdrPageViews
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index b452f4e..92ffdcc 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -1469,11 +1469,6 @@ void SdrPaintView::VisAreaChanged(const SdrPageWindow& /*rWindow*/)
     Broadcast(SvxViewHint(SvxViewHint::SVX_HINT_VIEWCHANGED));
 }
 
-const svtools::ColorConfig& SdrPaintView::getColorConfig() const
-{
-    return maColorConfig;
-}
-
 void SdrPaintView::onChangeColorConfig()
 {
     SetGridColor( Color( maColorConfig.GetColorValue( svtools::DRAWGRID ).nColor ) );
diff --git a/unotools/inc/unotools/inetoptions.hxx b/unotools/inc/unotools/inetoptions.hxx
index 4207051..fb749d3 100644
--- a/unotools/inc/unotools/inetoptions.hxx
+++ b/unotools/inc/unotools/inetoptions.hxx
@@ -43,10 +43,6 @@ namespace rtl { class OUString; }
 //============================================================================
 /** The names of all the properties (options) accessible through
     SvtInetOptions.
-
-    @descr  These names are used in the methods
-    SvtInetOptions::addPropertiesChangeListener() and
-    SvtInetOptions::removePropertiesChangeListener().
  */
 #define SVT_INET_OPTION_PROXY_NO_PROXY "Inet/Proxy/NoProxy"
 #define SVT_INET_OPTION_PROXY_TYPE "Inet/Proxy/Type"
@@ -95,40 +91,6 @@ public:
 
     void flush();
 
-    /** Add a listener on changes of certain properties (options).
-
-        @param rPropertyNames  The names of the properties (options).  If an
-        empty sequence is used, nothing is done.
-
-        @param rListener  A listener.  If the listener is already registered
-        on other properties, it continues to also get notifications about
-        changes of those properties.  The
-        com::sun::star::beans::PropertyChangeEvents supplied to the listener
-        will have void OldValue and NewValue slots.
-     */
-    void
-    addPropertiesChangeListener(
-        com::sun::star::uno::Sequence< rtl::OUString > const & rPropertyNames,
-        com::sun::star::uno::Reference<
-                com::sun::star::beans::XPropertiesChangeListener > const &
-            rListener);
-
-    /** Remove a listener on changes of certain properties (options).
-
-        @param rPropertyNames  The names of the properties (options).  If an
-        empty sequence is used, nothing is done.
-
-        @param rListener  A listener.  If the listener is still registered on
-        other properties, it continues to get notifications about changes of
-        those properties.
-     */
-    void
-    removePropertiesChangeListener(
-        com::sun::star::uno::Sequence< rtl::OUString > const & rPropertyNames,
-        com::sun::star::uno::Reference<
-                com::sun::star::beans::XPropertiesChangeListener > const &
-            rListener);
-
 private:
     class Impl;
 
diff --git a/unotools/source/config/inetoptions.cxx b/unotools/source/config/inetoptions.cxx
index d851102..5d74102 100644
--- a/unotools/source/config/inetoptions.cxx
+++ b/unotools/source/config/inetoptions.cxx
@@ -530,24 +530,4 @@ void SvtInetOptions::flush()
     m_pImpl->flush();
 }
 
-//============================================================================
-void
-SvtInetOptions::addPropertiesChangeListener(
-    star::uno::Sequence< rtl::OUString > const & rPropertyNames,
-    star::uno::Reference< star::beans::XPropertiesChangeListener > const &
-        rListener)
-{
-    m_pImpl->addPropertiesChangeListener(rPropertyNames, rListener);
-}
-
-//============================================================================
-void
-SvtInetOptions::removePropertiesChangeListener(
-    star::uno::Sequence< rtl::OUString > const & rPropertyNames,
-    star::uno::Reference< star::beans::XPropertiesChangeListener > const &
-        rListener)
-{
-    m_pImpl->removePropertiesChangeListener(rPropertyNames, rListener);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/unusedcode.easy b/unusedcode.easy
index afee20e..7280eb2 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -556,7 +556,6 @@ SdrPaintView::PostPaint()
 SdrPaintView::SetAllLayersLocked(unsigned char)
 SdrPaintView::SetAllLayersPrintable(unsigned char)
 SdrPaintView::SetAllLayersVisible(unsigned char)
-SdrPaintView::getColorConfig() const
 SdrPaintWindow::HideOverlay(Region const&)
 SdrPolyEditView::ShutMarkedObjects()
 SdrSnapView::SnapRect(Rectangle const&, SdrPageView const*, long&, long&) const
@@ -813,8 +812,6 @@ SvtIconChoiceCtrl::InsertEntry(unsigned long, Point const*, unsigned short)
 SvtIconChoiceCtrl::SetUpdateMode(unsigned char)
 SvtIconChoiceCtrl::SvtIconChoiceCtrl(Window*, ResId const&)
 SvtIconWindow_Impl::GetSelectedIconText() const
-SvtInetOptions::addPropertiesChangeListener(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertiesChangeListener> const&)
-SvtInetOptions::removePropertiesChangeListener(com::sun::star::uno::Sequence<rtl::OUString> const&, com::sun::star::uno::Reference<com::sun::star::beans::XPropertiesChangeListener> const&)
 SvtInternalOptions::CrashMailEnabled() const
 SvtInternalOptions::IsRemoveMenuEntryBackToWebtop() const
 SvtInternalOptions::IsRemoveMenuEntryClose() const
commit 5dbd8286f4623015d6012d20ad24c301e57ca96f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 9 22:36:22 2011 +0000

    ByteString->rtl::OString

diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 8ae6af1..0917046 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -153,14 +153,14 @@ sal_Bool StgCompObjStream::Store()
     if( GetError() != SVSTREAM_OK )
         return sal_False;
     Seek( 0L );
-    ByteString aAsciiUserName( aUserName, RTL_TEXTENCODING_MS_1252 );
+    rtl::OString aAsciiUserName(rtl::OUStringToOString(aUserName, RTL_TEXTENCODING_MS_1252));
     *this << (sal_Int16) 1          // Version?
               << (sal_Int16) -2                     // 0xFFFE = Byte Order Indicator
               << (sal_Int32) 0x0A03         // Windows 3.10
               << (sal_Int32) -1L
               << aClsId             // Class ID
-              << (sal_Int32) (aAsciiUserName.Len() + 1)
-              << (const char *)aAsciiUserName.GetBuffer()
+              << (sal_Int32) (aAsciiUserName.getLength() + 1)
+              << (const char *)aAsciiUserName.getStr()
               << (sal_uInt8) 0;             // string terminator
     WriteClipboardFormat( *this, nCbFormat );
     *this << (sal_Int32) 0;             // terminator
diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx
index 5f1768b..4d609cb 100644
--- a/sot/source/sdstor/storinfo.cxx
+++ b/sot/source/sdstor/storinfo.cxx
@@ -82,9 +82,10 @@ void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat )
         aCbFmt = SotExchange::GetFormatName( nFormat );
     if( aCbFmt.Len() )
     {
-        ByteString aAsciiCbFmt( aCbFmt, RTL_TEXTENCODING_ASCII_US );
-        rStm << (sal_Int32) (aAsciiCbFmt.Len() + 1);
-        rStm << (const char *)aAsciiCbFmt.GetBuffer();
+        rtl::OString aAsciiCbFmt(rtl::OUStringToOString(aCbFmt,
+            RTL_TEXTENCODING_ASCII_US));
+        rStm << (sal_Int32) (aAsciiCbFmt.getLength() + 1);
+        rStm << (const char *)aAsciiCbFmt.getStr();
         rStm << (sal_uInt8) 0;
     }
     else if( nFormat )
diff --git a/svtools/inc/svtools/transfer.hxx b/svtools/inc/svtools/transfer.hxx
index 3b0d961..b62a813 100644
--- a/svtools/inc/svtools/transfer.hxx
+++ b/svtools/inc/svtools/transfer.hxx
@@ -569,7 +569,7 @@ public:
     void                CopyString( sal_uInt16 nFmt, const String& rStr );
     void                CopyAny( sal_uInt16 nFmt, const ::com::sun::star::uno::Any& rAny );
 
-    void                CopyByteString( sal_uLong nFormatId, const ByteString& rStr );
+    void                CopyByteString( sal_uLong nFormatId, const rtl::OString& rStr );
     void                CopyAnyData( sal_uLong nFormatId, const sal_Char* pData, sal_uLong nLen );
 
     sal_Bool            HasAnyData() const;
diff --git a/svtools/source/filter/filter2.cxx b/svtools/source/filter/filter2.cxx
index b973c9b..f8347c5 100644
--- a/svtools/source/filter/filter2.cxx
+++ b/svtools/source/filter/filter2.cxx
@@ -1318,38 +1318,38 @@ sal_Bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, sal_Bool /*bExtend
 
 String GraphicDescriptor::GetImportFormatShortName( sal_uInt16 nFormat )
 {
-    ByteString          aKeyName;
+    const char *pKeyName = 0;
 
     switch( nFormat )
     {
-        case( GFF_BMP ) :   aKeyName = "bmp";   break;
-        case( GFF_GIF ) :   aKeyName = "gif";   break;
-        case( GFF_JPG ) :   aKeyName = "jpg";   break;
-        case( GFF_PCD ) :   aKeyName = "pcd";   break;
-        case( GFF_PCX ) :   aKeyName = "pcx";   break;
-        case( GFF_PNG ) :   aKeyName = "png";   break;
-        case( GFF_XBM ) :   aKeyName = "xbm";   break;
-        case( GFF_XPM ) :   aKeyName = "xpm";   break;
-        case( GFF_PBM ) :   aKeyName = "pbm";   break;
-        case( GFF_PGM ) :   aKeyName = "pgm";   break;
-        case( GFF_PPM ) :   aKeyName = "ppm";   break;
-        case( GFF_RAS ) :   aKeyName = "ras";   break;
-        case( GFF_TGA ) :   aKeyName = "tga";   break;
-        case( GFF_PSD ) :   aKeyName = "psd";   break;
-        case( GFF_EPS ) :   aKeyName = "eps";   break;
-        case( GFF_TIF ) :   aKeyName = "tif";   break;
-        case( GFF_DXF ) :   aKeyName = "dxf";   break;
-        case( GFF_MET ) :   aKeyName = "met";   break;
-        case( GFF_PCT ) :   aKeyName = "pct";   break;
-        case( GFF_SGF ) :   aKeyName = "sgf";   break;
-        case( GFF_SGV ) :   aKeyName = "sgv";   break;
-        case( GFF_SVM ) :   aKeyName = "svm";   break;
-        case( GFF_WMF ) :   aKeyName = "wmf";   break;
-        case( GFF_EMF ) :   aKeyName = "emf";   break;
-        case( GFF_SVG ) :   aKeyName = "svg";   break;
+        case( GFF_BMP ) :   pKeyName = "bmp";   break;
+        case( GFF_GIF ) :   pKeyName = "gif";   break;
+        case( GFF_JPG ) :   pKeyName = "jpg";   break;
+        case( GFF_PCD ) :   pKeyName = "pcd";   break;
+        case( GFF_PCX ) :   pKeyName = "pcx";   break;
+        case( GFF_PNG ) :   pKeyName = "png";   break;
+        case( GFF_XBM ) :   pKeyName = "xbm";   break;
+        case( GFF_XPM ) :   pKeyName = "xpm";   break;
+        case( GFF_PBM ) :   pKeyName = "pbm";   break;
+        case( GFF_PGM ) :   pKeyName = "pgm";   break;
+        case( GFF_PPM ) :   pKeyName = "ppm";   break;
+        case( GFF_RAS ) :   pKeyName = "ras";   break;
+        case( GFF_TGA ) :   pKeyName = "tga";   break;
+        case( GFF_PSD ) :   pKeyName = "psd";   break;
+        case( GFF_EPS ) :   pKeyName = "eps";   break;
+        case( GFF_TIF ) :   pKeyName = "tif";   break;
+        case( GFF_DXF ) :   pKeyName = "dxf";   break;
+        case( GFF_MET ) :   pKeyName = "met";   break;
+        case( GFF_PCT ) :   pKeyName = "pct";   break;
+        case( GFF_SGF ) :   pKeyName = "sgf";   break;
+        case( GFF_SGV ) :   pKeyName = "sgv";   break;
+        case( GFF_SVM ) :   pKeyName = "svm";   break;
+        case( GFF_WMF ) :   pKeyName = "wmf";   break;
+        case( GFF_EMF ) :   pKeyName = "emf";   break;
+        case( GFF_SVG ) :   pKeyName = "svg";   break;
     }
 
-    return String( aKeyName, RTL_TEXTENCODING_ASCII_US );
+    return rtl::OUString::createFromAscii(pKeyName);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index 71763b9..9e45b89 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -446,7 +446,7 @@ Any SAL_CALL TransferableHelper::getTransferData( const DataFlavor& rFlavor ) th
 
 #ifdef DEBUG
             if( maAny.hasValue() && ::com::sun::star::uno::TypeClass_STRING != maAny.getValueType().getTypeClass() )
-                fprintf( stderr, "TransferableHelper delivers sequence of data [ %s ]\n", ByteString( String( rFlavor.MimeType), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+                fprintf( stderr, "TransferableHelper delivers sequence of data [ %s ]\n", rtl::OUStringToOString(rFlavor.MimeType, RTL_TEXTENCODING_ASCII_US).getStr() );
 #endif
         }
         catch( const ::com::sun::star::uno::Exception& )
@@ -667,7 +667,7 @@ void TransferableHelper::AddFormat( const DataFlavor& rFlavor )
 
 #ifdef DEBUG
                 fprintf( stderr, "TransferableHelper exchanged objectdescriptor [ %s ]\n",
-                         ByteString( String( aIter->MimeType), RTL_TEXTENCODING_ASCII_US ).GetBuffer() );
+                         rtl::OUStringToOString(aIter->MimeType, RTL_TEXTENCODING_ASCII_US).getStr() );
 #endif
             }
 
@@ -780,12 +780,11 @@ sal_Bool TransferableHelper::SetString( const ::rtl::OUString& rString, const Da
         SotExchange::GetFormatDataFlavor( FORMAT_FILE, aFileFlavor ) &&
         TransferableDataHelper::IsEqual( aFileFlavor, rFlavor ) )
     {
-        const String            aString( rString );
-        const ByteString        aByteStr( aString, osl_getThreadTextEncoding() );
-        Sequence< sal_Int8 >    aSeq( aByteStr.Len() + 1 );
+        const rtl::OString aByteStr(rtl::OUStringToOString(rString, osl_getThreadTextEncoding()));
+        Sequence< sal_Int8 >    aSeq( aByteStr.getLength() + 1 );
 
-        rtl_copyMemory( aSeq.getArray(), aByteStr.GetBuffer(), aByteStr.Len() );
-        aSeq[ aByteStr.Len() ] = 0;
+        rtl_copyMemory( aSeq.getArray(), aByteStr.getStr(), aByteStr.getLength() );
+        aSeq[ aByteStr.getLength() ] = 0;
         maAny <<= aSeq;
     }
     else
@@ -900,9 +899,9 @@ sal_Bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk,
 
         case( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ):
         {
-            ByteString sURL( rBmk.GetURL(), eSysCSet );
-            Sequence< sal_Int8 > aSeq( sURL.Len() );
-            memcpy( aSeq.getArray(), sURL.GetBuffer(), sURL.Len() );
+            rtl::OString sURL(rtl::OUStringToOString(rBmk.GetURL(), eSysCSet));
+            Sequence< sal_Int8 > aSeq( sURL.getLength() );
+            memcpy( aSeq.getArray(), sURL.getStr(), sURL.getLength() );
             maAny <<= aSeq;
         }
         break;
@@ -912,8 +911,8 @@ sal_Bool TransferableHelper::SetINetBookmark( const INetBookmark& rBmk,
             Sequence< sal_Int8 > aSeq( 2048 );
 
             memset( aSeq.getArray(), 0, 2048 );
-            strcpy( reinterpret_cast< char* >( aSeq.getArray() ), ByteString( rBmk.GetURL(), eSysCSet).GetBuffer() );
-            strcpy( reinterpret_cast< char* >( aSeq.getArray() ) + 1024, ByteString( rBmk.GetDescription(), eSysCSet ).GetBuffer() );
+            strcpy( reinterpret_cast< char* >( aSeq.getArray() ), rtl::OUStringToOString(rBmk.GetURL(), eSysCSet).getStr() );
+            strcpy( reinterpret_cast< char* >( aSeq.getArray() ) + 1024, rtl::OUStringToOString(rBmk.GetDescription(), eSysCSet).getStr() );
 
             maAny <<= aSeq;
         }
@@ -2106,11 +2105,11 @@ sal_Bool TransferableDataHelper::GetFileList(
             {
                 if( aFlavor.MimeType.indexOf( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "text/uri-list" )) ) > -1 )
                 {
-                    ByteString aByteString;
+                    rtl::OString aDiskString;
 
-                    while( xStm->ReadLine( aByteString ) )
-                        if( aByteString.Len() && aByteString.GetChar( 0 ) != '#' )
-                            rFileList.AppendFile( String( aByteString, RTL_TEXTENCODING_UTF8 ) );
+                    while( xStm->ReadLine( aDiskString ) )
+                        if( aDiskString.getLength() && aDiskString[0] != '#' )
+                            rFileList.AppendFile( rtl::OStringToOUString(aDiskString, RTL_TEXTENCODING_UTF8) );
 
                     bRet = sal_True;
                  }
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index fe89210..d8ffe9e 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -511,9 +511,9 @@ void TransferDataContainer::CopyAnyData( sal_uLong nFormatId,
 // -----------------------------------------------------------------------------
 
 void TransferDataContainer::CopyByteString( sal_uLong nFormatId,
-                                            const ByteString& rStr )
+                                            const rtl::OString& rStr )
 {
-    CopyAnyData( nFormatId, rStr.GetBuffer(), rStr.Len() );
+    CopyAnyData( nFormatId, rStr.getStr(), rStr.getLength() );
 }
 
 // -----------------------------------------------------------------------------
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index d86553a..928e060 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -208,8 +208,8 @@ const String SgaObject::GetTitle() const
             if ( aReturnValue.GetToken( 0, ':' ).EqualsAscii( "private" ) &&
                 aResourceName.Len() && ( nResId > 0 ) && ( nResId < 0x10000 ) )
             {
-                ByteString aMgrName( aResourceName, RTL_TEXTENCODING_UTF8 );
-                ResMgr* pResMgr = ResMgr::CreateResMgr( aMgrName.GetBuffer(),
+                rtl::OString aMgrName(rtl::OUStringToOString(aResourceName, RTL_TEXTENCODING_UTF8));
+                ResMgr* pResMgr = ResMgr::CreateResMgr( aMgrName.getStr(),
                             Application::GetSettings().GetUILocale() );
                 if ( pResMgr )
                 {
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 8e597f7..1dcee2b 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1529,8 +1529,8 @@ bool SvxGraphicObject::setPropertyValueImpl( const ::rtl::OUString& rName, const
                 // graphic manager url
                 aURL = aURL.copy( sizeof( UNO_NAME_GRAPHOBJ_URLPREFIX ) - 1 );
                 String aTmpStr(aURL);
-                ByteString aUniqueID( aTmpStr, RTL_TEXTENCODING_UTF8 );
-                GraphicObject aGrafObj( aUniqueID );
+                rtl::OString aUniqueID(rtl::OUStringToOString(aTmpStr, RTL_TEXTENCODING_UTF8));
+                GraphicObject aGrafObj(aUniqueID);
 
                 // #101808# since loading a graphic can cause a reschedule of the office
                 //          it is possible that our shape is removed while where in this
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index f7330dc..7a2f20a 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -29,6 +29,7 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svx.hxx"
 #include <sal/macros.h>
+#include <rtl/strbuf.hxx>
 #include <com/sun/star/embed/XTransactedObject.hpp>
 #include <com/sun/star/embed/ElementModes.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -115,8 +116,7 @@ public:
 
 SvXMLGraphicInputStream::SvXMLGraphicInputStream( const ::rtl::OUString& rGraphicId )
 {
-    String          aGraphicId( rGraphicId );
-    GraphicObject   aGrfObject( ByteString( aGraphicId, RTL_TEXTENCODING_ASCII_US ) );
+    GraphicObject   aGrfObject( rtl::OUStringToOString(rGraphicId, RTL_TEXTENCODING_ASCII_US) );
 
     maTmp.EnableKillingFile();
 
@@ -584,8 +584,7 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt
                                                const ::rtl::OUString& rGraphicId,
                                                bool bUseGfxLink )
 {
-    String          aGraphicId( rGraphicId );
-    GraphicObject   aGrfObject( ByteString( aGraphicId, RTL_TEXTENCODING_ASCII_US ) );
+    GraphicObject   aGrfObject( rtl::OUStringToOString(rGraphicId, RTL_TEXTENCODING_ASCII_US) );
     sal_Bool        bRet = sal_False;
 
     if( aGrfObject.GetType() != GRAPHIC_NONE )
@@ -709,7 +708,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
         else
         {
             const String        aGraphicObjectId( aPictureStreamName );
-            const ByteString    aAsciiObjectID( aGraphicObjectId, RTL_TEXTENCODING_ASCII_US );
+            const rtl::OString aAsciiObjectID(rtl::OUStringToOString(aGraphicObjectId, RTL_TEXTENCODING_ASCII_US));
             const GraphicObject aGrfObject( aAsciiObjectID );
             if( aGrfObject.GetType() != GRAPHIC_NONE )
             {
@@ -802,10 +801,11 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s
 #if OSL_DEBUG_LEVEL > 0
             else
             {
-                ByteString sMessage = "graphic object with ID '";
-                sMessage += aAsciiObjectID;
-                sMessage += "' has an unknown type";
-                OSL_ENSURE( false, sMessage.GetBuffer() );
+                rtl::OStringBuffer sMessage(
+                    RTL_CONSTASCII_STRINGPARAM("graphic object with ID '"));
+                sMessage.append(aAsciiObjectID).
+                    append(RTL_CONSTASCII_STRINGPARAM("' has an unknown type"));
+                OSL_ENSURE( false, sMessage.getStr() );
             }
 #endif
         }
commit 180dcdecac80e87f4984024c24f4beeef9dbf766
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 9 22:28:54 2011 +0000

    Hey Joe, let's ditch the itembrowser

diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index d4464b6..a6d2db0 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1124,18 +1124,6 @@ sal_Bool SdrObjEditView::KeyInput(const KeyEvent& rKEvt, Window* pWin)
 {
     if(pTextEditOutlinerView)
     {
-#ifdef DBG_UTIL
-        if(rKEvt.GetKeyCode().GetCode() == KEY_RETURN && pTextEditOutliner->GetParagraphCount() == 1)
-        {
-            ByteString aLine(
-                pTextEditOutliner->GetText(pTextEditOutliner->GetParagraph( 0 ), 1),
-                gsl_getSystemTextEncoding());
-            aLine = aLine.ToUpperAscii();
-
-            if(aLine == "HELLO JOE, PLEASE SHOW THE ITEMBROWSER")
-                ShowItemBrowser();
-        }
-#endif
         if (pTextEditOutlinerView->PostKeyEvent(rKEvt, pWin))
         {
             if( pMod /* && !pMod->IsChanged() */ )
commit 8e482e60c52ba427199a29045711b3f9cc870ac0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Nov 9 22:07:24 2011 +0000

    an indexOfL would be useful

diff --git a/comphelper/inc/comphelper/string.hxx b/comphelper/inc/comphelper/string.hxx
index aeec120..4545302 100644
--- a/comphelper/inc/comphelper/string.hxx
+++ b/comphelper/inc/comphelper/string.hxx
@@ -251,6 +251,29 @@ COMPHELPER_DLLPUBLIC inline sal_Bool matchL(const rtl::OString& rStr, const char
         rStr.pData->length-fromIndex, pMatch, nMatchLen, nMatchLen ) == 0;
 }
 
+/**
+  Returns the index within this string of the first occurrence of the
+  specified substring, starting at the specified index.
+
+  If str doesn't include any character, always -1 is
+  returned. This is also the case, if both strings are empty.
+
+  @param    rStr        The string that pSearch will be searched within.
+  @param    pSearch     the substring to search for.
+  @param    nSearchLen  the length of pSearch
+  @param    fromIndex   the index to start the search from.
+  @return   If the string argument occurs one or more times as a substring
+            within this string at the starting index, then the index
+            of the first character of the first such substring is
+            returned. If it does not occur as a substring starting
+            at fromIndex or beyond, -1 is returned.
+*/
+COMPHELPER_DLLPUBLIC inline sal_Int32 indexOfL(const rtl::OString& rStr, const char *pSearch, sal_Int32 nSearchLen, sal_Int32 fromIndex = 0) SAL_THROW(())
+{
+    sal_Int32 ret = rtl_str_indexOfStr_WithLength(rStr.pData->buffer+fromIndex,
+        rStr.pData->length-fromIndex, pSearch, nSearchLen);
+    return (ret < 0 ? ret : ret+fromIndex);
+}
 
 namespace detail
 {
diff --git a/comphelper/qa/string/test_string.cxx b/comphelper/qa/string/test_string.cxx
index db6d52e..3e30ad2 100644
--- a/comphelper/qa/string/test_string.cxx
+++ b/comphelper/qa/string/test_string.cxx
@@ -53,6 +53,7 @@ public:
     void testIsdigitAsciiString();
     void testIsalnumAsciiString();
     void testIsupperAsciiString();
+    void testIndexOfL();
 
     CPPUNIT_TEST_SUITE(TestString);
     CPPUNIT_TEST(testSearchAndReplaceAsciiL);
@@ -63,6 +64,7 @@ public:
     CPPUNIT_TEST(testIsdigitAsciiString);
     CPPUNIT_TEST(testIsalnumAsciiString);
     CPPUNIT_TEST(testIsupperAsciiString);
+    CPPUNIT_TEST(testIndexOfL);
     CPPUNIT_TEST_SUITE_END();
 };
 
@@ -147,6 +149,23 @@ void TestString::testIsupperAsciiString()
     CPPUNIT_ASSERT_EQUAL(comphelper::string::isupperAsciiString(s3), true);
 }
 
+void TestString::testIndexOfL()
+{
+    rtl::OString s1(RTL_CONSTASCII_STRINGPARAM("one two three"));
+
+    CPPUNIT_ASSERT_EQUAL(comphelper::string::indexOfL(s1,
+        RTL_CONSTASCII_STRINGPARAM("one")), 0);
+
+    CPPUNIT_ASSERT_EQUAL(comphelper::string::indexOfL(s1,
+        RTL_CONSTASCII_STRINGPARAM("two")), 4);
+
+    CPPUNIT_ASSERT_EQUAL(comphelper::string::indexOfL(s1,
+        RTL_CONSTASCII_STRINGPARAM("four")), -1);
+
+    CPPUNIT_ASSERT_EQUAL(comphelper::string::indexOfL(s1,
+        RTL_CONSTASCII_STRINGPARAM("two"), 5), -1);
+}
+
 using namespace ::com::sun::star;
 
 class testCollator : public cppu::WeakImplHelper1< i18n::XCollator >
diff --git a/svtools/inc/svtools/imap.hxx b/svtools/inc/svtools/imap.hxx
index 1d89ca3..9418d98 100644
--- a/svtools/inc/svtools/imap.hxx
+++ b/svtools/inc/svtools/imap.hxx
@@ -67,12 +67,12 @@ protected:
     sal_uLong           ImpReadCERN( SvStream& rOStm, const String& rBaseURL );
     sal_uLong           ImpReadNCSA( SvStream& rOStm, const String& rBaseURL );
 
-    void                ImpReadCERNLine( const ByteString& rLine, const String& rBaseURL );
+    void                ImpReadCERNLine( const rtl::OString& rLine, const String& rBaseURL );
     Point               ImpReadCERNCoords( const char** ppStr );
     long                ImpReadCERNRadius( const char** ppStr );
     String              ImpReadCERNURL( const char** ppStr, const String& rBaseURL );
 
-    void                ImpReadNCSALine( const ByteString& rLine, const String& rBaseURL );
+    void                ImpReadNCSALine( const rtl::OString& rLine, const String& rBaseURL );
     String              ImpReadNCSAURL( const char** ppStr, const String& rBaseURL );
     Point               ImpReadNCSACoords( const char** ppStr );
 
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index 6ff6cad..98b0ee3 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -29,6 +29,7 @@
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_svtools.hxx"
 
+#include <comphelper/string.hxx>
 #include <string.h>
 #include <rtl/strbuf.hxx>
 #include <vcl/svapp.hxx>
@@ -250,18 +251,17 @@ sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat, const String& rBas
 
 sal_uLong ImageMap::ImpReadCERN( SvStream& rIStm, const String& rBaseURL )
 {
-    ByteString aStr;
-
     // alten Inhalt loeschen
     ClearImageMap();
 
+    rtl::OString aStr;
     while ( rIStm.ReadLine( aStr ) )
         ImpReadCERNLine( aStr, rBaseURL );
 
     return IMAP_ERR_OK;
 }
 
-void ImageMap::ImpReadCERNLine( const ByteString& rLine, const String& rBaseURL  )
+void ImageMap::ImpReadCERNLine( const rtl::OString& rLine, const String& rBaseURL  )
 {
     ByteString  aStr( rLine );
 
@@ -394,18 +394,17 @@ String ImageMap::ImpReadCERNURL( const char** ppStr, const String& rBaseURL )
 
 sal_uLong ImageMap::ImpReadNCSA( SvStream& rIStm, const String& rBaseURL )
 {
-    ByteString aStr;
-
     // alten Inhalt loeschen
     ClearImageMap();
 
+    rtl::OString aStr;
     while ( rIStm.ReadLine( aStr ) )
         ImpReadNCSALine( aStr, rBaseURL );
 
     return IMAP_ERR_OK;
 }
 
-void ImageMap::ImpReadNCSALine( const ByteString& rLine, const String& rBaseURL )
+void ImageMap::ImpReadNCSALine( const rtl::OString& rLine, const String& rBaseURL )
 {
     ByteString  aStr( rLine );
 
@@ -532,20 +531,22 @@ sal_uLong ImageMap::ImpDetectFormat( SvStream& rIStm )
     // untersuchen wir das Format
     if ( memcmp( cMagic, IMAPMAGIC, sizeof( cMagic ) ) )
     {
-        ByteString  aStr;
         long        nCount = 128;
 
         rIStm.Seek( nPos );
+        rtl::OString aStr;
         while ( rIStm.ReadLine( aStr ) && nCount-- )
         {
-            aStr.ToLowerAscii();
+            aStr = aStr.toAsciiLowerCase();
+
+            using comphelper::string::indexOfL;
 
-            if ( ( aStr.Search( "rect" ) != STRING_NOTFOUND ) ||
-                 ( aStr.Search( "circ" ) != STRING_NOTFOUND ) ||
-                 ( aStr.Search( "poly" ) != STRING_NOTFOUND ) )
+            if ( (indexOfL(aStr, RTL_CONSTASCII_STRINGPARAM("rect")) != -1) ||
+                 (indexOfL(aStr, RTL_CONSTASCII_USTRINGPARAM("circ")) != -1) ||
+                 (indexOfL(aStr, RTL_CONSTASCII_USTRINGPARAM("poly")) != -1) )
             {
-                if ( ( aStr.Search( '(' ) != STRING_NOTFOUND ) &&
-                     ( aStr.Search( ')' ) != STRING_NOTFOUND ) )
+                if ( ( aStr.indexOf('(') != -1 ) &&
+                     ( aStr.indexOf(')') != -1 ) )
                 {
                     nRet = IMAP_FORMAT_CERN;
                 }


More information about the Libreoffice-commits mailing list