[Libreoffice-commits] .: 2 commits - basic/source sfx2/inc sfx2/source xmlhelp/source

Caolán McNamara caolan at kemper.freedesktop.org
Fri Jul 22 02:19:47 PDT 2011


 basic/source/runtime/iosys.cxx                  |    6 ++--
 sfx2/inc/sfx2/docfile.hxx                       |    6 ----
 sfx2/inc/sfx2/progress.hxx                      |    2 -
 sfx2/source/bastyp/helper.cxx                   |   27 -------------------
 sfx2/source/bastyp/progress.cxx                 |   24 ----------------
 sfx2/source/doc/docfile.cxx                     |   34 ------------------------
 sfx2/source/doc/new.cxx                         |   13 ---------
 sfx2/source/doc/objmisc.cxx                     |   27 -------------------
 sfx2/source/inc/helper.hxx                      |    1 
 sfx2/source/inc/objshimp.hxx                    |    2 -
 sfx2/source/inc/preview.hxx                     |    3 --
 xmlhelp/source/cxxhelp/provider/inputstream.cxx |    6 +++-
 12 files changed, 9 insertions(+), 142 deletions(-)

New commits:
commit 60c6906147e5b6fe8aafcd9487283478ff0d3c6e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 22 09:19:52 2011 +0100

    callcatcher: remove unused methods

diff --git a/sfx2/inc/sfx2/docfile.hxx b/sfx2/inc/sfx2/docfile.hxx
index 6b9dcdf..6c427e9 100644
--- a/sfx2/inc/sfx2/docfile.hxx
+++ b/sfx2/inc/sfx2/docfile.hxx
@@ -246,7 +246,6 @@ public:
 
     SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetInputStream_Impl();
     SAL_DLLPRIVATE void CloseAndReleaseStreams_Impl();
-    SAL_DLLPRIVATE void RefreshName_Impl();
     SAL_DLLPRIVATE sal_uInt16 AddVersion_Impl( com::sun::star::util::RevisionTag& rVersion );
     SAL_DLLPRIVATE sal_Bool TransferVersionList_Impl( SfxMedium& rMedium );
     SAL_DLLPRIVATE sal_Bool SaveVersionList_Impl( sal_Bool bUseXML );
@@ -254,8 +253,6 @@ public:
 
     SAL_DLLPRIVATE void SetExpired_Impl( const DateTime& rDateTime );
     SAL_DLLPRIVATE SvKeyValueIterator* GetHeaderAttributes_Impl();
-    SAL_DLLPRIVATE const String& GetPreRedirectedURL() const;
-    SAL_DLLPRIVATE void SetOrigFilter_Impl( const SfxFilter* pFilter );
 
     // Diese Protokolle liefern MIME Typen
     SAL_DLLPRIVATE sal_Bool SupportsMIME_Impl() const;
@@ -275,12 +272,9 @@ public:
                         { aLongName = rName; }
     SAL_DLLPRIVATE const String & GetLongName() const { return aLongName; }
     SAL_DLLPRIVATE ErrCode CheckOpenMode_Impl( sal_Bool bSilent, sal_Bool bAllowRO = sal_True );
-    SAL_DLLPRIVATE sal_Bool IsDownloadDone_Impl();
     SAL_DLLPRIVATE sal_Bool IsPreview_Impl();
     SAL_DLLPRIVATE void ClearBackup_Impl();
     SAL_DLLPRIVATE void Done_Impl( ErrCode );
-    SAL_DLLPRIVATE void DataAvailable_Impl();
-    SAL_DLLPRIVATE void Cancel_Impl();
     SAL_DLLPRIVATE void SetPhysicalName_Impl(const String& rName);
     SAL_DLLPRIVATE void CanDisposeStorage_Impl( sal_Bool bDisposeStorage );
     SAL_DLLPRIVATE sal_Bool WillDisposeStorageOnClose_Impl();
diff --git a/sfx2/inc/sfx2/progress.hxx b/sfx2/inc/sfx2/progress.hxx
index d8a580a..c785aca 100644
--- a/sfx2/inc/sfx2/progress.hxx
+++ b/sfx2/inc/sfx2/progress.hxx
@@ -82,8 +82,6 @@ public:
 
     DECL_DLLPRIVATE_STATIC_LINK( SfxProgress, SetStateHdl, PlugInLoadStatus* );
     DECL_DLLPRIVATE_STATIC_LINK( SfxProgress, DefaultBindingProgress, SvProgressArg* );
-    SAL_DLLPRIVATE bool  StatusBarManagerGone_Impl(SfxStatusBarManager*pStb);
-    SAL_DLLPRIVATE const String& GetStateText_Impl() const;
 };
 
 #endif
diff --git a/sfx2/source/bastyp/helper.cxx b/sfx2/source/bastyp/helper.cxx
index 15d40a0..e00fbda 100644
--- a/sfx2/source/bastyp/helper.cxx
+++ b/sfx2/source/bastyp/helper.cxx
@@ -121,33 +121,6 @@ sal_Bool SfxContentHelper::IsDocument( const String& rContent )
 
 // -----------------------------------------------------------------------
 
-sal_Bool SfxContentHelper::Kill( const String& rContent )
-{
-    sal_Bool bRet = sal_True;
-    INetURLObject aDeleteObj( rContent );
-    DBG_ASSERT( aDeleteObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" );
-
-    try
-    {
-        ::ucbhelper::Content aCnt( aDeleteObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
-        aCnt.executeCommand( OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), uno::makeAny( sal_Bool( sal_True ) ) );
-    }
-    catch( const ucb::CommandAbortedException& )
-    {
-        DBG_WARNING( "CommandAbortedException" );
-        bRet = sal_False;
-    }
-    catch( const uno::Exception& )
-    {
-        DBG_ERRORFILE( "Any other exception" );
-        bRet = sal_False;
-    }
-
-    return bRet;
-}
-
-// -----------------------------------------------------------------------
-
 uno::Sequence < OUString > SfxContentHelper::GetResultSet( const String& rURL )
 {
     StringList_Impl* pList = NULL;
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 625440d..1482b04 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -258,13 +258,6 @@ void SfxProgress::SetText
 
 // -----------------------------------------------------------------------
 
-const String& SfxProgress::GetStateText_Impl() const
-{
-    return pImp->aStateText;
-}
-
-// -----------------------------------------------------------------------
-
 // Required in App data
 static sal_uIntPtr nLastTime = 0;
 
@@ -669,21 +662,4 @@ void SfxProgress::LeaveLock()
     pImp->nRescheduleLocks--;
 }
 
-// -----------------------------------------------------------------------
-
-bool SfxProgress::StatusBarManagerGone_Impl
-(
-    SfxStatusBarManager *       // This <SfxStatusBarManager> will be destroyed
-)
-
-/*  [Description]
-
-    Internal method for notifying the SfxProgress that the specified 
-    SfxStatusBarManger will be destroyed so that the Progress can let go of it.
-*/
-
-{
-    return sal_True;
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 5386853..bd1f9b1 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -323,17 +323,6 @@ public:
     ~SfxMedium_Impl();
 };
 
-void SfxMedium::DataAvailable_Impl()
-{
-    pImp->aAvailableLink.ClearPendingCall();
-    pImp->aAvailableLink.Call( NULL );
-}
-
-void SfxMedium::Cancel_Impl()
-{
-    SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
-}
-
 //------------------------------------------------------------------
 SfxMedium_Impl::SfxMedium_Impl( SfxMedium* pAntiImplP )
  :  SvCompatWeakBase( pAntiImplP ),
@@ -2587,13 +2576,6 @@ const SfxFilter* SfxMedium::GetOrigFilter( sal_Bool bNotCurrent ) const
 
 //----------------------------------------------------------------
 
-void SfxMedium::SetOrigFilter_Impl( const SfxFilter* pOrigFilter )
-{
-    pImp->pOrigFilter = pOrigFilter;
-}
-
-//------------------------------------------------------------------
-
 sal_uInt32 SfxMedium::CreatePasswordToModifyHash( const ::rtl::OUString& aPasswd, sal_Bool bWriter )
 {
     sal_uInt32 nHash = 0;
@@ -2753,10 +2735,6 @@ void SfxMedium::CloseStreams_Impl()
 
 //------------------------------------------------------------------
 
-void SfxMedium::RefreshName_Impl()
-{
-}
-
 void SfxMedium::SetIsRemote_Impl()
 {
     INetURLObject aObj( GetName() );
@@ -3040,13 +3018,6 @@ const INetURLObject& SfxMedium::GetURLObject() const
 
 //----------------------------------------------------------------
 
-const String& SfxMedium::GetPreRedirectedURL() const
-{
-    return pImp->aPreRedirectionURL;
-}
-
-//----------------------------------------------------------------
-
 void SfxMedium::SetReferer( const String& rRefer )
 {
     pImp->aReferer = rRefer;
@@ -3144,11 +3115,6 @@ SvCompatWeakHdl* SfxMedium::GetHdl()
     return pImp->GetHdl();
 }
 
-sal_Bool SfxMedium::IsDownloadDone_Impl()
-{
-    return pImp->bDownloadDone;
-}
-
 ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >  SfxMedium::GetInputStream()
 {
     if ( !pImp->xInputStream.is() )
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 0695d9d..f487e66 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -104,19 +104,6 @@ void SfxPreviewBase_Impl::Resize()
     Invalidate();
 }
 
-void SfxPreviewBase_Impl::SetGDIFile( ::boost::shared_ptr<GDIMetaFile> pFile )
-{
-    pMetaFile = pFile;
-    Invalidate();
-}
-
-SfxFrameWindow* SfxPreviewWin_Impl::PreviewFactory(
-    SfxFrame* pFrame, const String& /*rName*/ )
-{
-    return new SfxFrameWindow( new SfxPreviewWin_Impl(
-        &pFrame->GetCurrentViewFrame()->GetWindow()  ) );
-}
-
 void SfxPreviewWin_Impl::ImpPaint(
     const Rectangle&, GDIMetaFile* pFile, Window* pWindow )
 {
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 98ded9f..eb5798a 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2079,33 +2079,6 @@ sal_Bool SfxObjectShell::UseInteractionToHandleError(
     return bResult;
 }
 
-sal_Bool SfxObjectShell_Impl::NeedsOfficeUpdateDialog()
-{
-    // if the configuration is not available for any reason, the default behavior is to show the message
-    sal_Bool bResult = sal_True;
-
-    try
-    {
-        uno::Reference< lang::XMultiServiceFactory > xServiceManager( ::comphelper::getProcessServiceFactory(), uno::UNO_SET_THROW );
-        uno::Reference< uno::XInterface > xCommonConfig(
-                        ::comphelper::ConfigurationHelper::openConfig(
-                            xServiceManager,
-                            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/org.openoffice.Office.Common" ) ),
-                            ::comphelper::ConfigurationHelper::E_STANDARD ),
-                        uno::UNO_SET_THROW );
-
-        ::comphelper::ConfigurationHelper::readRelativeKey(
-                        xCommonConfig,
-                        ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Load/" ) ),
-                        ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ShowOfficeUpdateDialog" ) ) ) >>= bResult;
-    }
-    catch( uno::Exception& )
-    {
-    }
-
-    return bResult;
-}
-
 sal_Int16 SfxObjectShell_Impl::getCurrentMacroExecMode() const
 {
     sal_Int16 nImposedExecMode( MacroExecMode::NEVER_EXECUTE );
diff --git a/sfx2/source/inc/helper.hxx b/sfx2/source/inc/helper.hxx
index ebad5da..5ee62f4 100644
--- a/sfx2/source/inc/helper.hxx
+++ b/sfx2/source/inc/helper.hxx
@@ -43,7 +43,6 @@ class SfxContentHelper
 {
 public:
     static sal_Bool				IsDocument( const String& rContent );
-    static sal_Bool				Kill( const String& rContent );
 
     static ::com::sun::star::uno::Sequence< ::rtl::OUString >
                                 GetResultSet( const String& rURL );
diff --git a/sfx2/source/inc/objshimp.hxx b/sfx2/source/inc/objshimp.hxx
index 7d2278c..b76bf1e 100644
--- a/sfx2/source/inc/objshimp.hxx
+++ b/sfx2/source/inc/objshimp.hxx
@@ -157,8 +157,6 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
     SfxObjectShell_Impl( SfxObjectShell& _rDocShell );
     virtual ~SfxObjectShell_Impl();
 
-    static sal_Bool NeedsOfficeUpdateDialog();
-
     // IMacroDocumentAccess overridables
     virtual sal_Int16 getCurrentMacroExecMode() const;
     virtual sal_Bool setCurrentMacroExecMode( sal_uInt16 nMacroMode );
diff --git a/sfx2/source/inc/preview.hxx b/sfx2/source/inc/preview.hxx
index e6feb4e..037bdd0 100644
--- a/sfx2/source/inc/preview.hxx
+++ b/sfx2/source/inc/preview.hxx
@@ -48,7 +48,6 @@ public:
                     SfxPreviewBase_Impl( Window* pParent );
                     ~SfxPreviewBase_Impl(  );
     void            SetObjectShell( SfxObjectShell* pObj );
-    void            SetGDIFile( ::boost::shared_ptr<GDIMetaFile> pFile );
     virtual void    Resize();
 };
 
@@ -66,8 +65,6 @@ public:
                     : SfxPreviewBase_Impl( pParent ){};
     static void     ImpPaint(
         const Rectangle& rRect, GDIMetaFile* pFile, Window* pWindow );
-    static SfxFrameWindow*
-                    PreviewFactory( SfxFrame* pFrame, const String& rName );
 };
 
 #endif
commit e00416c7258e0400464d09cd5e955d8fb5cb76a0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jul 21 13:14:21 2011 +0100

    check return of osl_setFilePos

diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index 65d1d20..6967048 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -377,10 +377,12 @@ sal_uIntPtr OslStream::PutData( const void* pData, sal_uIntPtr nSize )
 
 sal_uIntPtr OslStream::SeekPos( sal_uIntPtr nPos )
 {
+    ::osl::FileBase::RC rc = ::osl::FileBase::E_None;
     if( nPos == STREAM_SEEK_TO_END )
-        maFile.setPos( osl_Pos_End, 0 );
+        rc = maFile.setPos( osl_Pos_End, 0 );
     else
-        maFile.setPos( osl_Pos_Absolut, (sal_uInt64)nPos );
+        rc = maFile.setPos( osl_Pos_Absolut, (sal_uInt64)nPos );
+    OSL_ENSURE(rc == ::osl::FileBase::E_None, "bad seek");
     sal_uInt64 nRealPos(0);
     maFile.getPos( nRealPos );
     return sal::static_int_cast<sal_uIntPtr>(nRealPos);
diff --git a/xmlhelp/source/cxxhelp/provider/inputstream.cxx b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
index fd2ec40..48ebd0e 100644
--- a/xmlhelp/source/cxxhelp/provider/inputstream.cxx
+++ b/xmlhelp/source/cxxhelp/provider/inputstream.cxx
@@ -137,7 +137,11 @@ XInputStream_impl::skipBytes(
            io::IOException,
            uno::RuntimeException)
 {
-    m_aFile.setPos( osl_Pos_Current, sal_uInt64( nBytesToSkip ) );
+    if (m_aFile.setPos(osl_Pos_Current, sal_uInt64(nBytesToSkip)) != osl::FileBase::E_None)
+    {
+        throw io::IOException(::rtl::OUString(
+            RTL_CONSTASCII_USTRINGPARAM("XInputStream_impl::skipBytes failed seek")), uno::Reference< uno::XInterface >());
+    }
 }
 
 


More information about the Libreoffice-commits mailing list