[Libreoffice-commits] .: sfx2/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Jul 21 02:35:05 PDT 2011


 sfx2/source/appl/sfxhelp.cxx  |   26 ---------------------
 sfx2/source/bastyp/helper.cxx |   50 ------------------------------------------
 sfx2/source/inc/helper.hxx    |    4 ---
 3 files changed, 80 deletions(-)

New commits:
commit b91759e620b44e2ea19383178b53465e6ee0bdcb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 21 09:25:41 2011 +0100

    unused methods

diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 70de782..2285449 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -327,7 +327,6 @@ private:
     sal_Bool							m_bIsDebug;		// environment variable "help_debug=1"
     SfxHelpOptions_Impl*				m_pOpt;			// the options
     ::std::vector< ::rtl::OUString >	m_aModulesList;	// list of all installed modules
-    void					Load();
 
 public:
     SfxHelp_Impl( sal_Bool bDebug );
@@ -350,31 +349,6 @@ SfxHelp_Impl::~SfxHelp_Impl()
     delete m_pOpt;
 }
 
-void SfxHelp_Impl::Load()
-{
-    // fill modules list
-    // create the help url (empty, without module and helpid)
-    String sHelpURL( DEFINE_CONST_UNICODE("vnd.sun.star.help://") );
-    AppendConfigToken( sHelpURL, sal_True );
-
-    // open ucb content and get the list of the help modules
-    // the list contains strings with three tokens "ui title \t type \t url"
-    Sequence< ::rtl::OUString > aAllModulesList = SfxContentHelper::GetResultSet( sHelpURL );
-    sal_Int32 nLen = aAllModulesList.getLength();
-    m_aModulesList.reserve( nLen + 1 );
-    const ::rtl::OUString* pBegin = aAllModulesList.getConstArray();
-    const ::rtl::OUString* pEnd	= pBegin + nLen;
-    for ( ; pBegin != pEnd; ++pBegin )
-    {
-        // get one module string
-        String sModule( *pBegin );
-        // extract the url
-        String sURL = sModule.GetToken( 2, '\t' );
-        // insert the module (the host part of the "vnd.sun.star.help" url)
-        m_aModulesList.push_back( ::rtl::OUString( INetURLObject( sURL ).GetHost() ) );
-    }
-}
-
 String SfxHelp_Impl::GetHelpText( const rtl::OUString& aCommandURL, const String& rModule )
 {
     // create help url
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 26bbae4..15d40a0 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -86,56 +86,6 @@ void AppendDateTime_Impl( const util::DateTime rDT,
     rRow += aDateStr;
 }
 
-// SfxContentHelper ------------------------------------------------------
-
-sal_Bool SfxContentHelper::Transfer_Impl( const String& rSource, const String& rDest, sal_Bool bMoveData, sal_Int32 nNameClash )
-{
-    sal_Bool bRet = sal_True, bKillSource = sal_False;
-    INetURLObject aSourceObj( rSource );
-    DBG_ASSERT( aSourceObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
-
-    INetURLObject aDestObj( rDest );
-    DBG_ASSERT( aDestObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
-    if ( bMoveData && aSourceObj.GetProtocol() != aDestObj.GetProtocol() )
-    {
-        bMoveData = sal_False;
-        bKillSource = sal_True;
-    }
-    String aName = aDestObj.getName();
-    aDestObj.removeSegment();
-    aDestObj.setFinalSlash();
-
-    try
-    {
-        ::ucbhelper::Content aDestPath( aDestObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
-        uno::Reference< ucb::XCommandInfo > xInfo = aDestPath.getCommands();
-        OUString aTransferName(RTL_CONSTASCII_USTRINGPARAM("transfer"));
-        if ( xInfo->hasCommandByName( aTransferName ) )
-        {
-            aDestPath.executeCommand( aTransferName, uno::makeAny(
-                ucb::TransferInfo( bMoveData, aSourceObj.GetMainURL( INetURLObject::NO_DECODE ), aName, nNameClash ) ) );
-        }
-        else
-        {
-            DBG_ERRORFILE( "transfer command not available" );
-        }
-    }
-    catch( const ucb::CommandAbortedException& )
-    {
-        bRet = sal_False;
-    }
-    catch( const uno::Exception& )
-    {
-        DBG_ERRORFILE( "Any other exception" );
-        bRet = sal_False;
-    }
-
-    if ( bKillSource )
-        SfxContentHelper::Kill( rSource );
-
-    return bRet;
-}
-
 // -----------------------------------------------------------------------
 
 sal_Bool SfxContentHelper::IsDocument( const String& rContent )
diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx
index e767a14..ebad5da 100644
--- a/sfx2/source/inc/helper.hxx
+++ b/sfx2/source/inc/helper.hxx
@@ -41,10 +41,6 @@
 
 class SfxContentHelper
 {
-private:
-    static sal_Bool             Transfer_Impl( const String& rSource, const String& rDest, sal_Bool bMoveData,
-                                                    sal_Int32 nNameClash );
-
 public:
     static sal_Bool				IsDocument( const String& rContent );
     static sal_Bool				Kill( const String& rContent );


More information about the Libreoffice-commits mailing list