[Libreoffice-commits] .: 10 commits - automation/source basic/source l10ntools/source lotuswordpro/source sc/source svl/inc svl/source svtools/source svx/inc svx/source sw/source tools/inc tools/source unusedcode.easy vcl/source vcl/unx xmloff/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Aug 11 03:11:20 PDT 2011


 automation/source/testtool/tcommuni.cxx     |    4 
 basic/source/app/dialogs.cxx                |    6 -
 basic/source/basmgr/basmgr.cxx              |   14 --
 l10ntools/source/export.cxx                 |    4 
 lotuswordpro/source/filter/bencont.cxx      |   27 -----
 lotuswordpro/source/filter/bento.hxx        |    3 
 lotuswordpro/source/filter/lwpchangemgr.cxx |  147 ----------------------------
 lotuswordpro/source/filter/lwpchangemgr.hxx |    1 
 lotuswordpro/source/filter/lwpmarker.cxx    |   26 ----
 lotuswordpro/source/filter/lwpmarker.hxx    |    1 
 sc/source/core/tool/interpr1.cxx            |   10 +
 svl/inc/svl/itempool.hxx                    |    2 
 svl/source/items/poolio.cxx                 |    7 -
 svtools/source/graphic/grfcache.cxx         |    8 -
 svx/inc/svx/svdedtv.hxx                     |    3 
 svx/inc/svx/svdglev.hxx                     |    1 
 svx/source/svdraw/svdedtv2.cxx              |   21 ----
 svx/source/svdraw/svdglev.cxx               |    7 -
 sw/source/ui/inc/hyp.hxx                    |    1 
 sw/source/ui/lingu/hyp.cxx                  |   11 --
 tools/inc/tools/config.hxx                  |    1 
 tools/inc/tools/string.hxx                  |    7 -
 tools/inc/tools/urlobj.hxx                  |    2 
 tools/source/fsys/urlobj.cxx                |   16 ---
 tools/source/generic/config.cxx             |    9 -
 tools/source/string/strcvt.cxx              |   46 --------
 tools/source/string/tstring.cxx             |    9 -
 unusedcode.easy                             |   19 ---
 vcl/source/gdi/gdimtf.cxx                   |   13 --
 vcl/unx/generic/fontmanager/fontcache.cxx   |    3 
 xmloff/source/draw/shapeexport.cxx          |    2 
 31 files changed, 32 insertions(+), 399 deletions(-)

New commits:
commit 555fdbc6e9e04f8d4b7786c8b1a1faa5dd64a694
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 11 10:52:42 2011 +0100

    callcatcher: unused code

diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index 320444d..6a68f2c 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -497,26 +497,6 @@ void AswEntry::Store( void* pTo )
       << nReserved[ 0 ]                     // 74 starting block (either direct or translated)
       << nReserved[ 1 ];                        // 78 file size
 }
-void AswEntry::Load( const void* pFrom )
-{
-    SvMemoryStream r( (sal_Char *)pFrom, ASWENTRY_SIZE, STREAM_WRITE );
-    for( short i = 0; i < 68; i++ )
-        r >> nName[ i ];            // 00 name as WCHAR
-     r>> nMtime[ 0 ]                        // 42 entry type
-      >> nMtime[ 1 ]                        // 43 0 or 1 (tree balance?)
-      >> nCtime[ 0 ]                        // 44 left node entry
-      >> nCtime[ 1 ]                        // 48 right node entry
-      >> nAtime[ 0 ]                        // 44 left node entry
-      >> nAtime[ 1 ];                       // 48 right node entry
-      r.Read(&aClsId,16);                       // 50 class ID (optional)
-      r>> nStatebits                        // 60 state flags(?)
-      >> nType
-      >> nObjectIDRef               // 64 modification time
-      >> nMversion              // 6C creation and access time
-      >> nLversion              // 6C creation and access time
-      >> nReserved[ 0 ]                     // 74 starting block (either direct or translated)
-      >> nReserved[ 1 ];                        // 78 file size
-}
 void AswEntry::SetClassId( const ClsId& r )
 {
     memcpy( &aClsId, &r, sizeof( ClsId ) );
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
index fb2f5be..c870f0d 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -111,7 +111,6 @@ public:
     void    Init();                     // initialize the data
     void SetName( const String& );  // store a name (ASCII, up to 32 chars)
     void    GetName( String& rName ) const;
-    void    Load( const void* );
     void Store( void* );
     sal_uInt32 GetType() const      { return  nType;    }
     void    SetType( sal_uInt32 t ) { nType = t;}
diff --git a/tools/inc/tools/urlobj.hxx b/tools/inc/tools/urlobj.hxx
index f8caeee..6bd6587 100644
--- a/tools/inc/tools/urlobj.hxx
+++ b/tools/inc/tools/urlobj.hxx
@@ -963,8 +963,6 @@ public:
                         EncodeMechanism eMechanism = WAS_ENCODED,
                         rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
 
-    static rtl::OUString createFragment(rtl::OUString const & rText);
-
     //========================================================================
     // File URLs:
 
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index bf3cf2e..760d84d 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -4681,22 +4681,6 @@ bool INetURLObject::removeFinalSlash()
 }
 
 //============================================================================
-// static
-rtl::OUString INetURLObject::createFragment(rtl::OUString const & rText)
-{
-    rtl::OUString aFragment(rText);
-    for (sal_Int32 i = 0; i < aFragment.getLength();)
-    {
-        sal_Unicode c = aFragment.getStr()[i];
-        if (mustEncode(c, PART_CREATEFRAGMENT))
-            aFragment = aFragment.replaceAt(i, 1, rtl::OUString());
-        else
-            ++i;
-    }
-    return aFragment;
-}
-
-//============================================================================
 bool INetURLObject::setFSysPath(rtl::OUString const & rFSysPath,
     FSysStyle eStyle)
 {
diff --git a/unusedcode.easy b/unusedcode.easy
index 112983b..f2bc2ef 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -285,7 +285,9 @@ GlobalEventConfig_Impl::getEvents()
 GradientLB::GradientLB(Window*, long, unsigned char)
 GraphCtrl::GraphCtrl(Window*, long)
 Graphic::Draw(OutputDevice*, String const&, Font&, Bitmap const&, Point const&, Size const&)
+Graphic::GetGraphicsCompressMode(SvStream&)
 Graphic::StartAnimation(OutputDevice*, Point const&, long, OutputDevice*)
+Graphic::WriteEmbedded(SvStream&)
 GraphicConverter::ImplConvert(unsigned long, void*, unsigned long, void**, unsigned long)
 GraphicHelper::convertAppFontToHmm(com::sun::star::awt::Point const&) const
 GraphicHelper::convertAppFontToHmm(com::sun::star::awt::Size const&) const
@@ -1289,7 +1291,7 @@ SvNumberFormatter::HasTextFormat(unsigned int) const
 SvNumberFormatter::PrepareSave()
 SvNumberFormatter::SetFormatUsed(unsigned int)
 SvNumberFormatter::SvNumberFormatter(unsigned short)
-SvNumberNatNum::MapNatNumToDBNum(unsigned char, unsigned short, unsigned char)
+SvNumberNatNum::MapNatNumToDBNum(unsigned char, unsigned short, bool)
 SvNumberformat::EraseComment(String&)
 SvNumberformat::ImpSwitchToSpecifiedCalendar(String&, double&, ImpSvNumFor const&) const
 SvNumberformat::SetComment(String const&, String&, String&)
@@ -1753,7 +1755,6 @@ SwRedlineDataParentSortArr::DeleteAndDestroy(unsigned short, unsigned short)
 SwRedlineDataParentSortArr::Insert(SwRedlineDataParent* const&)
 SwRedlineDataParentSortArr::Insert(SwRedlineDataParent* const*, unsigned short)
 SwRedlineDataParentSortArr::Insert(SwRedlineDataParentSortArr const*, unsigned short, unsigned short)
-SwRenderData::NeedNewViewOptionAdjust(ViewShell const&) const
 SwSections::DeleteAndDestroy(unsigned short, unsigned short)
 SwSelBoxes::Insert(SwTableBox* const&, unsigned short&)
 SwSelBoxes::Remove(SwTableBox* const&, unsigned short)
@@ -2542,7 +2543,6 @@ binfilter::SvBytes::_ForEach(unsigned short, unsigned short, unsigned char (*)(u
 binfilter::SvDataPipe_Impl::addMark(unsigned int)
 binfilter::SvDataPipe_Impl::removeMark(unsigned int)
 binfilter::SvFactory::GetSvClass(int, SvGlobalName const&)
-binfilter::SvFactory::IsIntern31(SvGlobalName const&)
 binfilter::SvI18NMap_Impl::Insert(binfilter::SvI18NMapEntry_Impl* const&, unsigned short&)
 binfilter::SvI18NMap_Impl::Insert(binfilter::SvI18NMapEntry_Impl* const*, unsigned short)
 binfilter::SvI18NMap_Impl::Insert(binfilter::SvI18NMap_Impl const*, unsigned short, unsigned short)
@@ -2552,8 +2552,6 @@ binfilter::SvLongs::Replace(long const&, unsigned short)
 binfilter::SvLongs::Replace(long const*, unsigned short, unsigned short)
 binfilter::SvLongs::_ForEach(unsigned short, unsigned short, unsigned char (*)(long const&, void*), void*)
 binfilter::SvObjectServerList::Remove(SvGlobalName const&)
-binfilter::SvOutPlaceObject::MakeWorkStorageWrap_Impl(binfilter::SvStorage*)
-binfilter::SvPersist::DoSaveContent(binfilter::SvStorage*, unsigned char)
 binfilter::SvPtrarr::Replace(void* const*, unsigned short, unsigned short)
 binfilter::SvShorts::Insert(binfilter::SvShorts const*, unsigned short, unsigned short, unsigned short)
 binfilter::SvShorts::Remove(unsigned short, unsigned short)
@@ -2641,7 +2639,6 @@ binfilter::Sw3SortFmts::Insert(binfilter::SwFmt* const&)
 binfilter::Sw3SortFmts::Insert(binfilter::SwFmt* const*, unsigned short)
 binfilter::Sw3SortFmts::Remove(binfilter::SwFmt* const&, unsigned short)
 binfilter::Sw3SortFmts::Remove(unsigned short, unsigned short)
-binfilter::Sw3StringPool::Setup(binfilter::SwDoc&, binfilter::SwFmt const&, unsigned short)
 binfilter::Sw3ULongs::Insert(binfilter::Sw3ULongs const*, unsigned short, unsigned short, unsigned short)
 binfilter::Sw3ULongs::Replace(unsigned int const&, unsigned short)
 binfilter::Sw3ULongs::Replace(unsigned int const*, unsigned short, unsigned short)
@@ -2809,7 +2806,6 @@ binfilter::_ZSortFlys_SAR::Replace(binfilter::_ZSortFly const*, unsigned short,
 binfilter::_ZSortFlys_SAR::_ForEach(unsigned short, unsigned short, unsigned char (*)(binfilter::_ZSortFly const&, void*), void*)
 binfilter::bf_OfficeWrapper::impl_createInstance(com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory> const&)
 binfilter::frm::OErrorBroadcaster::onError(com::sun::star::sdbc::SQLException const&, rtl::OUString const&)
-binfilter::lcl_sw3io__ConvertNumTabStop(binfilter::SwCntntNode const&, long, binfilter::SfxItemSet&)
 cairocanvas::CanvasHelper::flush() const
 cairocanvas::CanvasHelper::getPalette()
 cairocanvas::SpriteDeviceHelper::getSurface()
commit c32e596e2457847afdac7b3162b19ad052d4da7c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 11 10:51:57 2011 +0100

    remove deprecated ByteString::ToInt64, which is a busted 32bit atoi anyway

diff --git a/automation/source/testtool/tcommuni.cxx b/automation/source/testtool/tcommuni.cxx
index c726d51..32b9707 100644
--- a/automation/source/testtool/tcommuni.cxx
+++ b/automation/source/testtool/tcommuni.cxx
@@ -170,7 +170,7 @@ sal_uLong GetTTPortConfig()
 
     GETSET( abPortToTalk, "TTPort",
         rtl::OString::valueOf(static_cast<sal_Int32>(TESTTOOL_DEFAULT_PORT)) );
-    return (sal_uLong)abPortToTalk.ToInt64();
+    return (sal_uLong)abPortToTalk.ToInt32();
 }
 
 
@@ -197,7 +197,7 @@ sal_uLong GetUnoPortConfig()
 
     GETSET( abPortToTalk, "UnoPort",
         rtl::OString::valueOf(static_cast<sal_Int32>(UNO_DEFAULT_PORT)) );
-    return (sal_uLong)abPortToTalk.ToInt64();
+    return (sal_uLong)abPortToTalk.ToInt32();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 0eaae97..72f7489 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -203,7 +203,6 @@ public:
     }
 
     sal_Int32           ToInt32() const;
-    sal_Int64           ToInt64() const;
 
     ByteString&         Assign( const ByteString& rStr );
     ByteString&         Assign( const rtl::OString& rStr );
diff --git a/tools/source/string/tstring.cxx b/tools/source/string/tstring.cxx
index 509bc62..40310cf 100644
--- a/tools/source/string/tstring.cxx
+++ b/tools/source/string/tstring.cxx
@@ -99,15 +99,6 @@ sal_Int32 ByteString::ToInt32() const
 
 // -----------------------------------------------------------------------
 
-sal_Int64 ByteString::ToInt64() const
-{
-    DBG_CHKTHIS( ByteString, DbgCheckByteString );
-
-    return atoi( mpData->maStr );
-}
-
-// -----------------------------------------------------------------------
-
 sal_Bool ByteString::IsLowerAscii() const
 {
     DBG_CHKTHIS( ByteString, DbgCheckByteString );
commit 6bbdf4dddffd828b38efe8849d7e205f21baaefd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 11 10:38:12 2011 +0100

    Resolves: fdo#39995 restore original semantics of GDIMetaFile::ReplaceAction
    
    These semantics are fairly horrific, but existing code expects them, so
    callers need to be changed if this is changed.

diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 6fe6504..faedf86 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -340,17 +340,14 @@ MetaAction* GDIMetaFile::NextAction()
 
 MetaAction* GDIMetaFile::ReplaceAction( MetaAction* pAction, size_t nAction )
 {
-    if ( nAction < aList.size() )
-    {
-        ::std::vector< MetaAction* >::iterator it = aList.begin();
-        ::std::advance( it, nAction );
-        (*it)->Delete();
-        *it = pAction;
-    }
+    if ( nAction >= aList.size() )
+        return NULL;
+    //fdo#39995 This does't increment the incoming action ref-count nor does it
+    //decrement the outgoing action ref-count
+    std::swap(pAction, aList[nAction]);
     return pAction;
 }
 
-
 // ------------------------------------------------------------------------
 
 GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
commit f3aebf9a3b55cfe558a2ee59f38f0c121f7b65fd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 11 10:17:13 2011 +0100

    why make a copy just to use some const methods, optimize

diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index e0aa659..82ef6e3 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -116,11 +116,11 @@ GraphicID::GraphicID( const GraphicObject& rObj )
 
         case( GRAPHIC_GDIMETAFILE ):
         {
-            const GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() );
+            const GDIMetaFile& rMtf = rGraphic.GetGDIMetaFile();
 
-            mnID1 |= ( aMtf.GetActionSize() & 0x0fffffff );
-            mnID2 = aMtf.GetPrefSize().Width();
-            mnID3 = aMtf.GetPrefSize().Height();
+            mnID1 |= ( rMtf.GetActionSize() & 0x0fffffff );
+            mnID2 = rMtf.GetPrefSize().Width();
+            mnID3 = rMtf.GetPrefSize().Height();
             mnID4 = rGraphic.GetChecksum();
         }
         break;
commit 553e4558353e5a0e1e9a549c08ba2add687c3bf5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 11 09:42:02 2011 +0100

    WaE: unused variable

diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 1a76bb8..da1ae6f 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -683,7 +683,7 @@ void XMLShapeExport::exportShape(const uno::Reference< drawing::XShape >& xShape
                 mrExport.AddAttribute(XML_NAMESPACE_DRAW, XML_LAYER, aLayerName );
 
             }
-            catch(const uno::Exception& e)
+            catch(const uno::Exception&)
             {
                 OSL_FAIL( "could not export layer name for shape!" );
             }
commit 03279732bd258de9d21348a75ab4f3bbcb9874f9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Aug 11 01:18:12 2011 +0100

    ByteString::ToInt64 is atoi the same as ToInt32, and we downcast anyway

diff --git a/l10ntools/source/export.cxx b/l10ntools/source/export.cxx
index 94f1650..b6a47a0 100644
--- a/l10ntools/source/export.cxx
+++ b/l10ntools/source/export.cxx
@@ -1045,10 +1045,10 @@ int Export::Execute( int nToken, const char * pToken )
             sMapping.EraseAllChars( ' ' );
             sMapping.EraseAllChars( '\t' );
             if ( sKey.ToUpperAscii() == "SIZE" ) {
-                pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 0, ',' ).ToInt64();
+                pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 0, ',' ).ToInt32();
             }
             else if ( sKey == "POSSIZE" ) {
-                pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 2, ',' ).ToInt64();
+                pResData->nWidth = ( sal_uInt16 ) sMapping.GetToken( 2, ',' ).ToInt32();
             }
         }
         break;
commit 7292948992e088862d86e96ccbf28f9757fded24
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 10 23:00:28 2011 +0100

    callcatcher: yet more unused code

diff --git a/basic/source/app/dialogs.cxx b/basic/source/app/dialogs.cxx
index 1d67483..2f82553 100644
--- a/basic/source/app/dialogs.cxx
+++ b/basic/source/app/dialogs.cxx
@@ -747,9 +747,9 @@ void FontOptions::UpdatePreview()
 void FontOptions::Save( Config &aConfig )
 {
     aConfig.SetGroup("Misc");
-    aConfig.WriteKey( "ScriptFontName", aFontName.GetText(), RTL_TEXTENCODING_UTF8 );
-    aConfig.WriteKey( "ScriptFontStyle", aFontStyle.GetText(), RTL_TEXTENCODING_UTF8 );
-    aConfig.WriteKey( "ScriptFontSize", aFontSize.GetText(), RTL_TEXTENCODING_UTF8 );
+    aConfig.WriteKey( "ScriptFontName", ByteString(aFontName.GetText(), RTL_TEXTENCODING_UTF8) );
+    aConfig.WriteKey( "ScriptFontStyle", ByteString(aFontStyle.GetText(), RTL_TEXTENCODING_UTF8) );
+    aConfig.WriteKey( "ScriptFontSize", ByteString(aFontSize.GetText(), RTL_TEXTENCODING_UTF8) );
 }
 
 
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index ed040c8..9fc864a 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -492,7 +492,6 @@ public:
 
     void            SetRelStorageName( const String& rN )   { aRelStorageName = rN; }
     const String&   GetRelStorageName() const               { return aRelStorageName; }
-    void            CalcRelStorageName( const String& rMgrStorageName );
 
     StarBASICRef    GetLib() const
     {
@@ -691,19 +690,6 @@ BasicLibInfo* BasicLibInfo::Create( SotStorageStream& rSStream )
     return pInfo;
 }
 
-void BasicLibInfo::CalcRelStorageName( const String& rMgrStorageName )
-{
-    if ( rMgrStorageName.Len() )
-    {
-        INetURLObject aAbsURLObj( rMgrStorageName );
-        aAbsURLObj.removeSegment();
-        String aPath = aAbsURLObj.GetMainURL( INetURLObject::NO_DECODE );
-        UniString aRelURL = INetURLObject::GetRelURL( aPath, GetStorageName() );
-        SetRelStorageName( aRelURL );
-    }
-    else
-        SetRelStorageName( String() );
-}
 BasicManager::BasicManager( SotStorage& rStorage, const String& rBaseURL, StarBASIC* pParentFromStdLib, String* pLibPath, sal_Bool bDocMgr ) : mbDocMgr( bDocMgr )
 {
     DBG_CTOR( BasicManager, 0 );
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx
index d2a0e0f..320444d 100644
--- a/lotuswordpro/source/filter/bencont.cxx
+++ b/lotuswordpro/source/filter/bencont.cxx
@@ -455,13 +455,6 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p
 
 #include <tools/globname.hxx>
 
-void LtcBenContainer::ReadAswEntry(SvStream * pStream, AswEntry & rEntry)
-{
-    char* pBuf = new char[ASWENTRY_SIZE];
-    pStream->Read(pBuf, ASWENTRY_SIZE);
-    rEntry.Load(pBuf);
-    delete[] pBuf;
-}
 ////////////////////////////////////////////////////////////////////
 //classs AswEntry
 AswEntry::AswEntry()
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
index 0da355b..fb2f5be 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -298,8 +298,6 @@ public: // Internal methods
     LtcUtBenValueStream * FindObjectValueStreamWithObjectIDAndProperty(BenObjectID ObjectID, const char * sPropertyName);
     BenError CreateGraphicStream(SvStream * &pStream,  const char *pObjectName);
 
-    void ReadAswEntry(SvStream * pStream, AswEntry& rEntry);
-
     BenError GetSize(sal_uLong * pLength);
     LwpSvStream * GetStream()
     {
diff --git a/lotuswordpro/source/filter/lwpchangemgr.cxx b/lotuswordpro/source/filter/lwpchangemgr.cxx
index a9a11df..d9916f0 100644
--- a/lotuswordpro/source/filter/lwpchangemgr.cxx
+++ b/lotuswordpro/source/filter/lwpchangemgr.cxx
@@ -192,153 +192,6 @@ void LwpChangeMgr::SetHeadFootChange(XFContentContainer* pCont)
     }
 
     pCont->Add(pChangeList);
-
-//  m_HeadFootFribMap.clear();
-}
-
-void LwpChangeMgr::ConvertFribContent(XFContentContainer* pCont, LwpFrib* pFrib)
-{
-    XFParagraph* pXFPara = new XFParagraph;
-    LwpPara* pPara = pFrib->GetMyPara();
-    if (pPara)
-        pXFPara->SetStyleName(pPara->GetStyleName());
-
-        switch(pFrib->GetType())//copy code from class lwpfribptr
-        {
-        case FRIB_TAG_TEXT:
-        {
-            LwpFribText* textFrib= static_cast<LwpFribText*>(pFrib);
-            textFrib->XFConvert(pXFPara,pPara->GetStory());
-        }
-            break;
-        case FRIB_TAG_TAB:
-        {
-            LwpFribTab* tabFrib = static_cast<LwpFribTab*>(pFrib);
-            if (pFrib->m_ModFlag)
-            {
-                XFTextSpan *pSpan = new XFTextSpan();
-                pSpan->SetStyleName(tabFrib->GetStyleName());
-                XFTabStop *pTab = new XFTabStop();
-                pSpan->Add(pTab);
-                pXFPara->Add(pSpan);
-            }
-            else
-            {
-                XFTabStop *pTab = new XFTabStop();
-                pXFPara->Add(pTab);
-            }
-        }
-            break;
-        case FRIB_TAG_LINEBREAK:
-        {
-            XFLineBreak *pLineBreak = new XFLineBreak();
-            pXFPara->Add(pLineBreak);
-        }
-            break;
-        case FRIB_TAG_UNICODE: //fall through
-        case FRIB_TAG_UNICODE2: //fall through
-        case FRIB_TAG_UNICODE3: //fall through
-        {
-            LwpFribUnicode* unicodeFrib= static_cast<LwpFribUnicode*>(pFrib);
-            unicodeFrib->XFConvert(pXFPara,pPara->GetStory());
-        }
-            break;
-        case FRIB_TAG_HARDSPACE:
-        {
-            rtl::OUString sHardSpace(sal_Unicode(0x00a0));
-            LwpHyperlinkMgr* pHyperlink =
-                    pPara->GetStory()->GetHyperlinkMgr();
-            if (pHyperlink->GetHyperlinkFlag())
-                pFrib->ConvertHyperLink(pXFPara,pHyperlink,sHardSpace);
-            else
-                pFrib->ConvertChars(pXFPara,sHardSpace);
-        }
-            break;
-        case FRIB_TAG_SOFTHYPHEN:
-        {
-            rtl::OUString sSoftHyphen(sal_Unicode(0x00ad));
-            pFrib->ConvertChars(pXFPara,sSoftHyphen);
-        }
-            break;
-/*      case FRIB_TAG_FRAME:
-        {
-            LwpFribFrame* frameFrib= static_cast<LwpFribFrame*>(pFrib);
-            LwpObject* pLayout = frameFrib->GetLayout();
-            if (pLayout->GetTag() == VO_DROPCAPLAYOUT)
-            {
-                pPara->GetFoundry()->GetDropcapMgr()->SetXFPara(pXFPara);
-                //LwpObject* pDropCap = frameFrib->GetLayout();
-                //pDropCap ->XFConvert(m_pXFPara);
-            }
-            //pLayout->XFConvert(m_pXFPara);
-            frameFrib->XFConvert(pXFPara);
-        }
-            break;
-*/      case FRIB_TAG_CHBLOCK:
-        {
-            LwpFribCHBlock* chbFrib = static_cast<LwpFribCHBlock*>(pFrib);
-            chbFrib->XFConvert(pXFPara,pPara->GetStory());
-        }
-            break;
-/*      case FRIB_TAG_TABLE:
-        {
-            LwpFribTable* tableFrib = static_cast<LwpFribTable*>(pFrib);
-            //tableFrib->XFConvert(m_pPara->GetXFContainer());
-            tableFrib->XFConvert(pXFPara);
-        }
-            break;
-*/      case FRIB_TAG_BOOKMARK:
-        {
-            LwpFribBookMark* bookmarkFrib = static_cast<LwpFribBookMark*>(pFrib);
-            bookmarkFrib->XFConvert(pXFPara);
-        }
-        break;
-        case FRIB_TAG_FOOTNOTE:
-        {
-            LwpFribFootnote* pFootnoteFrib = static_cast<LwpFribFootnote*>(pFrib);
-            pFootnoteFrib->XFConvert(pXFPara);
-            break;
-        }
-        case FRIB_TAG_FIELD:
-        {
-            LwpFribField* fieldFrib = static_cast<LwpFribField*>(pFrib);
-            fieldFrib->XFConvert(pXFPara);
-            break;
-        }
-        case FRIB_TAG_NOTE:
-        {
-            LwpFribNote* pNoteFrib = static_cast<LwpFribNote*>(pFrib);
-            pNoteFrib->XFConvert(pXFPara);
-            break;
-        }
-        case FRIB_TAG_PAGENUMBER:
-        {
-            LwpFribPageNumber* pagenumFrib = static_cast<LwpFribPageNumber*>(pFrib);
-            pagenumFrib->XFConvert(pXFPara);
-            break;
-        }
-        case FRIB_TAG_DOCVAR:
-        {
-            LwpFribDocVar* docFrib = static_cast<LwpFribDocVar*>(pFrib);
-            docFrib->XFConvert(pXFPara);
-            break;
-        }
-        case FRIB_TAG_RUBYMARKER:
-        {
-            LwpFribRubyMarker* rubyFrib = static_cast<LwpFribRubyMarker*>(pFrib);
-            rubyFrib->XFConvert(pXFPara);
-            break;
-        }
-        case FRIB_TAG_RUBYFRAME:
-        {
-            LwpFribRubyFrame* rubyfrmeFrib = static_cast<LwpFribRubyFrame*>(pFrib);
-            rubyfrmeFrib->XFConvert(pXFPara);
-            break;
-        }
-        default :
-            break;
-    }
-    pCont->Add(pXFPara);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/lwpchangemgr.hxx b/lotuswordpro/source/filter/lwpchangemgr.hxx
index 0c12e07..3262b1b 100644
--- a/lotuswordpro/source/filter/lwpchangemgr.hxx
+++ b/lotuswordpro/source/filter/lwpchangemgr.hxx
@@ -90,7 +90,6 @@ private:
     std::map<LwpFrib*,OUString> m_HeadFootFribMap;
     std::vector<XFChangeRegion*> m_ChangeList;
     sal_uInt32 m_nCounter;
-    void ConvertFribContent(XFContentContainer* pCont, LwpFrib* pFrib);
 };
 
 #endif
diff --git a/lotuswordpro/source/filter/lwpmarker.cxx b/lotuswordpro/source/filter/lwpmarker.cxx
index 174ad2f..6229d44 100644
--- a/lotuswordpro/source/filter/lwpmarker.cxx
+++ b/lotuswordpro/source/filter/lwpmarker.cxx
@@ -165,8 +165,6 @@ void LwpCHBlkMarker::ConvertCHBlock(XFContentContainer* pXFPara, sal_uInt8 nType
     case CLICKHERE_CHBEHAVIORDATETIME:
         ProcessOtherCHB(pXFPara,nType);
         break;
-//      ProcessPageNumber(pXFPara,nType);
-//      break;
     case CLICKHERE_CHBEHAVIORSTRINGLIST:
         ProcessKeylist(pXFPara,nType);
         break;
@@ -240,30 +238,6 @@ void LwpCHBlkMarker::ProcessOtherCHB(XFContentContainer* pXFPara,sal_uInt8 nType
 
 }
 
-void LwpCHBlkMarker::ProcessPageNumber(XFContentContainer* pXFPara,sal_uInt8 nType)
-{
-    sal_Bool bFillFlag = IsHasFilled();
-    sal_Bool bHelpFlag = IsBubbleHelp();
-
-    if ( bFillFlag )
-        return;
-    if (nType == MARKER_START)
-    {
-        XFHolderStart* pHolder= new XFHolderStart;
-        pHolder->SetType(A2OUSTR("text"));
-        if (bHelpFlag)
-            pHolder->SetDesc(m_Help.str());
-        pHolder->SetPrompt(GetPromptText());
-        pXFPara->Add(pHolder);
-    }
-    else if (nType == MARKER_END)
-    {
-        XFHolderEnd* pHolder = new XFHolderEnd;
-        pXFPara->Add(pHolder);
-    }
-
-}
-
 //note: there will be a blank to mark the list
 //all input content of key list processed as normal text
 void LwpCHBlkMarker::ProcessKeylist(XFContentContainer* pXFPara,sal_uInt8 nType)
diff --git a/lotuswordpro/source/filter/lwpmarker.hxx b/lotuswordpro/source/filter/lwpmarker.hxx
index c99643c..3b78bca 100644
--- a/lotuswordpro/source/filter/lwpmarker.hxx
+++ b/lotuswordpro/source/filter/lwpmarker.hxx
@@ -144,7 +144,6 @@ public:
 private:
     void ProcessPlaceHolder(XFContentContainer* pXFPara,sal_uInt16 nAction,sal_uInt8 nType);
     void ProcessOtherCHB(XFContentContainer* pXFPara,sal_uInt8 nType);
-    void ProcessPageNumber(XFContentContainer* pXFPara,sal_uInt8 nType);
     void ProcessKeylist(XFContentContainer* pXFPara,sal_uInt8 nType);
     sal_Bool IsHasFilled();
     sal_Bool IsBubbleHelp();
diff --git a/svl/inc/svl/itempool.hxx b/svl/inc/svl/itempool.hxx
index a2e5469..a3a543e 100644
--- a/svl/inc/svl/itempool.hxx
+++ b/svl/inc/svl/itempool.hxx
@@ -149,8 +149,6 @@ public:
     void                            FillItemIdRanges_Impl( sal_uInt16*& pWhichRanges ) const;
     const sal_uInt16*                   GetFrozenIdRanges() const
                                     { return _pPoolRanges; }
-    bool                            IsVer2_Impl() const;
-
 #endif
     //---------------------------------------------------------------------
 
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index ea49c2b..2740485 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -1454,13 +1454,6 @@ bool SfxItemPool::IsCurrentVersionLoading() const
            ( !pSecondary || pSecondary->IsCurrentVersionLoading() );
 }
 
-// -----------------------------------------------------------------------
-
-bool SfxItemPool::IsVer2_Impl() const
-{
-    return pMaster->pImp->nMajorVer >= 2;
-}
-
 //-------------------------------------------------------------------------
 
 
diff --git a/svx/inc/svx/svdedtv.hxx b/svx/inc/svx/svdedtv.hxx
index e060697..6dd2d78 100644
--- a/svx/inc/svx/svdedtv.hxx
+++ b/svx/inc/svx/svdedtv.hxx
@@ -162,9 +162,6 @@ protected:
     // zurueckgesetzt.
     void ImpCheckToTopBtmPossible();
 
-    // fuer den Writer werden virtuelle Objekte buendig zusammengehalten (Z-Order)
-    void ImpBundleVirtObjOfMarkList();
-
     // fuer CombineMarkedObjects und DismantleMarkedObjects
     void ImpCopyAttributes(const SdrObject* pSource, SdrObject* pDest) const;
 
diff --git a/svx/inc/svx/svdglev.hxx b/svx/inc/svx/svdglev.hxx
index 83656ba..bb73dfe 100644
--- a/svx/inc/svx/svdglev.hxx
+++ b/svx/inc/svx/svdglev.hxx
@@ -101,7 +101,6 @@ public:
 
     // Alle merkierten Klebepunkte entfernen
     void DeleteMarkedGluePoints();
-    sal_Bool IsDeleteMarkedGluePointsPossible() const;
 
     void MoveMarkedGluePoints  (const Size& rSiz, bool bCopy=false);
     void ResizeMarkedGluePoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy=false);
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index a27d1d1..9eb613b 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -61,27 +61,6 @@
 #include <vector>
 using ::std::vector;
 
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-//
-//  @@@@@ @@@@@  @@ @@@@@@  @@ @@ @@ @@@@@ @@   @@
-//  @@    @@  @@ @@   @@    @@ @@ @@ @@    @@   @@
-//  @@    @@  @@ @@   @@    @@ @@ @@ @@    @@ @ @@
-//  @@@@  @@  @@ @@   @@    @@@@@ @@ @@@@  @@@@@@@
-//  @@    @@  @@ @@   @@     @@@  @@ @@    @@@@@@@
-//  @@    @@  @@ @@   @@     @@@  @@ @@    @@@ @@@
-//  @@@@@ @@@@@  @@   @@      @   @@ @@@@@ @@   @@
-//
-////////////////////////////////////////////////////////////////////////////////////////////////////
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-void SdrEditView::ImpBundleVirtObjOfMarkList()
-{
-  // ... fehlende Implementation
-}
-
 SdrObject* SdrEditView::GetMaxToTopObj(SdrObject* /*pObj*/) const
 {
   return NULL;
diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx
index 11061c0..7dc621a 100644
--- a/svx/source/svdraw/svdglev.cxx
+++ b/svx/source/svdraw/svdglev.cxx
@@ -232,13 +232,6 @@ void SdrGlueEditView::SetMarkedGluePointsAlign(sal_Bool bVert, sal_uInt16 nAlign
     EndUndo();
 }
 
-////////////////////////////////////////////////////////////////////////////////////////////////////
-
-sal_Bool SdrGlueEditView::IsDeleteMarkedGluePointsPossible() const
-{
-    return HasMarkedGluePoints();
-}
-
 void SdrGlueEditView::DeleteMarkedGluePoints()
 {
     BrkAction();
diff --git a/sw/source/ui/inc/hyp.hxx b/sw/source/ui/inc/hyp.hxx
index fdc997b..96ab150 100644
--- a/sw/source/ui/inc/hyp.hxx
+++ b/sw/source/ui/inc/hyp.hxx
@@ -48,7 +48,6 @@ private:
     sal_Bool            bShowError : 1; // report non existing language
     sal_Bool            bAutomatic : 1; // insert seperators without further inquiry
     sal_Bool            bInfoBox : 1;   // display info-box when ending
-    DECL_LINK( SpellError, LanguageType * );
 
 protected:
     virtual void SpellStart( SvxSpellArea eSpell );
diff --git a/sw/source/ui/lingu/hyp.cxx b/sw/source/ui/lingu/hyp.cxx
index 3731a6f..2795507 100644
--- a/sw/source/ui/lingu/hyp.cxx
+++ b/sw/source/ui/lingu/hyp.cxx
@@ -132,17 +132,6 @@ void SwHyphWrapper::SpellEnd()
     SvxSpellWrapper::SpellEnd();
 }
 
-IMPL_LINK( SwHyphWrapper, SpellError, LanguageType *, pLang )
-{
-    if (pLang &&  *pLang != nLangError )
-    {
-        nLangError = *pLang;
-        bShowError = sal_True;
-    }
-    return 0;
-}
-
-
 // -----------------------------------------------------------------------
 sal_Bool SwHyphWrapper::SpellMore()
 {
diff --git a/unusedcode.easy b/unusedcode.easy
index 461bff6..112983b 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -2,7 +2,6 @@
 (anonymous namespace)::writeInfo(com::sun::star::uno::Reference<com::sun::star::registry::XRegistryKey> const&, rtl::OUString const&, rtl::OUString const&)
 Application::PostUserEvent(unsigned long, void*)
 BasicIDEDLL::~BasicIDEDLL()
-BasicLibInfo::CalcRelStorageName(String const&)
 BasicLibs::Last()
 BasicLibs::Prev()
 BasicManager::BasicManager()
@@ -427,9 +426,7 @@ LongCurrencyFormatter::SetEmptyValue()
 LotAttrCache::ENTRY::ENTRY(ScPatternAttr const&)
 LotAttrCol::Clear()
 LwpBulletStyleMgr::GetSectionName(LwpPara*)
-LwpCHBlkMarker::ProcessPageNumber(XFContentContainer*, unsigned char)
 LwpCellLayout::GetLeaderChar()
-LwpChangeMgr::ConvertFribContent(XFContentContainer*, LwpFrib*)
 LwpCharacterBorderOverride::Override(LwpCharacterBorderOverride*)
 LwpDLList::LwpDLList(LwpDLList*, LwpDLList*)
 LwpDocData::SkipAtomHandler(LwpSvStream*)
@@ -554,7 +551,6 @@ OpenStormBento::CUtList::GetIndex(int)
 OpenStormBento::CUtList::GetPrevOrNULL(OpenStormBento::CUtListElmt*)
 OpenStormBento::LtcBenContainer::FindObjectValueStreamWithObjectIDAndProperty(unsigned long, char const*)
 OpenStormBento::LtcBenContainer::GetPosition(unsigned long*)
-OpenStormBento::LtcBenContainer::ReadAswEntry(SvStream*, OpenStormBento::AswEntry&)
 OpenStormBento::LtcBenContainer::RegisterTypeName(char const*, OpenStormBento::CBenTypeName**)
 OpenStormBento::LtcBenContainer::Release()
 Outliner::Draw(OutputDevice*, Rectangle const&, Point const&)
@@ -875,7 +871,6 @@ SdrDragView::SetDetailedEdgeDragging(unsigned char)
 SdrDragView::SetDetailedEdgeDraggingLimit(unsigned short)
 SdrDragView::SetRubberEdgeDragging(unsigned char)
 SdrDragView::SetRubberEdgeDraggingLimit(unsigned short)
-SdrEditView::ImpBundleVirtObjOfMarkList()
 SdrEditView::MoveLayer(String const&, unsigned short)
 SdrEngineDefaults::LanguageHasChanged()
 SdrEscherImport::CheckMonotypeSorts() const
@@ -891,7 +886,6 @@ SdrExchangeView::Paste(GDIMetaFile const&, Point const&, SdrObjList*, unsigned i
 SdrExchangeView::YankMarked(unsigned long)
 SdrGlobalData::GetCharClass()
 SdrGlobalData::~SdrGlobalData()
-SdrGlueEditView::IsDeleteMarkedGluePointsPossible() const
 SdrGluePoint::Draw(OutputDevice&, SdrObject const*) const
 SdrGluePoint::Mirror(Point const&, Point const&, SdrObject const*)
 SdrGrafObj::GetGDIMetaFile() const
@@ -1066,7 +1060,6 @@ SfxImageManager::SetImages(ToolBox&)
 SfxImageManager::SetImages(ToolBox&, bool)
 SfxInPlaceClient::GetActiveWindow(SfxObjectShell*, com::sun::star::uno::Reference<com::sun::star::embed::XEmbeddedObject> const&)
 SfxInPlaceClient::IsObjectActive() const
-SfxItemPool::IsVer2_Impl() const
 SfxItemPropertySetInfo::getMap() const
 SfxItemSetHint::SfxItemSetHint(SfxItemSet*)
 SfxListener::EndListening(unsigned short)
@@ -1728,7 +1721,6 @@ SwHTMLPosFlyFrms::Insert(SwHTMLPosFlyFrm* const&, unsigned short&)
 SwHTMLPosFlyFrms::Insert(SwHTMLPosFlyFrm* const*, unsigned short)
 SwHTMLPosFlyFrms::Insert(SwHTMLPosFlyFrms const*, unsigned short, unsigned short)
 SwHTMLPosFlyFrms::Remove(SwHTMLPosFlyFrm* const&, unsigned short)
-SwHyphWrapper::LinkStubSpellError(void*, void*)
 SwInsDBColumns::Insert(SwInsDBColumn* const&, unsigned short&)
 SwInsDBColumns::Insert(SwInsDBColumn* const*, unsigned short)
 SwInsDBColumns::Insert(SwInsDBColumns const*, unsigned short, unsigned short)
commit 8564eb0d6a7c8bd01bb217a18f8ab74d4e36411a
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 10 22:17:21 2011 +0100

    ByteString::ToInt64->rtl::OString::toInt64

diff --git a/vcl/unx/generic/fontmanager/fontcache.cxx b/vcl/unx/generic/fontmanager/fontcache.cxx
index e47c95e..b88d244 100644
--- a/vcl/unx/generic/fontmanager/fontcache.cxx
+++ b/vcl/unx/generic/fontmanager/fontcache.cxx
@@ -295,7 +295,8 @@ void FontCache::read()
             xub_StrLen nTEnd = aLine.Search( ':', nSearchIndex );
             if( nTEnd != STRING_NOTFOUND )
             {
-                nTimestamp = aLine.Copy( nSearchIndex, nTEnd - nSearchIndex ).ToInt64();
+                rtl::OString aTimeStamp = aLine.Copy( nSearchIndex, nTEnd - nSearchIndex );
+                nTimestamp = aTimeStamp.toInt64();
                 aDir = aLine.Copy( nTEnd+1 );
             }
             else
commit 7488e1107c461b529c1c8771fd98488588fe8645
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 10 21:58:50 2011 +0100

    ditch unused ByteString using code

diff --git a/tools/inc/tools/config.hxx b/tools/inc/tools/config.hxx
index b09e6aa..fdb0052 100644
--- a/tools/inc/tools/config.hxx
+++ b/tools/inc/tools/config.hxx
@@ -74,7 +74,6 @@ public:
     UniString           ReadKey( const ByteString& rKey, rtl_TextEncoding eEncoding ) const;
     ByteString          ReadKey( const ByteString& rKey, const ByteString& rDefault ) const;
     void                WriteKey( const ByteString& rKey, const ByteString& rValue );
-    void                WriteKey( const ByteString& rKey, const UniString& rValue, rtl_TextEncoding eEncoding );
     void                DeleteKey( const ByteString& rKey );
     ByteString          GetKeyName( sal_uInt16 nKey ) const;
     ByteString          ReadKey( sal_uInt16 nKey ) const;
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 7df9dd8..1cf7094 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -1079,15 +1079,6 @@ void Config::WriteKey( const ByteString& rKey, const ByteString& rStr )
 
 // -----------------------------------------------------------------------
 
-void Config::WriteKey( const ByteString& rKey, const UniString& rValue, rtl_TextEncoding eEncoding )
-{
-    if ( mpData->mbIsUTF8BOM  )
-        eEncoding = RTL_TEXTENCODING_UTF8;
-    WriteKey( rKey, ByteString( rValue, eEncoding ) );
-}
-
-// -----------------------------------------------------------------------
-
 void Config::DeleteKey( const ByteString& rKey )
 {
     // Config-Daten evt. updaten
diff --git a/unusedcode.easy b/unusedcode.easy
index 01c8447..461bff6 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -136,7 +136,6 @@ CommunicationLinkList::Insert(CommunicationLink const*&, unsigned short&)
 CommunicationLinkList::Insert(CommunicationLink const**, unsigned short)
 CommunicationLinkList::Insert(CommunicationLinkList const*, unsigned short, unsigned short)
 CommunicationLinkList::Remove(CommunicationLink const*&, unsigned short)
-Config::WriteKey(ByteString const&, String const&, unsigned short)
 Container::GetObjectPtr(unsigned long)
 Container::GetPos(void const*, unsigned long, unsigned char) const
 Container::Insert(void*, void*)
commit 35c83a7f4f84cb708b534c77d7344e8abb4539f9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Wed Aug 10 21:21:04 2011 +0100

    remove deprecated ByteString::CreateFromUnicode

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index df9f3c8..54a1779 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2782,7 +2782,15 @@ void ScInterpreter::ScCode()
     RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "sc", "er", "ScInterpreter::ScCode" );
 //2do: make it full range unicode?
     const String& rStr = GetString();
-    PushInt( (sal_uChar) ByteString::ConvertFromUnicode( rStr.GetChar(0), gsl_getSystemTextEncoding() ) );
+    //"classic" ByteString conversion flags
+    const sal_uInt32 convertFlags =
+        RTL_UNICODETOTEXT_FLAGS_NONSPACING_IGNORE |
+        RTL_UNICODETOTEXT_FLAGS_CONTROL_IGNORE |
+        RTL_UNICODETOTEXT_FLAGS_FLUSH |
+        RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |
+        RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT |
+        RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE;
+    PushInt( (sal_uChar) rtl::OUStringToOString(rtl::OUString(rStr.GetChar(0)), gsl_getSystemTextEncoding(), convertFlags).toChar() );
 }
 
 
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index 4ace128..0eaae97 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -175,9 +175,6 @@ private:
                                      // Append(char)
     void                operator +=(int); // not implemented; to detect misuses
                                           // of operator +=(sal_Char)
-
-    static sal_Size     ConvertFromUnicode( sal_Unicode c, sal_Char* pBuf, sal_Size nBufLen,
-                                            rtl_TextEncoding eTextEncoding );
 public:
                         ByteString();
                         ByteString( const ByteString& rStr );
@@ -257,8 +254,7 @@ public:
     ByteString&         Convert( rtl_TextEncoding eSource,
                                  rtl_TextEncoding eTarget,
                                  sal_Bool bReplace = sal_True );
-    static sal_Char     ConvertFromUnicode(sal_Unicode c,
-                                            rtl_TextEncoding eTextEncoding);
+
     ByteString&         ConvertLineEnd( LineEnd eLineEnd );
     ByteString&         ConvertLineEnd()
                             { return ConvertLineEnd( GetSystemLineEnd() ); }
diff --git a/tools/source/string/strcvt.cxx b/tools/source/string/strcvt.cxx
index d5c734b..1345a87 100644
--- a/tools/source/string/strcvt.cxx
+++ b/tools/source/string/strcvt.cxx
@@ -384,52 +384,6 @@ ByteString& ByteString::Convert( rtl_TextEncoding eSource, rtl_TextEncoding eTar
     return *this;
 }
 
-// -----------------------------------------------------------------------
-
-char ByteString::ConvertFromUnicode(sal_Unicode c, rtl_TextEncoding eTextEncoding)
-{
-    sal_Size    nLen;
-    char        aBuf[30];
-    nLen = ConvertFromUnicode(c, aBuf, sizeof( aBuf ), eTextEncoding);
-    if ( nLen == 1 )
-        return aBuf[0];
-    else
-        return 0;
-}
-
-// -----------------------------------------------------------------------
-
-sal_Size ByteString::ConvertFromUnicode( sal_Unicode c, char* pBuf, sal_Size nBufLen, rtl_TextEncoding eTextEncoding )
-{
-    // TextEncoding Dontknow wird nicht konvertiert
-    if ( eTextEncoding == RTL_TEXTENCODING_DONTKNOW )
-        return '\0';
-
-    rtl_UnicodeToTextConverter  hConverter;
-    sal_uInt32                  nInfo;
-    sal_Size                    nSrcChars;
-    sal_Size                    nDestBytes;
-    sal_Unicode                 cUni = c;
-    sal_uInt32                  nFlags = RTL_UNICODETOTEXT_FLAGS_NONSPACING_IGNORE |
-                                         RTL_UNICODETOTEXT_FLAGS_CONTROL_IGNORE |
-                                         RTL_UNICODETOTEXT_FLAGS_FLUSH;
-
-    nFlags |= RTL_UNICODETOTEXT_FLAGS_UNDEFINED_DEFAULT |
-              RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT;
-    nFlags |= RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACE;
-    if ( nBufLen > 1 )
-        nFlags |= RTL_UNICODETOTEXT_FLAGS_UNDEFINED_REPLACESTR;
-
-    hConverter = rtl_createUnicodeToTextConverter( eTextEncoding );
-    nDestBytes = rtl_convertUnicodeToText( hConverter, 0,
-                                           &cUni, 1,
-                                           (sal_Char*)pBuf, nBufLen,
-                                           nFlags,
-                                           &nInfo, &nSrcChars );
-    rtl_destroyUnicodeToTextConverter( hConverter );
-    return nDestBytes;
-}
-
 // =======================================================================
 
 ByteString::ByteString( const rtl::OString& rStr )


More information about the Libreoffice-commits mailing list