diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-27 12:07:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-27 12:43:46 +0000 |
commit | 337e19bf469c0a7a10fabd07fa6ae13f77075e36 (patch) | |
tree | cbbb7c3f05eae32cf028c3009ab8f1b39e2bf5cb /sfx2/source | |
parent | 40241c2aec0e88cbb51b802bda2db458e14f792f (diff) |
loplugin:expandablemethods in sfx2
Change-Id: I5dcc9e6e7fef210f85a01057ddf59f8de14b847d
Reviewed-on: https://gerrit.libreoffice.org/30320
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/opengrf.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/control/thumbnailview.cxx | 32 | ||||
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlgimpl.hxx | 5 | ||||
-rw-r--r-- | sfx2/source/dialog/passwd.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 23 | ||||
-rw-r--r-- | sfx2/source/dialog/titledockwin.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/doc/Metadatable.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 20 | ||||
-rw-r--r-- | sfx2/source/doc/docundomanager.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/doc/frmdescr.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/objxtor.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 51 | ||||
-rw-r--r-- | sfx2/source/doc/sfxmodelfactory.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/inc/templdgi.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 24 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 7 |
19 files changed, 75 insertions, 173 deletions
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index 2bbe180776b1..70670fe25852 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -177,14 +177,9 @@ short SvxOpenGraphicDialog::Execute() } -void SvxOpenGraphicDialog::SetPath( const OUString& rPath ) -{ - mpImpl->aFileDlg.SetDisplayDirectory(rPath); -} - void SvxOpenGraphicDialog::SetPath( const OUString& rPath, bool bLinkState ) { - SetPath(rPath); + mpImpl->aFileDlg.SetDisplayDirectory(rPath); AsLink(bLinkState); } diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 6bcb2811e842..9397c2a31d6e 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -215,24 +215,6 @@ void ThumbnailView::ApplySettings(vcl::RenderContext& rRenderContext) mpItemAttrs->nMaxTextLength = 0; } -void ThumbnailView::ImplInitScrollBar() -{ - if ( GetStyle() & WB_VSCROLL ) - { - if ( !mpScrBar ) - { - mpScrBar = VclPtr<ScrollBar>::Create( this, WB_VSCROLL | WB_DRAG ); - mpScrBar->SetScrollHdl( LINK( this, ThumbnailView, ImplScrollHdl ) ); - } - else - { - // adapt the width because of the changed settings - long nScrBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); - mpScrBar->setPosSizePixel( 0, 0, nScrBarWidth, 0, PosSizeFlags::Width ); - } - } -} - void ThumbnailView::DrawItem(ThumbnailViewItem *pItem) { if (pItem->isVisible()) @@ -265,7 +247,19 @@ void ThumbnailView::CalculateItemPositions (bool bScrollBarUsed) // consider the scrolling if ( nStyle & WB_VSCROLL ) - ImplInitScrollBar(); + { + if ( !mpScrBar ) + { + mpScrBar = VclPtr<ScrollBar>::Create( this, WB_VSCROLL | WB_DRAG ); + mpScrBar->SetScrollHdl( LINK( this, ThumbnailView, ImplScrollHdl ) ); + } + else + { + // adapt the width because of the changed settings + long nScrBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize(); + mpScrBar->setPosSizePixel( 0, 0, nScrBarWidth, 0, PosSizeFlags::Width ); + } + } else { if ( mpScrBar ) diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 3242135ae317..446e94df16c9 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -345,11 +345,11 @@ void SfxDocumentInfoItem::resetUserData(const OUString & i_rAuthor) { setAuthor(i_rAuthor); DateTime now( DateTime::SYSTEM ); - setCreationDate( now.GetUNODateTime() ); + m_CreationDate = now.GetUNODateTime(); setModifiedBy(OUString()); setPrintedBy(OUString()); - setModificationDate(util::DateTime()); - setPrintDate(util::DateTime()); + m_ModificationDate = util::DateTime(); + m_PrintDate = util::DateTime(); setEditingDuration(0); setEditingCycles(1); } diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index c976b8da1a5b..7771124e98a8 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -348,17 +348,12 @@ void FileDialogHelper_Impl::LoadLastUsedFilter( const OUString& _rContextIdentif } } -void FileDialogHelper_Impl::SaveLastUsedFilter( const OUString& _rContextIdentifier ) -{ - SvtViewOptions( E_DIALOG, IODLG_CONFIGNAME ).SetUserItem( _rContextIdentifier, - makeAny( getFilterWithExtension( getFilter() ) ) ); -} - void FileDialogHelper_Impl::SaveLastUsedFilter() { const OUString* pConfigId = GetLastFilterConfigId( meContext ); if( pConfigId ) - SaveLastUsedFilter( *pConfigId ); + SvtViewOptions( E_DIALOG, IODLG_CONFIGNAME ).SetUserItem( *pConfigId, + makeAny( getFilterWithExtension( getFilter() ) ) ); } std::shared_ptr<const SfxFilter> FileDialogHelper_Impl::getCurentSfxFilter() diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx index 3ddfe25d20ef..2f500c071e9c 100644 --- a/sfx2/source/dialog/filedlgimpl.hxx +++ b/sfx2/source/dialog/filedlgimpl.hxx @@ -128,13 +128,12 @@ namespace sfx2 void setControlHelpIds( const sal_Int16* _pControlId, const char** _pHelpId ); - bool CheckFilterOptionsCapability( const std::shared_ptr<const SfxFilter>& _pFilter ); + bool CheckFilterOptionsCapability( const std::shared_ptr<const SfxFilter>& _pFilter ); - bool isInOpenMode() const; + bool isInOpenMode() const; OUString getCurrentFilterUIName() const; void LoadLastUsedFilter( const OUString& _rContextIdentifier ); - void SaveLastUsedFilter( const OUString& _rContextIdentifier ); void SaveLastUsedFilter(); void implInitializeFileName( ); diff --git a/sfx2/source/dialog/passwd.cxx b/sfx2/source/dialog/passwd.cxx index 5bf8fc44875d..5b3b7bd3fda4 100644 --- a/sfx2/source/dialog/passwd.cxx +++ b/sfx2/source/dialog/passwd.cxx @@ -67,7 +67,7 @@ IMPL_LINK_NOARG(SfxPasswordDialog, OKHdl, Button*, void) { bool bConfirmFailed = bool( mnExtras & SfxShowExtras::CONFIRM ) && ( GetConfirm() != GetPassword() ); - if( ( mnExtras & SfxShowExtras::CONFIRM2 ) && ( GetConfirm2() != GetPassword2() ) ) + if( ( mnExtras & SfxShowExtras::CONFIRM2 ) && ( mpConfirm2ED->GetText() != GetPassword2() ) ) bConfirmFailed = true; if ( bConfirmFailed ) { diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 025e5e00d9a3..99fadc197a43 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2018,19 +2018,6 @@ void SfxCommonTemplateDialog_Impl::EnableDelete() } } -// After selecting a focused item if possible again on the app window -void SfxCommonTemplateDialog_Impl::ResetFocus() -{ - if ( dynamic_cast< const SfxTemplateDialog_Impl* >(this) != nullptr ) - { - SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame(); - SfxViewShell *pVu = pViewFrame->GetViewShell(); - vcl::Window *pAppWin = pVu ? pVu->GetWindow(): nullptr; - if(pAppWin) - pAppWin->GrabFocus(); - } -} - IMPL_LINK_NOARG( SfxCommonTemplateDialog_Impl, TreeListApplyHdl, SvTreeListBox *, bool ) { ApplyHdl(nullptr); @@ -2050,7 +2037,15 @@ IMPL_LINK_NOARG( SfxCommonTemplateDialog_Impl, ApplyHdl, LinkParamNone*, void ) ( sal_uInt16 )GetFamilyItem_Impl()->GetFamily(), 0, nullptr, &nModifier ); } - ResetFocus(); + // After selecting a focused item if possible again on the app window + if ( dynamic_cast< const SfxTemplateDialog_Impl* >(this) != nullptr ) + { + SfxViewFrame *pViewFrame = pBindings->GetDispatcher_Impl()->GetFrame(); + SfxViewShell *pVu = pViewFrame->GetViewShell(); + vcl::Window *pAppWin = pVu ? pVu->GetWindow(): nullptr; + if(pAppWin) + pAppWin->GrabFocus(); + } } IMPL_LINK_NOARG( SfxCommonTemplateDialog_Impl, PreviewHdl, Button*, void) diff --git a/sfx2/source/dialog/titledockwin.cxx b/sfx2/source/dialog/titledockwin.cxx index 58057ac13f48..c084cbcd267c 100644 --- a/sfx2/source/dialog/titledockwin.cxx +++ b/sfx2/source/dialog/titledockwin.cxx @@ -200,20 +200,15 @@ namespace sfx2 // Paint title bar text. rRenderContext.SetLineColor(rStyleSettings.GetActiveTextColor()); aTitleBarBox.Left() += 3; - rRenderContext.DrawText(aTitleBarBox, impl_getTitle(), - DrawTextFlags::Left | DrawTextFlags::VCenter | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak); + rRenderContext.DrawText(aTitleBarBox, + !m_sTitle.isEmpty() ? m_sTitle : GetText(), + DrawTextFlags::Left | DrawTextFlags::VCenter | DrawTextFlags::MultiLine | DrawTextFlags::WordBreak); // Restore original values of the output device. rRenderContext.Pop(); } - OUString TitledDockingWindow::impl_getTitle() const - { - return !m_sTitle.isEmpty() ? m_sTitle : GetText(); - } - - void TitledDockingWindow::impl_resetToolBox() { m_aToolbox->Clear(); diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx index 52d7eace89f9..45775b413fa9 100644 --- a/sfx2/source/doc/Metadatable.cxx +++ b/sfx2/source/doc/Metadatable.cxx @@ -933,14 +933,6 @@ struct XmlIdRegistryClipboard::XmlIdRegistry_Impl Metadatable* const* LookupEntry(const OUString & i_rStreamName, const OUString & i_rIdref) const; - Metadatable* * LookupEntry(const OUString & i_rStreamName, - const OUString & i_rIdref) - { - return const_cast<Metadatable**>( - const_cast<const XmlIdRegistry_Impl*>(this) - ->LookupEntry(i_rStreamName, i_rIdref)); - } - ClipboardXmlIdMap_t m_XmlIdMap; ClipboardXmlIdReverseMap_t m_XmlIdReverseMap; }; @@ -1036,7 +1028,7 @@ XmlIdRegistryClipboard::XmlIdRegistry_Impl::TryInsertMetadatable( OSL_ENSURE(isContentFile(i_rStreamName) || isStylesFile(i_rStreamName), "invalid stream"); - Metadatable ** ppEntry = LookupEntry(i_rStreamName, i_rIdref); + Metadatable ** ppEntry = const_cast<Metadatable**>(LookupEntry(i_rStreamName, i_rIdref)); if (ppEntry) { if (*ppEntry) diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 2f0455c984ac..a948316fa5bf 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -649,7 +649,14 @@ const OUString& SfxMedium::GetPhysicalName() const void SfxMedium::CreateFileStream() { - ForceSynchronStream_Impl(); + // force synchron + if( pImpl->m_pInStream ) + { + SvLockBytes* pBytes = pImpl->m_pInStream->GetLockBytes(); + if( pBytes ) + pBytes->SetSynchronMode(); + } + GetInStream(); if( pImpl->m_pInStream ) { @@ -3117,17 +3124,6 @@ bool SfxMedium::IsExpired() const } -void SfxMedium::ForceSynchronStream_Impl() -{ - if( pImpl->m_pInStream ) - { - SvLockBytes* pBytes = pImpl->m_pInStream->GetLockBytes(); - if( pBytes ) - pBytes->SetSynchronMode(); - } -} - - SfxFrame* SfxMedium::GetLoadTargetFrame() const { return pImpl->wLoadTargetFrame; diff --git a/sfx2/source/doc/docundomanager.cxx b/sfx2/source/doc/docundomanager.cxx index f37a1207ddfa..290b861a57bf 100644 --- a/sfx2/source/doc/docundomanager.cxx +++ b/sfx2/source/doc/docundomanager.cxx @@ -79,8 +79,6 @@ namespace sfx2 { }; - SfxObjectShell* getObjectShell() { return rAntiImpl.getBaseModel().GetObjectShell(); } - // IUndoManagerImplementation virtual ::svl::IUndoManager& getImplUndoManager() override; virtual Reference< XUndoManager > getThis() override; @@ -134,7 +132,7 @@ namespace sfx2 { SfxModelGuard aGuard( rAntiImpl ); - const SfxObjectShell* pDocShell = getObjectShell(); + const SfxObjectShell* pDocShell = rAntiImpl.getBaseModel().GetObjectShell(); ENSURE_OR_THROW( pDocShell != nullptr, "lcl_invalidateUndo: no access to the doc shell!" ); SfxViewFrame* pViewFrame = SfxViewFrame::GetFirst( pDocShell ); while ( pViewFrame ) diff --git a/sfx2/source/doc/frmdescr.cxx b/sfx2/source/doc/frmdescr.cxx index 50e851c0dcc9..c2f217b99adb 100644 --- a/sfx2/source/doc/frmdescr.cxx +++ b/sfx2/source/doc/frmdescr.cxx @@ -64,7 +64,7 @@ SfxItemSet* SfxFrameDescriptor::GetArgs() void SfxFrameDescriptor::SetURL( const OUString& rURL ) { aURL = INetURLObject(rURL); - SetActualURL( aURL ); + SetActualURL(aURL.GetMainURL( INetURLObject::DECODE_TO_IURI )); } void SfxFrameDescriptor::SetActualURL( const OUString& rURL ) @@ -74,11 +74,6 @@ void SfxFrameDescriptor::SetActualURL( const OUString& rURL ) pImpl->pArgs->ClearItem(); } -void SfxFrameDescriptor::SetActualURL( const INetURLObject& rURL ) -{ - SetActualURL(rURL.GetMainURL( INetURLObject::DECODE_TO_IURI )); -} - void SfxFrameDescriptor::SetEditable( bool bSet ) { pImpl->bEditable = bSet; diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 3e8ee2201e83..473176c20ef1 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -587,13 +587,6 @@ bool SfxObjectShell::SwitchToShared( bool bShared, bool bSave ) } -void SfxObjectShell::FreeSharedFile() -{ - if ( pMedium ) - FreeSharedFile( pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ); -} - - void SfxObjectShell::FreeSharedFile( const OUString& aTempFileURL ) { SetSharedXMLFlag( false ); diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 9150ef6b0645..d6a8a5ac7669 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -289,7 +289,7 @@ SfxObjectShell::SfxObjectShell( const SfxModelFlags i_nCreationFlags ) const bool bScriptSupport = ( i_nCreationFlags & SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS ) == SfxModelFlags::NONE; if ( !bScriptSupport ) - SetHasNoBasic(); + pImpl->m_bNoBasicCapabilities = true; const bool bDocRecovery = ( i_nCreationFlags & SfxModelFlags::DISABLE_DOCUMENT_RECOVERY ) == SfxModelFlags::NONE; if ( !bDocRecovery ) @@ -357,8 +357,8 @@ SfxObjectShell::~SfxObjectShell() pMedium->CloseAndReleaseStreams_Impl(); #if HAVE_FEATURE_MULTIUSER_ENVIRONMENT - if ( IsDocShared() ) - FreeSharedFile(); + if ( IsDocShared() && pMedium ) + FreeSharedFile( pMedium->GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) ); #endif DELETEX( SfxMedium, pMedium ); } @@ -683,11 +683,6 @@ BasicManager* SfxObjectShell::GetBasicManager() const return pBasMgr; } -void SfxObjectShell::SetHasNoBasic() -{ - pImpl->m_bNoBasicCapabilities = true; -} - bool SfxObjectShell::HasBasic() const { #if !HAVE_FEATURE_SCRIPTING diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 27e79f8dedbb..4dadf7f2bf25 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -347,7 +347,6 @@ class SfxOwnFramesLocker public: explicit SfxOwnFramesLocker( SfxObjectShell* ObjechShell ); ~SfxOwnFramesLocker(); - void UnlockFrames(); }; SfxOwnFramesLocker::SfxOwnFramesLocker( SfxObjectShell* pObjectShell ) @@ -395,25 +394,6 @@ SfxOwnFramesLocker::SfxOwnFramesLocker( SfxObjectShell* pObjectShell ) SfxOwnFramesLocker::~SfxOwnFramesLocker() { - UnlockFrames(); -} - -vcl::Window* SfxOwnFramesLocker::GetVCLWindow( const Reference< frame::XFrame >& xFrame ) -{ - vcl::Window* pWindow = nullptr; - - if ( xFrame.is() ) - { - Reference< awt::XWindow > xWindow = xFrame->getContainerWindow(); - if ( xWindow.is() ) - pWindow = VCLUnoHelper::GetWindow( xWindow ); - } - - return pWindow; -} - -void SfxOwnFramesLocker::UnlockFrames() -{ for ( sal_Int32 nInd = 0; nInd < m_aLockedFrames.getLength(); nInd++ ) { try @@ -437,6 +417,20 @@ void SfxOwnFramesLocker::UnlockFrames() } } +vcl::Window* SfxOwnFramesLocker::GetVCLWindow( const Reference< frame::XFrame >& xFrame ) +{ + vcl::Window* pWindow = nullptr; + + if ( xFrame.is() ) + { + Reference< awt::XWindow > xWindow = xFrame->getContainerWindow(); + if ( xWindow.is() ) + pWindow = VCLUnoHelper::GetWindow( xWindow ); + } + + return pWindow; +} + // SfxSaveGuard ==================================================================================== class SfxSaveGuard { @@ -4124,8 +4118,11 @@ namespace sfx { namespace intern { ~ViewCreationGuard() { - if ( !m_bSuccess ) - impl_closeAll(); + if ( !m_bSuccess && m_aWeakFrame && !m_aWeakFrame->GetCurrentDocument() ) + { + m_aWeakFrame->SetFrameInterface_Impl( nullptr ); + m_aWeakFrame->DoClose(); + } } void takeFrameOwnership( SfxFrame* i_pFrame ) @@ -4141,16 +4138,6 @@ namespace sfx { namespace intern { } private: - void impl_closeAll() - { - if ( m_aWeakFrame && !m_aWeakFrame->GetCurrentDocument() ) - { - m_aWeakFrame->SetFrameInterface_Impl( nullptr ); - m_aWeakFrame->DoClose(); - } - } - - private: bool m_bSuccess; SfxFrameWeakRef m_aWeakFrame; }; diff --git a/sfx2/source/doc/sfxmodelfactory.cxx b/sfx2/source/doc/sfxmodelfactory.cxx index 60f72492b209..21a30bfd79e7 100644 --- a/sfx2/source/doc/sfxmodelfactory.cxx +++ b/sfx2/source/doc/sfxmodelfactory.cxx @@ -87,9 +87,6 @@ namespace sfx2 virtual ~SfxModelFactory() override; private: - Reference< XInterface > impl_createInstance( const SfxModelFlags _nCreationFlags ) const; - - private: const Reference< XMultiServiceFactory > m_xServiceFactory; const OUString m_sImplementationName; const Sequence< OUString > m_aServiceNames; @@ -116,12 +113,6 @@ namespace sfx2 } - Reference< XInterface > SfxModelFactory::impl_createInstance( const SfxModelFlags _nCreationFlags ) const - { - return (*m_pComponentFactoryFunc)( m_xServiceFactory, _nCreationFlags ); - } - - Reference< XInterface > SAL_CALL SfxModelFactory::createInstance( ) throw (Exception, RuntimeException, std::exception) { return createInstanceWithArguments( Sequence< Any >() ); @@ -163,7 +154,7 @@ namespace sfx2 | ( bScriptSupport ? SfxModelFlags::NONE : SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS ) | ( bDocRecoverySupport ? SfxModelFlags::NONE : SfxModelFlags::DISABLE_DOCUMENT_RECOVERY ); - Reference< XInterface > xInstance( impl_createInstance( nCreationFlags ) ); + Reference< XInterface > xInstance( (*m_pComponentFactoryFunc)( m_xServiceFactory, nCreationFlags ) ); // to mimic the bahaviour of the default factory's createInstanceWithArguments, we initialize // the object with the given arguments, stripped by the three special ones diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx index d49cf8cd37b7..d24373cbe929 100644 --- a/sfx2/source/inc/templdgi.hxx +++ b/sfx2/source/inc/templdgi.hxx @@ -249,7 +249,6 @@ protected: { return nActFamily != 0xffff; } - void ResetFocus(); void EnableDelete(); void Initialize(); void EnableHierarchical(bool); diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 7dc46f83f1d0..ff68c1ff93fa 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -842,7 +842,7 @@ void SfxPopupWindow::dispose() } -void SfxPopupWindow::GetOrCreateStatusListener() +void SfxPopupWindow::AddStatusListener( const OUString& rCommandURL ) { if ( !m_xStatusListener.is() ) { @@ -852,12 +852,6 @@ void SfxPopupWindow::GetOrCreateStatusListener() this ); m_xStatusListener.set( static_cast< cppu::OWeakObject* >( m_pStatusListener ), UNO_QUERY ); } -} - - -void SfxPopupWindow::AddStatusListener( const OUString& rCommandURL ) -{ - GetOrCreateStatusListener(); if ( m_xStatusListener.is() ) m_pStatusListener->addStatusListener( rCommandURL ); } @@ -881,7 +875,11 @@ void SfxPopupWindow::PopupModeEnd() if ( IsVisible() ) { // was teared-off - DeleteFloatingWindow(); + if ( m_bFloating ) + { + Hide(); + Delete(); + } m_bFloating = true; } else @@ -889,16 +887,6 @@ void SfxPopupWindow::PopupModeEnd() } -void SfxPopupWindow::DeleteFloatingWindow() -{ - if ( m_bFloating ) - { - Hide(); - Delete(); - } -} - - void SfxPopupWindow::MouseMove( const ::MouseEvent& rMEvt ) { if ( !m_bCascading ) diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index da20f4013e0a..2d698dbaa76b 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1286,7 +1286,7 @@ void SfxViewFrame::Construct_Impl( SfxObjectShell *pObjSh ) m_xObjSh = pObjSh; if ( m_xObjSh.Is() && m_xObjSh->IsPreview() ) - SetQuietMode_Impl( true ); + GetDispatcher()->SetQuietMode_Impl( true ); if ( pObjSh ) { @@ -1631,11 +1631,6 @@ void SfxViewFrame::MakeActive_Impl( bool bGrabFocus ) } } -void SfxViewFrame::SetQuietMode_Impl( bool bOn ) -{ - GetDispatcher()->SetQuietMode_Impl( bOn ); -} - SfxObjectShell* SfxViewFrame::GetObjectShell() { return m_xObjSh.get(); |