[Libreoffice-commits] core.git: include/sfx2 sfx2/source

Stephan Bergmann sbergman at redhat.com
Thu Apr 10 00:32:20 PDT 2014


 include/sfx2/childwin.hxx               |    2 +
 sfx2/source/appl/appdde.cxx             |   23 ++++++++------
 sfx2/source/appl/appopen.cxx            |   28 -----------------
 sfx2/source/appl/fwkhelper.cxx          |    5 ++-
 sfx2/source/appl/helpinterceptor.cxx    |    4 --
 sfx2/source/appl/linksrc.cxx            |    2 -
 sfx2/source/bastyp/progress.cxx         |   19 -----------
 sfx2/source/control/bindings.cxx        |   20 ------------
 sfx2/source/control/dispatch.cxx        |   10 ------
 sfx2/source/control/querystatus.cxx     |   11 +++---
 sfx2/source/dialog/dinfdlg.cxx          |    3 -
 sfx2/source/dialog/dockwin.cxx          |    4 --
 sfx2/source/dialog/filedlghelper.cxx    |   33 --------------------
 sfx2/source/dialog/mailmodel.cxx        |   24 --------------
 sfx2/source/dialog/tabdlg.cxx           |   52 --------------------------------
 sfx2/source/dialog/taskpane.cxx         |    7 ----
 sfx2/source/dialog/versdlg.cxx          |   35 ++-------------------
 sfx2/source/doc/SfxDocumentMetaData.cxx |    9 ++---
 sfx2/source/doc/docfile.cxx             |   42 -------------------------
 sfx2/source/doc/docinsert.cxx           |    4 --
 sfx2/source/doc/doctempl.cxx            |    2 -
 sfx2/source/doc/docundomanager.cxx      |    1 
 sfx2/source/doc/iframe.cxx              |    5 ---
 sfx2/source/doc/new.cxx                 |    1 
 sfx2/source/doc/objserv.cxx             |   19 -----------
 sfx2/source/doc/objstor.cxx             |    3 -
 sfx2/source/doc/oleprops.cxx            |    7 ----
 sfx2/source/doc/syspath.cxx             |    2 +
 sfx2/source/explorer/nochaos.cxx        |    8 +---
 sfx2/source/inc/appopen.hxx             |   35 +++++++++++++++++++++
 sfx2/source/sidebar/ResourceManager.cxx |    9 -----
 sfx2/source/sidebar/ResourceManager.hxx |    2 -
 sfx2/source/view/frmload.cxx            |    5 ---
 sfx2/source/view/viewfrm.cxx            |   13 --------
 34 files changed, 77 insertions(+), 372 deletions(-)

New commits:
commit 1d25e1de0b9498e469cb052b2d86bf7f7ae6adae
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Apr 10 09:31:46 2014 +0200

    Clean up function declarations and some unused functions
    
    Change-Id: I9d6e9df0b686c61597aaa0e194ab321445671a20

diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index 0dec11a..966056e 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -364,7 +364,9 @@ public:
             ((SfxToolbox*)GetWindow())->FillInfo( aInfo );  \
             return aInfo; }
 
+bool GetPosSizeFromString( const OUString& rStr, Point& rPos, Size& rSize );
 
+bool GetSplitSizeFromString( const OUString& rStr, Size& rSize );
 
 #endif
 
diff --git a/sfx2/source/appl/appdde.cxx b/sfx2/source/appl/appdde.cxx
index 65080b5..c034467 100644
--- a/sfx2/source/appl/appdde.cxx
+++ b/sfx2/source/appl/appdde.cxx
@@ -44,7 +44,7 @@
 #include <comphelper/string.hxx>
 #include <com/sun/star/ucb/IllegalIdentifierException.hpp>
 
-
+#if defined WNT
 
 OUString SfxDdeServiceName_Impl( const OUString& sIn )
 {
@@ -60,7 +60,6 @@ OUString SfxDdeServiceName_Impl( const OUString& sIn )
     return sReturn.makeStringAndClear();
 }
 
-#if defined( WNT )
 class ImplDdeService : public DdeService
 {
 public:
@@ -199,16 +198,19 @@ bool ImplDdeService::SysTopicExecute( const OUString* pStr )
 
 class SfxDdeTriggerTopic_Impl : public DdeTopic
 {
+#if defined WNT
 public:
     SfxDdeTriggerTopic_Impl()
         : DdeTopic( "TRIGGER" )
         {}
 
-    virtual bool Execute( const OUString* ) SAL_OVERRIDE;
+    virtual bool Execute( const OUString* ) SAL_OVERRIDE { return true; }
+#endif
 };
 
 class SfxDdeDocTopic_Impl : public DdeTopic
 {
+#if defined WNT
 public:
     SfxObjectShell* pSh;
     DdeData aData;
@@ -223,6 +225,7 @@ public:
     virtual bool Execute( const OUString* ) SAL_OVERRIDE;
     virtual bool StartAdviseLoop() SAL_OVERRIDE;
     virtual bool MakeItem( const OUString& rItem ) SAL_OVERRIDE;
+#endif
 };
 
 
@@ -555,6 +558,7 @@ void SfxApplication::AddDdeTopic( SfxObjectShell* pSh )
 
 void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
 {
+#if defined WNT
     DBG_ASSERT( pAppData_Impl->pDocTopics, "There is no Dde-Service" );
     //OV: DDE is disconnected in server mode!
     if( !pAppData_Impl->pDocTopics )
@@ -570,6 +574,9 @@ void SfxApplication::RemoveDdeTopic( SfxObjectShell* pSh )
             pAppData_Impl->pDocTopics->erase( pAppData_Impl->pDocTopics->begin() + n );
         }
     }
+#else
+    (void) pSh;
+#endif
 }
 
 const DdeService* SfxApplication::GetDdeService() const
@@ -582,13 +589,7 @@ DdeService* SfxApplication::GetDdeService()
     return pAppData_Impl->pDdeService;
 }
 
-
-
-bool SfxDdeTriggerTopic_Impl::Execute( const OUString* )
-{
-    return true;
-}
-
+#if defined WNT
 
 DdeData* SfxDdeDocTopic_Impl::Get( sal_uIntPtr nFormat )
 {
@@ -648,4 +649,6 @@ bool SfxDdeDocTopic_Impl::StartAdviseLoop()
     return bRet;
 }
 
+#endif
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 96f604a..b4452d4 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -84,6 +84,7 @@
 #include <sfx2/objitem.hxx>
 #include <sfx2/objsh.hxx>
 #include <svl/slstitm.hxx>
+#include "appopen.hxx"
 #include "objshimp.hxx"
 #include "openflag.hxx"
 #include <sfx2/passwd.hxx>
@@ -113,33 +114,6 @@ using namespace ::com::sun::star::container;
 using namespace ::cppu;
 using namespace ::sfx2;
 
-
-
-class SfxOpenDocStatusListener_Impl : public WeakImplHelper1< XDispatchResultListener >
-{
-public:
-    bool    bFinished;
-    bool    bSuccess;
-    virtual void SAL_CALL   dispatchFinished( const DispatchResultEvent& Event ) throw(RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual void SAL_CALL   disposing( const EventObject& Source ) throw(RuntimeException, std::exception) SAL_OVERRIDE;
-                            SfxOpenDocStatusListener_Impl()
-                                : bFinished( false )
-                                , bSuccess( false )
-                            {}
-};
-
-void SAL_CALL SfxOpenDocStatusListener_Impl::dispatchFinished( const DispatchResultEvent& aEvent ) throw(RuntimeException, std::exception)
-{
-    bSuccess = ( aEvent.State == DispatchResultState::SUCCESS );
-    bFinished = true;
-}
-
-void SAL_CALL SfxOpenDocStatusListener_Impl::disposing( const EventObject& ) throw(RuntimeException, std::exception)
-{
-}
-
-
-
 void SetTemplate_Impl( const OUString &rFileName,
                         const OUString &rLongName,
                         SfxObjectShell *pDoc)
diff --git a/sfx2/source/appl/fwkhelper.cxx b/sfx2/source/appl/fwkhelper.cxx
index 395e7c0..af88e55 100644
--- a/sfx2/source/appl/fwkhelper.cxx
+++ b/sfx2/source/appl/fwkhelper.cxx
@@ -17,13 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
 #include <com/sun/star/uno/Reference.hxx>
 #include <com/sun/star/frame/XFrame.hpp>
-#include <sal/config.h>
+#include <framework/sfxhelperfunctions.hxx>
 
 #include <osl/mutex.hxx>
 #include <vcl/svapp.hxx>
 
+#include "fwkhelper.hxx"
 #include "workwin.hxx"
 #include <sfx2/frame.hxx>
 
diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index fa81e54..a7dc82c 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -36,10 +36,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::lang;
 
-extern void AppendConfigToken_Impl( OUString& rURL, bool bQuestionMark ); // sfxhelp.cxx
-
-// class HelpInterceptor_Impl --------------------------------------------
-
 HelpInterceptor_Impl::HelpInterceptor_Impl() :
 
     m_pHistory  ( NULL ),
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index 5c3e98c..23ab8cb 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -185,8 +185,6 @@ struct SvLinkSource_Impl
     {
     }
     ~SvLinkSource_Impl();
-
-    void Closed();
 };
 
 SvLinkSource_Impl::~SvLinkSource_Impl()
diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx
index 2d0f768..2b4a51a 100644
--- a/sfx2/source/bastyp/progress.cxx
+++ b/sfx2/source/bastyp/progress.cxx
@@ -241,25 +241,6 @@ void SfxProgress::SetText( const OUString&  /*      new Text */)
     }
 }
 
-
-
-// Required in App data
-static sal_uIntPtr nLastTime = 0;
-
-long TimeOut_Impl( void*, void* pArgV )
-{
-    Timer *pArg = (Timer*)pArgV;
-    if( Time::GetSystemTicks() - nLastTime > 3000 )
-    {
-        nLastTime = 0;
-        delete pArg;
-    }
-    else pArg->Start();
-    return 0;
-}
-
-
-
 bool SfxProgress::SetStateText
 (
     sal_uLong       nNewVal,     /* New value for the progress-bar */
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 0523bbb..efa0cc7 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -155,32 +155,12 @@ struct SfxFoundCache_Impl
     const SfxSlot*  pSlot;     // Pointer to <Master-Slot>
     SfxStateCache*  pCache;    // Pointer to StatusCache, if possible NULL
 
-    SfxFoundCache_Impl():
-        nSlotId(0),
-        nWhichId(0),
-        pSlot(0),
-        pCache(0)
-    {}
-
-    SfxFoundCache_Impl(SfxFoundCache_Impl&r):
-        nSlotId(r.nSlotId),
-        nWhichId(r.nWhichId),
-        pSlot(r.pSlot),
-        pCache(r.pCache)
-    {}
-
     SfxFoundCache_Impl(sal_uInt16 nS, sal_uInt16 nW, const SfxSlot *pS, SfxStateCache *pC ):
         nSlotId(nS),
         nWhichId(nW),
         pSlot(pS),
         pCache(pC)
     {}
-
-    bool operator<( const SfxFoundCache_Impl &r ) const
-    { return nWhichId < r.nWhichId; }
-
-    bool operator==( const SfxFoundCache_Impl &r ) const
-    { return nWhichId== r.nWhichId; }
 };
 
 
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index fc02c3b..0eceb76 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -76,13 +76,6 @@ struct SfxToDo_Impl
     bool       bDeleted;
     bool       bUntil;
 
-    SfxToDo_Impl()
-        : pCluster(0)
-        , bPush(false)
-        , bDelete(false)
-        , bDeleted(false)
-        , bUntil(false)
-                {}
     SfxToDo_Impl( bool bOpPush, bool bOpDelete, bool bOpUntil, SfxShell& rCluster )
         : pCluster(&rCluster)
         , bPush(bOpPush)
@@ -90,9 +83,6 @@ struct SfxToDo_Impl
         , bDeleted(false)
         , bUntil(bOpUntil)
                 {}
-
-    bool operator==( const SfxToDo_Impl& rWith ) const
-    { return pCluster==rWith.pCluster && bPush==rWith.bPush; }
 };
 
 struct SfxObjectBars_Impl
diff --git a/sfx2/source/control/querystatus.cxx b/sfx2/source/control/querystatus.cxx
index b8a83b3..ef03199 100644
--- a/sfx2/source/control/querystatus.cxx
+++ b/sfx2/source/control/querystatus.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <boost/noncopyable.hpp>
 #include <sfx2/querystatus.hxx>
 #include <svl/poolitem.hxx>
 #include <svl/eitem.hxx>
@@ -42,7 +45,9 @@ using namespace ::com::sun::star::frame::status;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::util;
 
-class SfxQueryStatus_Impl : public ::cppu::WeakImplHelper1< css::frame::XStatusListener >
+class SfxQueryStatus_Impl:
+    public cppu::WeakImplHelper1<css::frame::XStatusListener>,
+    private boost::noncopyable
 {
     public:
 
@@ -59,10 +64,6 @@ class SfxQueryStatus_Impl : public ::cppu::WeakImplHelper1< css::frame::XStatusL
         virtual void SAL_CALL statusChanged(const ::com::sun::star::frame::FeatureStateEvent& Event) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
 
     private:
-        SfxQueryStatus_Impl( const SfxQueryStatus& );
-        SfxQueryStatus_Impl();
-        SfxQueryStatus_Impl& operator=( const SfxQueryStatus& );
-
         bool                                                                   m_bQueryInProgress;
         SfxItemState                                                               m_eState;
         SfxPoolItem*                                                               m_pItem;
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 970379e..d18d0a4 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -88,9 +88,6 @@ struct CustomProperty
     CustomProperty( const OUString& sName,
             const com::sun::star::uno::Any& rValue ) :
         m_sName( sName ), m_aValue( rValue ) {}
-
-    inline bool operator==( const CustomProperty& rProp )
-    { return m_sName.equals( rProp.m_sName ) && m_aValue == rProp.m_aValue; }
 };
 
 static
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 9955c42..68bc13e 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -53,10 +53,6 @@
 
 using namespace ::com::sun::star;
 
-// implemented in 'sfx2/source/appl/childwin.cxx'
-extern bool GetPosSizeFromString( const OUString& rStr, Point& rPos, Size& rSize );
-extern bool GetSplitSizeFromString( const OUString& rStr, Size& rSize );
-
 // If you want to change the number you also have to:
 // - Add new slot ids to sfxsids.hrc
 // - Add new slots to frmslots.sdi
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 8e1eb0c..c04ae90 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1131,39 +1131,6 @@ FileDialogHelper_Impl::~FileDialogHelper_Impl()
     ::comphelper::disposeComponent( mxFileDlg );
 }
 
-#define nMagic -1
-
-class PickerThread_Impl : public ::osl::Thread
-{
-    uno::Reference < XFilePicker > mxPicker;
-    ::osl::Mutex            maMutex;
-    virtual void SAL_CALL   run() SAL_OVERRIDE;
-    sal_Int16               mnRet;
-public:
-                            PickerThread_Impl( const uno::Reference < XFilePicker >& rPicker )
-                            : mxPicker( rPicker ), mnRet(nMagic) {}
-
-    sal_Int16               GetReturnValue()
-                            { ::osl::MutexGuard aGuard( maMutex ); return mnRet; }
-
-    void                    SetReturnValue( sal_Int16 aRetValue )
-                            { ::osl::MutexGuard aGuard( maMutex ); mnRet = aRetValue; }
-};
-
-void SAL_CALL PickerThread_Impl::run()
-{
-    try
-    {
-        sal_Int16 n = mxPicker->execute();
-        SetReturnValue( n );
-    }
-    catch( const RuntimeException& )
-    {
-        SetReturnValue( ExecutableDialogResults::CANCEL );
-        SAL_WARN( "sfx.dialog", "RuntimeException caught" );
-    }
-}
-
 void FileDialogHelper_Impl::setControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId )
 {
     DBG_ASSERT( _pControlId && _pHelpId, "FileDialogHelper_Impl::setControlHelpIds: invalid array pointers!" );
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 65b558f..fcf077e 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -130,30 +130,6 @@ void PrepareListener_Impl::disposing(const css::lang::EventObject& /*rEvent*/) t
 
 static const char       PDF_DOCUMENT_TYPE[]   = "pdf_Portable_Document_Format";
 
-bool HasDocumentValidSignature( const css::uno::Reference< css::frame::XModel >& xModel )
-{
-    try
-    {
-        css::uno::Reference< css::beans::XPropertySet > xPropSet( xModel, css::uno::UNO_QUERY );
-        if ( xPropSet.is() )
-        {
-            Any a = xPropSet->getPropertyValue("HasValidSignatures");
-            bool bReturn;
-            if ( a >>= bReturn )
-                return bReturn;
-        }
-    }
-    catch ( css::uno::RuntimeException& )
-    {
-        throw;
-    }
-    catch ( css::uno::Exception& )
-    {
-    }
-
-    return false;
-}
-
 SfxMailModel::SaveResult SfxMailModel::ShowFilterOptionsDialog(
     uno::Reference< lang::XMultiServiceFactory > xSMGR,
     uno::Reference< frame::XModel > xModel,
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index dec86be..044241d 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -109,52 +109,6 @@ SfxPoolItem* SfxTabDialogItem::Create(SvStream& /*rStream*/, sal_uInt16 /*nVersi
     return NULL;
 }
 
-class SfxTabDialogController : public SfxControllerItem
-{
-    SfxTabDialog*   pDialog;
-    const SfxItemSet*     pSet;
-public:
-                    SfxTabDialogController( sal_uInt16 nSlotId, SfxBindings& rBindings, SfxTabDialog* pDlg )
-                        : SfxControllerItem( nSlotId, rBindings )
-                        , pDialog( pDlg )
-                        , pSet( NULL )
-                    {}
-
-                    virtual ~SfxTabDialogController();
-
-    virtual void    StateChanged( sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState ) SAL_OVERRIDE;
-};
-
-SfxTabDialogController::~SfxTabDialogController()
-{
-    delete pSet;
-}
-
-void SfxTabDialogController::StateChanged( sal_uInt16 /*nSID*/, SfxItemState /*eState*/, const SfxPoolItem* pState )
-{
-    const SfxSetItem* pSetItem = PTR_CAST( SfxSetItem, pState );
-    if ( pSetItem )
-    {
-        pSet = pDialog->pSet = pSetItem->GetItemSet().Clone();
-        bool bDialogStarted = false;
-        for ( sal_uInt16 n=0; n<pDialog->m_pTabCtrl->GetPageCount(); n++ )
-        {
-            sal_uInt16 nPageId = pDialog->m_pTabCtrl->GetPageId( n );
-            SfxTabPage* pTabPage = dynamic_cast<SfxTabPage*> (pDialog->m_pTabCtrl->GetTabPage( nPageId ));
-            if ( pTabPage )
-            {
-                pTabPage->Reset( pSetItem->GetItemSet() );
-                bDialogStarted = true;
-            }
-        }
-
-        if ( bDialogStarted )
-            pDialog->Show();
-    }
-    else
-        pDialog->Hide();
-}
-
 typedef std::vector<Data_Impl*> SfxTabDlgData_Impl;
 
 struct TabDlg_Impl
@@ -164,20 +118,16 @@ struct TabDlg_Impl
                         bHideResetBtn   : 1;
     SfxTabDlgData_Impl  aData;
 
-    SfxTabDialogController* pController;
-
     TabDlg_Impl( sal_uInt8 nCnt ) :
 
         bModified       ( false ),
         bModal          ( true ),
-        bHideResetBtn   ( false ),
-        pController     ( NULL )
+        bHideResetBtn   ( false )
     {
         aData.reserve( nCnt );
     }
     ~TabDlg_Impl()
     {
-        delete pController;
     }
 };
 
diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx
index a9378e2..7ea3475 100644
--- a/sfx2/source/dialog/taskpane.cxx
+++ b/sfx2/source/dialog/taskpane.cxx
@@ -525,7 +525,6 @@ namespace sfx2
         static bool ModuleHasToolPanels( const OUString& i_rModuleIdentifier );
 
               ::svt::ToolPanelDeck& GetPanelDeck()          { return m_aPanelDeck; }
-        const ::svt::ToolPanelDeck& GetPanelDeck() const    { return m_aPanelDeck; }
 
         ::boost::optional< size_t >
                     GetPanelPos( const OUString& i_rResourceURL );
@@ -828,12 +827,6 @@ namespace sfx2
         ::svt::PToolPanel   pPanel;
         bool                bHidden;
 
-        PanelDescriptor()
-            :pPanel()
-            ,bHidden( false )
-        {
-        }
-
         PanelDescriptor( const ::svt::PToolPanel& i_rPanel )
             :pPanel( i_rPanel )
             ,bHidden( false )
diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx
index 3ed9680..da5f84d 100644
--- a/sfx2/source/dialog/versdlg.cxx
+++ b/sfx2/source/dialog/versdlg.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
+
+#include <boost/noncopyable.hpp>
 #include <unotools/localedatawrapper.hxx>
 #include <comphelper/processfactory.hxx>
 #include <svl/eitem.hxx>
@@ -58,39 +61,21 @@ struct SfxVersionInfo
     DateTime                aCreationDate;
 
                             SfxVersionInfo();
-                            SfxVersionInfo( const SfxVersionInfo& rInfo )
-                                : aCreationDate( DateTime::EMPTY )
-                            { *this = rInfo; }
-
-    SfxVersionInfo&         operator=( const SfxVersionInfo &rInfo )
-                            {
-                                aName = rInfo.aName;
-                                aComment = rInfo.aComment;
-                                aAuthor = rInfo.aAuthor;
-                                aCreationDate = rInfo.aCreationDate;
-                                return *this;
-                            }
 };
 
 typedef vector< SfxVersionInfo* > _SfxVersionTable;
 
-class SfxVersionTableDtor
+class SfxVersionTableDtor: private boost::noncopyable
 {
 private:
     _SfxVersionTable        aTableList;
 public:
-                            SfxVersionTableDtor( const SfxVersionTableDtor &rCpy )
-                            { *this = rCpy; }
-
                             SfxVersionTableDtor( const uno::Sequence < util::RevisionTag >& rInfo );
                             SfxVersionTableDtor( const uno::Sequence < document::CmisVersion > & rInfo );
                             ~SfxVersionTableDtor()
                             { DelDtor(); }
 
-    SfxVersionTableDtor&    operator=( const SfxVersionTableDtor &rCpy );
     void                    DelDtor();
-    SvStream&               Read( SvStream & );
-    SvStream&               Write( SvStream & ) const;
 
     size_t                  size() const
                             { return aTableList.size(); }
@@ -140,18 +125,6 @@ void SfxVersionTableDtor::DelDtor()
     aTableList.clear();
 }
 
-SfxVersionTableDtor& SfxVersionTableDtor::operator=( const SfxVersionTableDtor& rTbl )
-{
-    DelDtor();
-    for ( size_t i = 0, n = rTbl.size(); i < n; ++i )
-    {
-        SfxVersionInfo* pNew = new SfxVersionInfo( *(rTbl.at( i )) );
-        aTableList.push_back( pNew );
-    }
-    return *this;
-}
-
-
 SfxVersionInfo::SfxVersionInfo()
     : aCreationDate( DateTime::EMPTY )
 {
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index a94ec74..2256481 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -17,8 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
 #include <sal/config.h>
+
+#include <boost/noncopyable.hpp>
 #include <cppuhelper/compbase6.hxx>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/document/XDocumentProperties.hpp>
@@ -126,7 +127,8 @@ typedef ::cppu::WeakComponentImplHelper6<
 
 class SfxDocumentMetaData:
     private ::cppu::BaseMutex,
-    public SfxDocumentMetaData_Base
+    public SfxDocumentMetaData_Base,
+    private boost::noncopyable
 {
 public:
     explicit SfxDocumentMetaData(
@@ -286,9 +288,6 @@ public:
         throw (css::uno::RuntimeException, css::xml::sax::SAXException, std::exception) SAL_OVERRIDE;
 
 protected:
-    SfxDocumentMetaData(SfxDocumentMetaData &); // not defined
-    SfxDocumentMetaData& operator =(SfxDocumentMetaData &); // not defined
-
     virtual ~SfxDocumentMetaData() {}
     virtual SfxDocumentMetaData* createMe( css::uno::Reference< css::uno::XComponentContext > const & context ) { return new SfxDocumentMetaData( context ); };
     const css::uno::Reference< css::uno::XComponentContext > m_xContext;
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index dbe72e1..a4c0c72 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -164,48 +164,6 @@ bool IsLockingUsed()
 
 } // anonymous namespace
 
-
-
-
-class SfxMediumHandler_Impl : public ::cppu::WeakImplHelper1< com::sun::star::task::XInteractionHandler >
-{
-    com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > m_xInter;
-
-public:
-    virtual void SAL_CALL handle( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest >& xRequest )
-            throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
-
-    SfxMediumHandler_Impl( com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > xInteraction )
-        : m_xInter( xInteraction )
-        {}
-
-    virtual ~SfxMediumHandler_Impl();
-};
-
-
-SfxMediumHandler_Impl::~SfxMediumHandler_Impl()
-{
-}
-
-
-void SAL_CALL SfxMediumHandler_Impl::handle( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest >& xRequest )
-        throw( com::sun::star::uno::RuntimeException, std::exception )
-{
-    if( !m_xInter.is() )
-        return;
-
-    com::sun::star::uno::Any aRequest = xRequest->getRequest();
-    com::sun::star::ucb::InteractiveIOException aIoException;
-    com::sun::star::ucb::UnsupportedDataSinkException aSinkException;
-    if ( (aRequest >>= aIoException) && ( aIoException.Code == IOErrorCode_ACCESS_DENIED || aIoException.Code == IOErrorCode_LOCKING_VIOLATION ) )
-        return;
-    else
-    if ( aRequest >>= aSinkException )
-        return;
-    else
-        m_xInter->handle( xRequest );
-}
-
 class SfxMedium_Impl : boost::noncopyable
 {
 public:
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index fec9241..ce2b0c2 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -22,6 +22,7 @@
 #include <sfx2/docfile.hxx>
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/filedlghelper.hxx>
+#include "appopen.hxx"
 #include "openflag.hxx"
 #include <sfx2/passwd.hxx>
 
@@ -44,9 +45,6 @@ using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::ui::dialogs;
 using namespace ::com::sun::star::uno;
 
-// implemented in 'sfx2/source/appl/appopen.cxx'
-extern sal_uInt32 CheckPasswd_Impl( SfxObjectShell* pDoc, SfxItemPool &rPool, SfxMedium* pFile );
-
 namespace sfx2 {
 
 DocumentInserter::DocumentInserter(
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index fc563c5..22d536d 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -184,8 +184,6 @@ public:
                                   size_t *pPos = NULL );
     void                DeleteEntry( size_t nIndex );
 
-    int                 Compare( const OUString& rTitle ) const
-                            { return maTitle.compareTo( rTitle ); }
     int                 Compare( RegionData_Impl* pCompareWith ) const;
 };
 
diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx
index d71f019..5ab013c 100644
--- a/sfx2/source/doc/docundomanager.cxx
+++ b/sfx2/source/doc/docundomanager.cxx
@@ -93,7 +93,6 @@ namespace sfx2
         {
         };
 
-        const SfxObjectShell* getObjectShell() const { return rAntiImpl.getBaseModel().GetObjectShell(); }
               SfxObjectShell* getObjectShell()       { return rAntiImpl.getBaseModel().GetObjectShell(); }
 
         // IUndoManagerImplementation
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 16da605..c0631e0 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -108,20 +108,15 @@ public:
 class IFrameWindow_Impl : public Window
 {
     uno::Reference < frame::XFrame2 > mxFrame;
-    bool                bBorder;
 
 public:
     IFrameWindow_Impl( Window *pParent,
                        bool bHasBorder,
                        WinBits nWinBits = 0 );
-
-public:
-    bool        HasBorder() const { return bBorder; }
 };
 
 IFrameWindow_Impl::IFrameWindow_Impl( Window *pParent, bool bHasBorder, WinBits nWinBits )
     : Window( pParent, nWinBits | WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_DOCKBORDER )
-    , bBorder(bHasBorder)
 {
     if ( !bHasBorder )
         SetBorderStyle( WINDOW_BORDER_NOBORDER );
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 04b1200..77680ff 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -149,7 +149,6 @@ class SfxNewFileDialog_Impl
     DECL_LINK( RegionSelect, ListBox * );
     DECL_LINK(TemplateSelect, void *);
     DECL_LINK( DoubleClick, ListBox * );
-    void TogglePreview(CheckBox *);
     DECL_LINK( Expand, void * );
     DECL_LINK(LoadFile, void *);
     sal_uInt16  GetSelectedTemplatePos() const;
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 7cf4d12..87dc8eb 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -110,25 +110,6 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::task;
 
-
-
-class SfxSaveAsContext_Impl
-{
-    OUString&     _rNewNameVar;
-    OUString      _aNewName;
-
-public:
-                SfxSaveAsContext_Impl( OUString &rNewNameVar,
-                                       const OUString &rNewName )
-                :   _rNewNameVar( rNewNameVar ),
-                    _aNewName( rNewName )
-                { rNewNameVar = rNewName; }
-                ~SfxSaveAsContext_Impl()
-                { _rNewNameVar = ""; }
-};
-
-
-
 #define SfxObjectShell
 #include "sfxslots.hxx"
 
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index d33f836..7aeb70d 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -112,6 +112,7 @@
 #include <sfx2/fcontnr.hxx>
 #include <sfx2/docfilt.hxx>
 #include <sfx2/docfac.hxx>
+#include "appopen.hxx"
 #include "objshimp.hxx"
 #include "sfxtypes.hxx"
 #include "doc.hrc"
@@ -129,8 +130,6 @@
 
 #include "../appl/app.hrc"
 
-extern sal_uInt32 CheckPasswd_Impl( SfxObjectShell*, SfxItemPool&, SfxMedium* );
-
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx
index 459b484..a6c6a24 100644
--- a/sfx2/source/doc/oleprops.cxx
+++ b/sfx2/source/doc/oleprops.cxx
@@ -75,7 +75,6 @@ public:
     explicit            SfxOleInt32Property( sal_Int32 nPropId, sal_Int32 nValue = 0 );
 
     inline sal_Int32    GetValue() const { return mnValue; }
-    inline void         SetValue( sal_Int32 nValue ) { mnValue = nValue; }
 
 private:
     virtual void        ImplLoad( SvStream& rStrm ) SAL_OVERRIDE;
@@ -94,7 +93,6 @@ public:
     explicit            SfxOleDoubleProperty( sal_Int32 nPropId, double fValue = 0.0 );
 
     inline double       GetValue() const { return mfValue; }
-    inline void         SetValue( double fValue ) { mfValue = fValue; }
 
 private:
     virtual void        ImplLoad( SvStream& rStrm ) SAL_OVERRIDE;
@@ -113,7 +111,6 @@ public:
     explicit            SfxOleBoolProperty( sal_Int32 nPropId, bool bValue = false );
 
     inline bool         GetValue() const { return mbValue; }
-    inline void         SetValue( bool bValue ) { mbValue = bValue; }
 
 private:
     virtual void        ImplLoad( SvStream& rStrm ) SAL_OVERRIDE;
@@ -188,8 +185,6 @@ public:
 
     /** Returns the time value as LOCAL time. */
     inline const util::DateTime& GetValue() const { return maDateTime; }
-    /** @param rDateTime  Date and time as LOCAL time. */
-    inline void         SetValue( const util::DateTime& rDateTime ) { maDateTime = rDateTime; }
 
 private:
     virtual void        ImplLoad( SvStream& rStrm ) SAL_OVERRIDE;
@@ -207,8 +202,6 @@ public:
 
     /** Returns the date value as LOCAL time. */
     inline const util::Date& GetValue() const { return maDate; }
-    /** @param rDate  Date as LOCAL time. */
-    inline void         SetValue( const util::Date& rDate ) { maDate = rDate; }
 
 private:
     virtual void        ImplLoad( SvStream& rStrm ) SAL_OVERRIDE;
diff --git a/sfx2/source/doc/syspath.cxx b/sfx2/source/doc/syspath.cxx
index 612dc3a..456b97a 100644
--- a/sfx2/source/doc/syspath.cxx
+++ b/sfx2/source/doc/syspath.cxx
@@ -19,7 +19,9 @@
 
 #include "syspath.hxx"
 
+#if defined WNT
 extern "C" bool GetUserTemplateLocation(sal_Unicode*, int nSize);
+#endif
 
 bool SystemPath::GetUserTemplateLocation(sal_Unicode* pFolder, int nSize )
 {
diff --git a/sfx2/source/explorer/nochaos.cxx b/sfx2/source/explorer/nochaos.cxx
index dbe9f08..cb746f9 100644
--- a/sfx2/source/explorer/nochaos.cxx
+++ b/sfx2/source/explorer/nochaos.cxx
@@ -17,7 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <sal/config.h>
 
+#include <boost/noncopyable.hpp>
 #include <svl/itempool.hxx>
 #include <svl/poolitem.hxx>
 #include <svl/stritem.hxx>
@@ -32,17 +34,13 @@
 
 class CntItemPool;
 
-class CntStaticPoolDefaults_Impl
+class CntStaticPoolDefaults_Impl: private boost::noncopyable
 {
     sal_uInt32        m_nItems;
     SfxPoolItem** m_ppDefaults;
     SfxItemInfo*  m_pItemInfos;
 
 private:
-    // Forbidden and not implemented...
-    CntStaticPoolDefaults_Impl( const CntStaticPoolDefaults_Impl& );
-    CntStaticPoolDefaults_Impl& operator=( const CntStaticPoolDefaults_Impl& );
-
     inline void Insert( SfxPoolItem* pItem, sal_uInt16 nSID, sal_uInt16 nFlags );
 
 public:
diff --git a/sfx2/source/inc/appopen.hxx b/sfx2/source/inc/appopen.hxx
new file mode 100644
index 0000000..5e63687
--- /dev/null
+++ b/sfx2/source/inc/appopen.hxx
@@ -0,0 +1,35 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SFX2_SOURCE_INC_APPOPEN_HXX
+#define INCLUDED_SFX2_SOURCE_INC_APPOPEN_HXX
+
+#include <sal/config.h>
+
+#include <sal/types.h>
+
+class SfxItemPool;
+class SfxMedium;
+class SfxObjectShell;
+
+sal_uInt32 CheckPasswd_Impl( SfxObjectShell* pDoc, SfxItemPool &rPool, SfxMedium* pFile );
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx
index da02db2..2df3af1 100644
--- a/sfx2/source/sidebar/ResourceManager.cxx
+++ b/sfx2/source/sidebar/ResourceManager.cxx
@@ -38,15 +38,6 @@ using namespace cssu;
 
 namespace sfx2 { namespace sidebar {
 
-class ResourceManager::Deleter
-{
-public:
-    void operator() (ResourceManager* pObject)
-    {
-        delete pObject;
-    }
-};
-
 ResourceManager& ResourceManager::Instance (void)
 {
     static ResourceManager maInstance;
diff --git a/sfx2/source/sidebar/ResourceManager.hxx b/sfx2/source/sidebar/ResourceManager.hxx
index 0ea23e7..9ec6e1f 100644
--- a/sfx2/source/sidebar/ResourceManager.hxx
+++ b/sfx2/source/sidebar/ResourceManager.hxx
@@ -100,8 +100,6 @@ public:
 private:
     ResourceManager (void);
     ~ResourceManager (void);
-    class Deleter;
-    friend class Deleter;
 
     typedef ::std::vector<DeckDescriptor> DeckContainer;
     DeckContainer maDecks;
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index 9c5413b..a65bded 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -164,11 +164,6 @@ private:
                             const css::uno::Reference< css::frame::XModel2 >& i_rxDocument
                         ) const;
 
-    void                impl_lockHiddenDocument(
-                                  SfxObjectShell& i_rDocument,
-                            const ::comphelper::NamedValueCollection& i_rDescriptor
-                        ) const;
-
     void                impl_handleCaughtError_nothrow(
                             const css::uno::Any& i_rCaughtError,
                             const ::comphelper::NamedValueCollection& i_rDescriptor
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index ca037c0..0a05593 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -240,11 +240,6 @@ class SfxViewNotificatedFrameList_Impl :
 {
 public:
 
-    void InsertViewFrame( SfxViewFrame* pFrame )
-    {
-        StartListening( *pFrame );
-        push_back( pFrame );
-    }
     void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) SAL_OVERRIDE;
 };
 
@@ -268,14 +263,6 @@ void SfxViewNotificatedFrameList_Impl::Notify( SfxBroadcaster& rBC, const SfxHin
     }
 }
 
-
-
-long ReloadDecouple_Impl( void* pObj, void* pArg )
-{
-    ((SfxViewFrame*) pObj)->ExecReload_Impl( *(SfxRequest*)pArg );
-    return 0;
-}
-
 void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq )
 {
     SfxFrame *pParent = GetFrame().GetParentFrame();


More information about the Libreoffice-commits mailing list