diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-20 21:57:36 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-22 09:39:15 +0100 |
commit | af6752b88e34df05449a4237d9be0fac509c227c (patch) | |
tree | 39eb9c3f30cfa12bba0546db5d643512323c9084 /unotools | |
parent | b2d7ede98716806cc4b3ea8547247175d5f04d18 (diff) |
callcatcher: remove unused methods
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/inc/unotools/datetime.hxx | 3 | ||||
-rw-r--r-- | unotools/inc/unotools/regoptions.hxx | 9 | ||||
-rw-r--r-- | unotools/inc/unotools/ucbhelper.hxx | 7 | ||||
-rw-r--r-- | unotools/inc/unotools/ucblockbytes.hxx | 1 | ||||
-rw-r--r-- | unotools/source/config/regoptions.cxx | 24 | ||||
-rw-r--r-- | unotools/source/misc/datetime.cxx | 17 | ||||
-rw-r--r-- | unotools/source/ucbhelper/ucbhelper.cxx | 166 | ||||
-rw-r--r-- | unotools/source/ucbhelper/ucblockbytes.cxx | 9 |
8 files changed, 0 insertions, 236 deletions
diff --git a/unotools/inc/unotools/datetime.hxx b/unotools/inc/unotools/datetime.hxx index 282d6df3a63f..40f2a977589f 100644 --- a/unotools/inc/unotools/datetime.hxx +++ b/unotools/inc/unotools/datetime.hxx @@ -47,9 +47,6 @@ namespace utl namespace starutil = ::com::sun::star::util; - UNOTOOLS_DLLPUBLIC void typeConvert(const Time& _rTime, starutil::Time& _rOut); - UNOTOOLS_DLLPUBLIC void typeConvert(const starutil::Time& _rTime, Time& _rOut); - UNOTOOLS_DLLPUBLIC void typeConvert(const Date& _rDate, starutil::Date& _rOut); UNOTOOLS_DLLPUBLIC void typeConvert(const starutil::Date& _rDate, Date& _rOut); diff --git a/unotools/inc/unotools/regoptions.hxx b/unotools/inc/unotools/regoptions.hxx index 0303ca300e91..639e08ad836c 100644 --- a/unotools/inc/unotools/regoptions.hxx +++ b/unotools/inc/unotools/regoptions.hxx @@ -58,9 +58,6 @@ namespace utl // retrieves the URL which should be used for online registration String getRegistrationURL( ) const; - // checks if the menu item which can be used to trigger the online registration should be available - sal_Bool allowMenu( ) const; - enum DialogPermission { // the registration dialog shall be executed .... dpDisabled, // ... never - it has been disabled @@ -105,12 +102,6 @@ namespace utl done implicitly when you call <method>activateReminder</method>.</p> */ void activateReminder( sal_Int32 _nDaysFromNow ); - - /** removes the reminder - - <p>If this method is called, the reminder for the dialog will be removed. - */ - void removeReminder(); }; //........................................................................ diff --git a/unotools/inc/unotools/ucbhelper.hxx b/unotools/inc/unotools/ucbhelper.hxx index 44af28b17ecc..be94ea41bf4d 100644 --- a/unotools/inc/unotools/ucbhelper.hxx +++ b/unotools/inc/unotools/ucbhelper.hxx @@ -61,24 +61,17 @@ namespace utl static ::com::sun::star::uno::Sequence< ::rtl::OUString > GetFolderContents( const String& rFolder, sal_Bool bFolder, sal_Bool bSorted = sal_False ); - static ::com::sun::star::uno::Sequence< ::rtl::OUString > GetResultSet( const String& rURL ); - static sal_Bool CopyTo( const String& rSource, const String& rDest ); - static sal_Bool MoveTo( const String& rSource, const String& rDest, sal_Int32 nNameClash = com::sun::star::ucb::NameClash::ERROR ); - - static sal_Bool CanMakeFolder( const String& rFolder ); static sal_Bool MakeFolder( const String& rFolder, sal_Bool bNewOnly = sal_False ); static sal_Bool MakeFolder( ::ucbhelper::Content& rParent, const String& rTitle, ::ucbhelper::Content& rNewFolder, sal_Bool bNewOnly = sal_False ); - static sal_Bool HasParentFolder( const String& rFolder ); static sal_uLong GetSize( const String& rContent ); static sal_Bool IsYounger( const String& rIsYoung, const String& rIsOlder ); static sal_Bool Exists( const String& rContent ); - static sal_Bool FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim = ';', sal_Bool bAllowWildCards = sal_True ); static sal_Bool Find( const String& rFolder, const String& rName, String& rFile, sal_Bool bAllowWildCards = sal_False ); static sal_Bool IsSubPath( const ::rtl::OUString& rPath, const ::rtl::OUString& rChildCandidate, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentProvider >& xContentProvider = ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentProvider >() ); static sal_Bool EqualURLs( const ::rtl::OUString& aFirstURL, const ::rtl::OUString& aSecondURL ); diff --git a/unotools/inc/unotools/ucblockbytes.hxx b/unotools/inc/unotools/ucblockbytes.hxx index d3c53e882fec..141296d8e1e9 100644 --- a/unotools/inc/unotools/ucblockbytes.hxx +++ b/unotools/inc/unotools/ucblockbytes.hxx @@ -174,7 +174,6 @@ public: // calling this method delegates the responsibility to call closeinput to the caller! NS_UNO::Reference < NS_IO::XInputStream > getInputStream(); - NS_UNO::Reference < NS_IO::XStream > getStream(); #if _SOLAR__PRIVATE sal_Bool setInputStream_Impl( const NS_UNO::Reference < NS_IO::XInputStream > &rxInputStream, diff --git a/unotools/source/config/regoptions.cxx b/unotools/source/config/regoptions.cxx index 6207c5544429..cb6134a3d097 100644 --- a/unotools/source/config/regoptions.cxx +++ b/unotools/source/config/regoptions.cxx @@ -182,7 +182,6 @@ namespace utl static void revokeClient( ); inline sal_Bool hasURL( ) const { return ( 0 != m_sRegistrationURL.Len() ); } - inline sal_Bool allowMenu( ) const { return hasURL() && m_bShowMenuItem; } inline String getRegistrationURL( ) const { return m_sRegistrationURL; } RegOptions::DialogPermission getDialogPermission( ) const; @@ -467,29 +466,6 @@ namespace utl const_cast< RegOptions* >( this )->ensureImpl( ); m_pImpl->activateReminder( _nDaysFromNow ); } - - //-------------------------------------------------------------------- - sal_Bool RegOptions::allowMenu( ) const - { - /// we cache this setting, 'cause it is needed very often - static sal_Bool bKnowMenuPermission = sal_False; - static sal_Bool bAllowMenu = sal_False; - - if ( !bKnowMenuPermission ) - { - const_cast< RegOptions* >( this )->ensureImpl( ); - bAllowMenu = m_pImpl->allowMenu(); - bKnowMenuPermission = sal_True; - } - return bAllowMenu; - } - - //-------------------------------------------------------------------- - void RegOptions::removeReminder() - { - const_cast< RegOptions* >( this )->ensureImpl( ); - m_pImpl->removeReminder(); - } //........................................................................ } // namespace utl //........................................................................ diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx index 428cc05f3cb3..98cfcffa31d5 100644 --- a/unotools/source/misc/datetime.cxx +++ b/unotools/source/misc/datetime.cxx @@ -36,23 +36,6 @@ //......................................................................... namespace utl { -//......................................................................... - -//------------------------------------------------------------------ -void typeConvert(const Time& _rTime, starutil::Time& _rOut) -{ - _rOut.Hours = _rTime.GetHour(); - _rOut.Minutes = _rTime.GetMin(); - _rOut.Seconds = _rTime.GetSec(); - _rOut.HundredthSeconds = _rTime.Get100Sec(); -} - -//------------------------------------------------------------------ -void typeConvert(const starutil::Time& _rTime, Time& _rOut) -{ - _rOut = Time(_rTime.Hours, _rTime.Minutes, _rTime.Seconds, _rTime.HundredthSeconds); -} - //------------------------------------------------------------------ void typeConvert(const Date& _rDate, starutil::Date& _rOut) { diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index 513a8e0672ce..5636886558cd 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -387,128 +387,6 @@ Sequence < OUString > UCBContentHelper::GetFolderContents( const String& rFolder // ----------------------------------------------------------------------- -Sequence < OUString > UCBContentHelper::GetResultSet( const String& rURL ) -{ - StringList_Impl* pList = NULL; - try - { - Content aCnt( rURL, uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >() ); - uno::Reference< XResultSet > xResultSet; - uno::Reference< com::sun::star::ucb::XDynamicResultSet > xDynResultSet; - Sequence< OUString > aProps(3); - OUString* pProps = aProps.getArray(); - pProps[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); - pProps[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("ContentType")); - // TODO: can be optimized, property never used: - pProps[2] = OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")); - - try - { - xDynResultSet = aCnt.createDynamicCursor( aProps, INCLUDE_FOLDERS_AND_DOCUMENTS ); - if ( xDynResultSet.is() ) - xResultSet = xDynResultSet->getStaticResultSet(); - } - catch( ::com::sun::star::ucb::CommandAbortedException& ) - { - } - catch( ::com::sun::star::uno::Exception& ) - { - } - - if ( xResultSet.is() ) - { - pList = new StringList_Impl; - uno::Reference< com::sun::star::sdbc::XRow > xRow( xResultSet, UNO_QUERY ); - uno::Reference< com::sun::star::ucb::XContentAccess > xContentAccess( xResultSet, UNO_QUERY ); - - try - { - while ( xResultSet->next() ) - { - String aTitle( xRow->getString(1) ); - String aType( xRow->getString(2) ); - String aRow = aTitle; - aRow += '\t'; - aRow += aType; - aRow += '\t'; - aRow += String( xContentAccess->queryContentIdentifierString() ); - OUString* pRow = new OUString( aRow ); - pList->push_back( pRow ); - } - } - catch( ::com::sun::star::ucb::CommandAbortedException& ) - { - } - catch( ::com::sun::star::uno::Exception& ) - { - } - } - } - catch( ::com::sun::star::uno::Exception& ) - { - } - - if ( pList ) - { - size_t nCount = pList->size(); - Sequence < OUString > aRet( nCount ); - OUString* pRet = aRet.getArray(); - for ( size_t i = 0; i < nCount; ++i ) - { - OUString* pEntry = (*pList)[ i ]; - pRet[i] = *( pEntry ); - delete pEntry; - } - delete pList; - return aRet; - } - else - return Sequence < OUString > (); -} - -// ----------------------------------------------------------------------- - -sal_Bool UCBContentHelper::CopyTo( const String& rSource, const String& rDest ) -{ - return Transfer_Impl( rSource, rDest, sal_False, NameClash::ERROR ); -} - -// ----------------------------------------------------------------------- - -sal_Bool UCBContentHelper::MoveTo( const String& rSource, const String& rDest, sal_Int32 nNameClash ) -{ - return Transfer_Impl( rSource, rDest, sal_True, nNameClash ); -} - -// ----------------------------------------------------------------------- - -sal_Bool UCBContentHelper::CanMakeFolder( const String& rFolder ) -{ - try - { - Content aCnt( rFolder, uno::Reference< XCommandEnvironment > () ); - Sequence< ContentInfo > aInfo = aCnt.queryCreatableContentsInfo(); - sal_Int32 nCount = aInfo.getLength(); - if ( nCount == 0 ) - return sal_False; - - for ( sal_Int32 i = 0; i < nCount; ++i ) - { - // Simply look for the first KIND_FOLDER... - const ContentInfo & rCurr = aInfo[i]; - if ( rCurr.Attributes & ContentInfoAttribute::KIND_FOLDER ) - return sal_True; - } - } - catch( ::com::sun::star::ucb::CommandAbortedException& ) {} - catch( RuntimeException& ) {} - catch( Exception& ) {} - - return sal_False; -} - -// ----------------------------------------------------------------------- - sal_Bool UCBContentHelper::MakeFolder( const String& rFolder, sal_Bool bNewOnly ) { INetURLObject aURL( rFolder ); @@ -600,35 +478,6 @@ sal_Bool UCBContentHelper::MakeFolder( Content& aCnt, const String& aTitle, Cont // ----------------------------------------------------------------------- -sal_Bool UCBContentHelper::HasParentFolder( const String& rFolder ) -{ - sal_Bool bRet = sal_False; - try - { - Content aCnt( rFolder, uno::Reference< XCommandEnvironment > () ); - uno::Reference< XChild > xChild( aCnt.get(), UNO_QUERY ); - if ( xChild.is() ) - { - uno::Reference< XContent > xParent( xChild->getParent(), UNO_QUERY ); - if ( xParent.is() ) - { - String aParentURL = String( xParent->getIdentifier()->getContentIdentifier() ); - bRet = ( aParentURL.Len() > 0 && aParentURL != rFolder ); - } - } - } - catch( ::com::sun::star::ucb::CommandAbortedException& ) - { - } - catch( ::com::sun::star::uno::Exception& ) - { - } - - return bRet; -} - -// ----------------------------------------------------------------------- - sal_uLong UCBContentHelper::GetSize( const String& rContent ) { sal_uLong nSize = 0; @@ -762,21 +611,6 @@ sal_Bool UCBContentHelper::Exists( const String& rURL ) } // ----------------------------------------------------------------------- -sal_Bool UCBContentHelper::FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim, sal_Bool bAllowWildCards ) -{ - // extract the single folder names from the path variable and try to find the file in one of these folders - sal_uInt16 nTokenCount = rPath.GetTokenCount( cDelim ); - for ( sal_uInt16 nToken = 0; nToken < nTokenCount; ++nToken ) - { - String aPath = rPath.GetToken( nToken, cDelim ); - if ( Find( aPath, rName, rFile, bAllowWildCards ) ) - return sal_True; - } - - return sal_False; -} - -// ----------------------------------------------------------------------- sal_Bool UCBContentHelper::IsSubPath( const ::rtl::OUString& rPath, const ::rtl::OUString& rSubfolderCandidate, const uno::Reference< ::com::sun::star::ucb::XContentProvider >& xProv ) { sal_Bool bResult = sal_False; diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx index 5393cb972813..b9b75ce3049a 100644 --- a/unotools/source/ucbhelper/ucblockbytes.cxx +++ b/unotools/source/ucbhelper/ucblockbytes.cxx @@ -1296,15 +1296,6 @@ Reference < XInputStream > UcbLockBytes::getInputStream() return m_xInputStream; } -Reference < XStream > UcbLockBytes::getStream() -{ - osl::MutexGuard aGuard( m_aMutex ); - Reference < XStream > xStream( m_xSeekable, UNO_QUERY ); - if ( xStream.is() ) - m_bDontClose = sal_True; - return xStream; -} - //---------------------------------------------------------------------------- sal_Bool UcbLockBytes::setStream_Impl( const Reference<XStream>& aStream ) |