summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-30 16:00:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-31 10:43:23 +0100
commit8de61c9fb6a4c3be54b51c575fcffcec2067e090 (patch)
treea5e71351f79b88a47ae9400d141a13bcfe906bd9 /sfx2
parent5131e0be31afb8d7686483fd5552b10cecd1c5f0 (diff)
grabbag of unused code
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/inc/sfx2/basedlgs.hxx3
-rw-r--r--sfx2/inc/sfx2/objsh.hxx3
-rw-r--r--sfx2/source/dialog/basedlgs.cxx53
-rw-r--r--sfx2/source/doc/objmisc.cxx47
-rw-r--r--sfx2/source/doc/objxtor.cxx7
5 files changed, 0 insertions, 113 deletions
diff --git a/sfx2/inc/sfx2/basedlgs.hxx b/sfx2/inc/sfx2/basedlgs.hxx
index a29c04eecfd7..14f4f17bcf66 100644
--- a/sfx2/inc/sfx2/basedlgs.hxx
+++ b/sfx2/inc/sfx2/basedlgs.hxx
@@ -196,9 +196,6 @@ public:
void SetTabPage( SfxTabPage* pTabPage, GetTabPageRanges pRangesFunc = 0 );
SfxTabPage* GetTabPage() const { return pImpl->m_pSfxPage; }
- const sal_uInt16* GetInputRanges( const SfxItemPool& rPool );
-// void SetInputSet( const SfxItemSet* pInSet ) { pOptions = pInSet; }
-// const SfxItemSet* GetOutputItemSet() const { return pOutSet; }
OKButton* GetOKButton() const { return pOKBtn; }
CancelButton* GetCancelButton() const { return pCancelBtn; }
void SetInfoLink( const Link& rLink );
diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx
index 40959524bc02..eecb8bea58e3 100644
--- a/sfx2/inc/sfx2/objsh.hxx
+++ b/sfx2/inc/sfx2/objsh.hxx
@@ -252,14 +252,12 @@ public:
const TypeId* pType = 0,
sal_Bool bOnlyVisible = sal_True );
static SfxObjectShell* Current();
- static sal_uInt16 Count();
static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
GetCurrentComponent();
static void SetCurrentComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent );
virtual void Invalidate(sal_uInt16 nId = 0);
- void SetFlags( SfxObjectShellFlags eFlags );
SfxObjectShellFlags GetFlags( ) const ;
SfxModule* GetModule() const;
@@ -287,7 +285,6 @@ public:
sal_Bool IsDocShared() const;
::rtl::OUString GetSharedFileURL() const;
sal_Bool SwitchToShared( sal_Bool bShared, sal_Bool bSave );
- void DisconnectFromShared();
SAL_DLLPRIVATE void FreeSharedFile();
SAL_DLLPRIVATE void FreeSharedFile( const ::rtl::OUString& aTempFileURL );
SAL_DLLPRIVATE void DoNotCleanShareControlFile();
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 2635aba3f0d6..e1d90733c480 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -965,57 +965,4 @@ void SfxSingleTabDialog::SetInfoLink( const Link& rLink )
pImpl->m_aInfoLink = rLink;
}
-//--------------------------------------------------------------------
-// Comparison function for qsort
-
-extern "C" int SAL_CALL BaseDlgsCmpUS_Impl( const void* p1, const void* p2 )
-{
- return *(sal_uInt16*)p1 - *(sal_uInt16*)p2;
-}
-
-// -----------------------------------------------------------------------
-
-/*
- Creates the set over the Page range. the page must register the static
- method for querys on the range in SetTabPage, so the Set is delivered
- onDemand.
- */
-const sal_uInt16* SfxSingleTabDialog::GetInputRanges( const SfxItemPool& rPool )
-{
- if ( GetInputItemSet() )
- {
- OSL_FAIL( "Set already exists!" );
- return GetInputItemSet()->GetRanges();
- }
-
- if ( pRanges )
- return pRanges;
- SvUShorts aUS(16, 16);
-
- if ( fnGetRanges)
- {
- const sal_uInt16 *pTmpRanges = (fnGetRanges)();
- const sal_uInt16 *pIter = pTmpRanges;
- sal_uInt16 nLen;
- for ( nLen = 0; *pIter; ++nLen, ++pIter )
- ;
- aUS.Insert( pTmpRanges, nLen, aUS.Count() );
- }
-
- //! Remove duplicate IDs?
- sal_uInt16 nCount = aUS.Count();
-
- for ( sal_uInt16 i = 0; i < nCount; ++i )
- aUS[i] = rPool.GetWhich( aUS[i]) ;
-
- // sort
- if ( aUS.Count() > 1 )
- qsort( (void*)aUS.GetData(), aUS.Count(), sizeof(sal_uInt16), BaseDlgsCmpUS_Impl );
-
- pRanges = new sal_uInt16[aUS.Count() + 1];
- memcpy( pRanges, aUS.GetData(), sizeof(sal_uInt16) * aUS.Count() );
- pRanges[aUS.Count()] = 0;
- return pRanges;
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index c559e61f4254..1594060befbd 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -618,48 +618,6 @@ sal_Bool SfxObjectShell::SwitchToShared( sal_Bool bShared, sal_Bool bSave )
//--------------------------------------------------------------------
-void SfxObjectShell::DisconnectFromShared()
-{
- if ( IsDocShared() )
- {
- if ( pMedium && pMedium->GetStorage().is() )
- {
- // set medium to noname
- pMedium->SetName( String(), sal_True );
- pMedium->Init_Impl();
-
- // drop resource
- SetNoName();
- InvalidateName();
-
- // untitled document must be based on temporary storage
- // the medium should not dispose the storage in this case
- if ( pMedium->GetStorage() == GetStorage() )
- ConnectTmpStorage_Impl( pMedium->GetStorage(), pMedium );
-
- pMedium->Close();
- FreeSharedFile();
-
- SfxMedium* pTmpMedium = pMedium;
- ForgetMedium();
- if( !DoSaveCompleted( pTmpMedium ) )
- SetError( ERRCODE_IO_GENERAL, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
- else
- {
- // the medium should not dispose the storage, DoSaveCompleted() has let it to do so
- pMedium->CanDisposeStorage_Impl( sal_False );
- }
-
- pMedium->GetItemSet()->ClearItem( SID_DOC_READONLY );
- pMedium->SetOpenMode( SFX_STREAM_READWRITE, sal_True, sal_True );
-
- SetTitle( String() );
- }
- }
-}
-
-//--------------------------------------------------------------------
-
void SfxObjectShell::FreeSharedFile()
{
if ( pMedium )
@@ -1680,11 +1638,6 @@ SfxObjectShellFlags SfxObjectShell::GetFlags() const
return pImp->eFlags;
}
-void SfxObjectShell::SetFlags( SfxObjectShellFlags eFlags )
-{
- pImp->eFlags = eFlags;
-}
-
void SfxHeaderAttributes_Impl::SetAttributes()
{
bAlert = sal_True;
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index fd1566b685c0..990eb6ec7e1c 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -856,13 +856,6 @@ void SfxObjectShell::InitBasicManager_Impl()
//--------------------------------------------------------------------
-sal_uInt16 SfxObjectShell::Count()
-{
- return SFX_APP()->GetObjectShells_Impl().Count();
-}
-
-//--------------------------------------------------------------------
-
sal_Bool SfxObjectShell::DoClose()
{
return Close();