diff options
33 files changed, 8 insertions, 535 deletions
diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx index 6675e84e8b53..d90f9bef74c9 100644 --- a/include/sfx2/dockwin.hxx +++ b/include/sfx2/dockwin.hxx @@ -100,7 +100,6 @@ public: Size GetMinOutputSizePixel() const; virtual bool Notify( NotifyEvent& rNEvt ) SAL_OVERRIDE; virtual void FadeIn( bool ); - void AutoShow( bool bShow = true ); DECL_LINK(TimerHdl, void *); SAL_DLLPRIVATE void Initialize_Impl(); diff --git a/include/sfx2/templdlg.hxx b/include/sfx2/templdlg.hxx index 8c9f2f1e47cb..31102fedafb2 100644 --- a/include/sfx2/templdlg.hxx +++ b/include/sfx2/templdlg.hxx @@ -66,8 +66,6 @@ public: SfxTemplateDialogWrapper (Window*,sal_uInt16,SfxBindings*,SfxChildWinInfo*); SFX_DECL_CHILDWINDOW_WITHID(SfxTemplateDialogWrapper); - - void SetParagraphFamily(); }; // class SfxTemplatePanelControl ----------------------------------------- diff --git a/include/svtools/fileview.hxx b/include/svtools/fileview.hxx index 6e88c6a74265..334f6ca7901d 100644 --- a/include/svtools/fileview.hxx +++ b/include/svtools/fileview.hxx @@ -81,7 +81,6 @@ protected: public: SvtFileView( Window* pParent, WinBits nBits, bool bOnlyFolder, bool bMultiSelection ); - SvtFileView( Window* pParent, WinBits nBits, sal_uInt8 nFlags ); virtual ~SvtFileView(); virtual Size GetOptimalSize() const SAL_OVERRIDE; @@ -117,17 +116,6 @@ public: const ::com::sun::star::uno::Sequence< OUString >& rBlackList ); - FileViewResult Initialize( - const OUString& rFolderURL, - const OUString& rFilter, - const FileViewAsyncAction* pAsyncDescriptor ); - /** initialze the view with a sequence of contents, which have already been obtained elsewhere - - This method will never return <member>eStillRunning</member>, since it will fill the - view synchronously - */ - bool Initialize( const ::com::sun::star::uno::Sequence< OUString >& aContents ); - /** initializes the view with the content of a folder given by an UCB content */ bool Initialize( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent, @@ -182,13 +170,8 @@ public: SvTreeListEntry* FirstSelected() const; SvTreeListEntry* NextSelected( SvTreeListEntry* pEntry ) const; void EnableAutoResize(); - void SetFocus(); - void EnableContextMenu( bool bEnable ); void EnableDelete( bool bEnable ); - void EnableNameReplacing( bool bEnable = true ); - // translate folder names or display doc-title instead of file name - // EnableContextMenu( sal_True )/EnableDelete(sal_True) disable name replacing! // save and load column size and sort order OUString GetConfigString() const; diff --git a/include/svtools/ivctrl.hxx b/include/svtools/ivctrl.hxx index 46478a47c69b..1b4cba84747b 100644 --- a/include/svtools/ivctrl.hxx +++ b/include/svtools/ivctrl.hxx @@ -289,10 +289,6 @@ public: ); /** creates automatic mnemonics for all icon texts in the control - */ - void CreateAutoMnemonics( void ); - - /** creates automatic mnemonics for all icon texts in the control @param _rUsedMnemonics a MnemonicGenerator at which some other mnemonics are already registered. diff --git a/include/svx/galbrws.hxx b/include/svx/galbrws.hxx deleted file mode 100644 index a4de714f4cd5..000000000000 --- a/include/svx/galbrws.hxx +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- 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_SVX_GALBRWS_HXX -#define INCLUDED_SVX_GALBRWS_HXX - -#include <sfx2/ctrlitem.hxx> -#include <sfx2/dockwin.hxx> -#include <vcl/graph.hxx> -#include <tools/urlobj.hxx> -#include <svx/svxdllapi.h> - - -class FmFormModel; -class GalleryBrowser1; -class GalleryBrowser2; -class GallerySplitter; -class Gallery; - -class SVX_DLLPUBLIC GalleryBrowser : public SfxDockingWindow -{ - friend class GalleryBrowser1; - friend class GalleryBrowser2; - friend class GallerySplitter; - using Window::KeyInput; - -private: - Size maLastSize; - GallerySplitter* mpSplitter; - GalleryBrowser1* mpBrowser1; - GalleryBrowser2* mpBrowser2; - Gallery* mpGallery; - - /// bitfield - void InitSettings(); - - virtual bool Close() SAL_OVERRIDE; - virtual void Resize() SAL_OVERRIDE; - virtual void GetFocus() SAL_OVERRIDE; - - DECL_LINK( SplitHdl, void* ); - -protected: - - void ThemeSelectionHasChanged(); - -public: - - GalleryBrowser( SfxBindings* pBindings, SfxChildWindow* pCW, - Window* pParent, const ResId& rResId ); - virtual ~GalleryBrowser(); - - bool KeyInput( const KeyEvent& rKEvt, Window* pWindow ); -}; - -#endif // INCLUDED_SVX_GALBRWS_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 1146c73dc3a3..86e33a13ea55 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -205,10 +205,6 @@ inline bool PushButton::IsChecked() const return (GetState() == TRISTATE_TRUE); } - -// - OKButton - - - class VCL_DLLPUBLIC OKButton : public PushButton { protected: @@ -222,15 +218,11 @@ private: public: explicit OKButton( Window* pParent, WinBits nStyle = WB_DEFBUTTON ); - explicit OKButton( Window* pParent, const ResId& ); virtual void Click() SAL_OVERRIDE; }; -// - CancelButton - - - class VCL_DLLPUBLIC CancelButton : public PushButton { protected: @@ -244,7 +236,6 @@ private: public: explicit CancelButton( Window* pParent, WinBits nStyle = 0 ); - explicit CancelButton( Window* pParent, const ResId& ); virtual void Click() SAL_OVERRIDE; }; diff --git a/sc/inc/pch/precompiled_sc.hxx b/sc/inc/pch/precompiled_sc.hxx index 91e1429a73f7..5e4dada012d9 100644 --- a/sc/inc/pch/precompiled_sc.hxx +++ b/sc/inc/pch/precompiled_sc.hxx @@ -737,7 +737,6 @@ #include <svx/fontworkgallery.hxx> #include <svx/formatpaintbrushctrl.hxx> #include <svx/framelinkarray.hxx> -#include <svx/galbrws.hxx> #include <svx/gallery.hxx> #include <svx/galleryitem.hxx> #include <svx/grafctrl.hxx> diff --git a/sc/source/ui/app/scdll.cxx b/sc/source/ui/app/scdll.cxx index 49bd60286f68..12c40a5e4e95 100644 --- a/sc/source/ui/app/scdll.cxx +++ b/sc/source/ui/app/scdll.cxx @@ -81,7 +81,6 @@ #include <svx/fntctl.hxx> #include <svx/fntszctl.hxx> #include <svx/grafctrl.hxx> -#include <svx/galbrws.hxx> #include <svx/clipboardctl.hxx> #include <svx/lboxctrl.hxx> #include <svx/verttexttbxctrl.hxx> diff --git a/sc/source/ui/view/tabvwsh.cxx b/sc/source/ui/view/tabvwsh.cxx index 8f32483a128c..847f3f634a42 100644 --- a/sc/source/ui/view/tabvwsh.cxx +++ b/sc/source/ui/view/tabvwsh.cxx @@ -18,7 +18,6 @@ */ #include "scitems.hxx" -#include <svx/galbrws.hxx> #include <svx/imapdlg.hxx> #include <svx/srchdlg.hxx> #include <svl/srchitem.hxx> diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx index a7d7e498557e..c0e51fb57e6f 100644 --- a/sc/source/ui/view/tabvwsh9.cxx +++ b/sc/source/ui/view/tabvwsh9.cxx @@ -19,7 +19,6 @@ #include <svx/svdmark.hxx> #include <svx/svdview.hxx> -#include <svx/galbrws.hxx> #include <svx/gallery.hxx> #include <svx/hlnkitem.hxx> #include <sfx2/bindings.hxx> diff --git a/sd/inc/pch/precompiled_sd.hxx b/sd/inc/pch/precompiled_sd.hxx index 4742cf5b0b5c..2df50de29ca3 100644 --- a/sd/inc/pch/precompiled_sd.hxx +++ b/sd/inc/pch/precompiled_sd.hxx @@ -651,7 +651,6 @@ #include <svx/fontworkbar.hxx> #include <svx/fontworkgallery.hxx> #include <svx/formatpaintbrushctrl.hxx> -#include <svx/galbrws.hxx> #include <svx/gallery.hxx> #include <svx/galleryitem.hxx> #include <svx/globl3d.hxx> diff --git a/sd/source/ui/app/sddll.cxx b/sd/source/ui/app/sddll.cxx index 42c3d7840808..ba6a6f772050 100644 --- a/sd/source/ui/app/sddll.cxx +++ b/sd/source/ui/app/sddll.cxx @@ -72,7 +72,6 @@ #include <svx/fontwork.hxx> #include <svx/fontworkgallery.hxx> #include <svx/formatpaintbrushctrl.hxx> -#include <svx/galbrws.hxx> #include <svx/grafctrl.hxx> #include <svx/hyperdlg.hxx> #include <svx/imapdlg.hxx> diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index cdca55974b51..80be5fa3b38e 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -52,7 +52,6 @@ #include <svx/bmpmask.hxx> #include <svx/srchdlg.hxx> #include <svx/hyperdlg.hxx> -#include <svx/galbrws.hxx> #include "NavigatorChildWindow.hxx" #include "AnimationChildWindow.hxx" #include "notifydocumentevent.hxx" diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 54765d6500c7..61d0b862335a 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -58,7 +58,6 @@ #include <svx/f3dchild.hxx> #include <svx/fontwork.hxx> #include <svx/fontworkbar.hxx> -#include <svx/galbrws.hxx> #include <svx/graphichelper.hxx> #include <svx/hlnkitem.hxx> #include <svx/imapdlg.hxx> diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 093be5c9fddf..d9582c9c7629 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -27,7 +27,6 @@ #include <svx/svxids.hrc> #include <svx/fontwork.hxx> #include <svx/bmpmask.hxx> -#include <svx/galbrws.hxx> #include <svx/imapdlg.hxx> #include <svx/SvxColorChildWindow.hxx> #include <svx/f3dchild.hxx> diff --git a/sd/source/ui/view/drvwshrg.cxx b/sd/source/ui/view/drvwshrg.cxx index ea7c9d21ddde..6a3f3257ea54 100644 --- a/sd/source/ui/view/drvwshrg.cxx +++ b/sd/source/ui/view/drvwshrg.cxx @@ -24,7 +24,6 @@ #include <svx/fontwork.hxx> #include <svx/bmpmask.hxx> -#include <svx/galbrws.hxx> #include <svx/imapdlg.hxx> #include <svx/SvxColorChildWindow.hxx> #include <sfx2/objface.hxx> diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 68bc13ea63f5..529096832518 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -1843,11 +1843,6 @@ bool SfxDockingWindow::IsAutoHide_Impl() const return false; } -void SfxDockingWindow::AutoShow( bool bShow ) -{ - AutoShow_Impl(bShow); -} - void SfxDockingWindow::AutoShow_Impl( bool bShow ) { if ( pImp->pSplitWin ) diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 09f30cedcde1..2ab172684df1 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -371,16 +371,7 @@ SfxTemplateDialogWrapper::SfxTemplateDialogWrapper(Window *pParentWnd, pWin->SetMinOutputSizePixel(pWin->pImpl->GetMinOutputSizePixel()); } -void SfxTemplateDialogWrapper::SetParagraphFamily() -{ - // forward to SfxTemplateDialog, because SfxTemplateDialog isn't exported - static_cast< SfxTemplateDialog* >( GetWindow() )->SetParagraphFamily(); -} - - - //===== SfxTemplatePanelControl =============================================== - SfxTemplatePanelControl::SfxTemplatePanelControl ( SfxBindings* pBindings, Window* pParentWindow) diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 8760176ced4c..2b32ba7bf20e 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -537,20 +537,6 @@ void SidebarController::OpenThenSwitchToDeck ( mpTabBar->Invalidate(); } - - - -void SidebarController::RequestSwitchToDeck ( - const ::rtl::OUString& rsDeckId) -{ - maContextChangeUpdate.CancelRequest(); - maAsynchronousDeckSwitch.RequestCall( - ::boost::bind(&SidebarController::OpenThenSwitchToDeck, this, rsDeckId)); -} - - - - void SidebarController::SwitchToDeck ( const ::rtl::OUString& rsDeckId) { @@ -564,9 +550,6 @@ void SidebarController::SwitchToDeck ( } } - - - void SidebarController::SwitchToDeck ( const DeckDescriptor& rDeckDescriptor, const Context& rContext) diff --git a/sfx2/source/sidebar/SidebarController.hxx b/sfx2/source/sidebar/SidebarController.hxx index a2397cf7ce60..4043bb5bf842 100644 --- a/sfx2/source/sidebar/SidebarController.hxx +++ b/sfx2/source/sidebar/SidebarController.hxx @@ -123,8 +123,6 @@ public: const static sal_Int32 SwitchFlag_ForceNewDeck = 0x02; const static sal_Int32 SwitchFlag_ForceNewPanels = 0x02; - void RequestSwitchToDeck ( - const ::rtl::OUString& rsDeckId); void OpenThenSwitchToDeck ( const ::rtl::OUString& rsDeckId); diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 24c08b01bb2b..8ebc78fb3856 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -479,7 +479,6 @@ public: sal_uLong GetEntryPos( const OUString& rURL ); - inline void EnableContextMenu( bool bEnable ); inline void EnableDelete( bool bEnable ); void Resort_Impl( sal_Int16 nColumn, bool bAscending ); @@ -487,7 +486,6 @@ public: const OUString& rTitle, bool bWrapAround ); - inline bool EnableNameReplacing( bool bEnable = true ); // returns false, if action wasn't possible void SetActualFolder( const INetURLObject& rActualFolder ); void SetSelectHandler( const Link& _rHdl ); @@ -509,13 +507,6 @@ protected: virtual void onTimeout( CallbackTimer* _pInstigator ) SAL_OVERRIDE; }; -inline void SvtFileView_Impl::EnableContextMenu( bool bEnable ) -{ - mpView->EnableContextMenuHandling( bEnable ); - if( bEnable ) - mbReplaceNames = false; -} - inline void SvtFileView_Impl::EnableDelete( bool bEnable ) { mpView->EnableDelete( bEnable ); @@ -523,25 +514,6 @@ inline void SvtFileView_Impl::EnableDelete( bool bEnable ) mbReplaceNames = false; } -inline bool SvtFileView_Impl::EnableNameReplacing( bool bEnable ) -{ - mpView->EnableRename( bEnable ); - - bool bRet; - if( mpView->IsDeleteOrContextMenuEnabled() ) - { - DBG_ASSERT( !mbReplaceNames, "SvtFileView_Impl::EnableNameReplacing(): state should be not possible!" ); - bRet = !bEnable; // only for enabling this is an unsuccessful result - } - else - { - mbReplaceNames = bEnable; - bRet = true; - } - - return bRet; -} - inline void SvtFileView_Impl::EndEditing( bool _bCancel ) { if ( mpView->IsEditingActive() ) @@ -1120,24 +1092,6 @@ SvtFileView::SvtFileView( Window* pParent, WinBits nBits, pHeaderBar->SetEndDragHdl( LINK( this, SvtFileView, HeaderEndDrag_Impl ) ); } -SvtFileView::SvtFileView( Window* pParent, WinBits nStyle, sal_uInt8 nFlags ) : - - Control( pParent, nStyle ) -{ - Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext(); - Reference< XInteractionHandler > xInteractionHandler( - InteractionHandler::createWithParent(xContext, 0), UNO_QUERY_THROW ); - Reference < XCommandEnvironment > xCmdEnv = new ::ucbhelper::CommandEnvironment( xInteractionHandler, Reference< XProgressHandler >() ); - - mpImp = new SvtFileView_Impl( this, xCmdEnv, nFlags, nFlags & FILEVIEW_ONLYFOLDER ); - - SetSortColumn( (nFlags & FILEVIEW_SHOW_NONE) == 0 ); - - HeaderBar *pHeaderBar = mpImp->mpView->GetHeaderBar(); - pHeaderBar->SetSelectHdl( LINK( this, SvtFileView, HeaderSelect_Impl ) ); - pHeaderBar->SetEndDragHdl( LINK( this, SvtFileView, HeaderEndDrag_Impl ) ); -} - SvtFileView::~SvtFileView() { // use temp pointer to prevent access of deleted member (GetFocus()) @@ -1321,39 +1275,6 @@ FileViewResult SvtFileView::Initialize( return eFailure; } - -FileViewResult SvtFileView::Initialize( - const OUString& rURL, - const OUString& rFilter, - const FileViewAsyncAction* pAsyncDescriptor ) -{ - return Initialize( rURL, rFilter, pAsyncDescriptor, ::com::sun::star::uno::Sequence< OUString >()); -} - - - - -bool SvtFileView::Initialize( const Sequence< OUString >& aContents ) -{ - WaitObject aWaitCursor( this ); - - mpImp->maViewURL = ""; - mpImp->maCurrentFilter = mpImp->maAllFilter; - - mpImp->Clear(); - mpImp->CreateVector_Impl( aContents ); - if( GetSortColumn() ) - mpImp->SortFolderContent_Impl(); - - mpImp->OpenFolder_Impl(); - - mpImp->maOpenDoneLink.Call( this ); - - return true; -} - - - FileViewResult SvtFileView::ExecuteFilter( const OUString& rFilter, const FileViewAsyncAction* pAsyncDescriptor ) { mpImp->maCurrentFilter = rFilter.toAsciiLowerCase(); @@ -1364,15 +1285,11 @@ FileViewResult SvtFileView::ExecuteFilter( const OUString& rFilter, const FileVi return eResult; } - - void SvtFileView::CancelRunningAsyncAction() { mpImp->CancelRunningAsyncAction(); } - - void SvtFileView::SetNoSelection() { mpImp->mpView->SelectAll( false ); @@ -1422,56 +1339,31 @@ SvTreeListEntry* SvtFileView::NextSelected( SvTreeListEntry* pEntry ) const return mpImp->mpView->NextSelected( pEntry ); } - - void SvtFileView::EnableAutoResize() { mpImp->mpView->EnableAutoResize(); } - - -void SvtFileView::SetFocus() -{ - mpImp->mpView->GrabFocus(); -} - - const OUString& SvtFileView::GetViewURL() const { return mpImp->maViewURL; } - void SvtFileView::SetOpenDoneHdl( const Link& rHdl ) { mpImp->maOpenDoneLink = rHdl; } - -void SvtFileView::EnableContextMenu( bool bEnable ) -{ - mpImp->EnableContextMenu( bEnable ); -} - - void SvtFileView::EnableDelete( bool bEnable ) { mpImp->EnableDelete( bEnable ); } -void SvtFileView::EnableNameReplacing( bool bEnable ) -{ - mpImp->EnableNameReplacing( bEnable ); -} - - void SvtFileView::EndInplaceEditing( bool _bCancel ) { return mpImp->EndEditing( _bCancel ); } - IMPL_LINK( SvtFileView, HeaderSelect_Impl, HeaderBar*, pBar ) { DBG_ASSERT( pBar, "no headerbar" ); diff --git a/svtools/source/contnr/ivctrl.cxx b/svtools/source/contnr/ivctrl.cxx index 0035f80225ba..7fd923f556b1 100644 --- a/svtools/source/contnr/ivctrl.cxx +++ b/svtools/source/contnr/ivctrl.cxx @@ -300,11 +300,6 @@ void SvtIconChoiceCtrl::CreateAutoMnemonics( MnemonicGenerator& _rUsedMnemonics _pImp->CreateAutoMnemonics( &_rUsedMnemonics ); } -void SvtIconChoiceCtrl::CreateAutoMnemonics( void ) -{ - _pImp->CreateAutoMnemonics(); -} - SvxIconChoiceCtrlEntry* SvtIconChoiceCtrl::GetSelectedEntry( sal_uLong& rPos ) const { return _pImp->GetFirstSelectedEntry( rPos ); diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index 960650b431c0..891744dbb1d6 100644 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -123,7 +123,6 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\ svx/source/engine3d/view3d1 \ svx/source/engine3d/viewpt3d2 \ svx/source/gallery2/codec \ - svx/source/gallery2/galbrws \ svx/source/gallery2/galbrws1 \ svx/source/gallery2/galbrws2 \ svx/source/gallery2/galctrl \ diff --git a/svx/inc/galbrws2.hxx b/svx/inc/galbrws2.hxx index 56dbb31ad909..38cb724c6618 100644 --- a/svx/inc/galbrws2.hxx +++ b/svx/inc/galbrws2.hxx @@ -27,10 +27,11 @@ #include <vcl/toolbox.hxx> #include <svtools/transfer.hxx> #include <svl/lstner.hxx> +#include <svx/galctrl.hxx> #include <svtools/miscopt.hxx> -#include "svx/galbrws.hxx" #include <com/sun/star/frame/XDispatch.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/util/XURLTransformer.hpp> diff --git a/svx/source/gallery2/galbrws.cxx b/svx/source/gallery2/galbrws.cxx deleted file mode 100644 index 7bec886eff94..000000000000 --- a/svx/source/gallery2/galbrws.cxx +++ /dev/null @@ -1,232 +0,0 @@ -/* -*- 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 . - */ - -#include <vcl/split.hxx> -#include <vcl/ctrl.hxx> -#include <vcl/settings.hxx> -#include <unotools/pathoptions.hxx> -#include <sfx2/app.hxx> -#include <sfx2/sfxsids.hrc> -#include "gallery.hrc" -#include "svx/galmisc.hxx" -#include "svx/gallery1.hxx" -#include "galbrws1.hxx" -#include "galbrws2.hxx" -#include "svx/galbrws.hxx" -#include "GallerySplitter.hxx" - -#include <boost/bind.hpp> - - -GalleryBrowser::GalleryBrowser( - SfxBindings* _pBindings, - SfxChildWindow* pCW, - Window* pParent, - const ResId& rResId) -: SfxDockingWindow(_pBindings, pCW, pParent, rResId), - maLastSize(GetOutputSizePixel()), - mpSplitter(0), - mpBrowser1(0), - mpBrowser2(0), - mpGallery(0) -{ - - mpGallery = Gallery::GetGalleryInstance(); - mpBrowser1 = new GalleryBrowser1( - this, - GAL_RES( GALLERY_BROWSER1 ), - mpGallery, - ::boost::bind(&GalleryBrowser::KeyInput,this,_1,_2), - ::boost::bind(&GalleryBrowser::ThemeSelectionHasChanged, this)); - mpSplitter = new GallerySplitter( this, GAL_RES( GALLERY_SPLITTER ), - ::boost::bind(&GalleryBrowser::InitSettings, this)); - mpBrowser2 = new GalleryBrowser2( this, GAL_RES( GALLERY_BROWSER2 ), mpGallery ); - - FreeResource(); - SetMinOutputSizePixel(maLastSize); - - mpBrowser1->SelectTheme( 0 ); - mpBrowser1->Show( true ); - mpBrowser2->Show( true ); - - const bool bLayoutHorizontal(maLastSize.Width() > maLastSize.Height()); - mpSplitter->SetHorizontal(bLayoutHorizontal); - mpSplitter->SetSplitHdl( LINK( this, GalleryBrowser, SplitHdl ) ); - mpSplitter->Show( true ); - - InitSettings(); -} - -GalleryBrowser::~GalleryBrowser() -{ - delete mpBrowser2; - delete mpSplitter; - delete mpBrowser1; - -} - -void GalleryBrowser::InitSettings() -{ - SetBackground( Wallpaper( GALLERY_DLG_COLOR ) ); - SetControlBackground( GALLERY_DLG_COLOR ); - SetControlForeground( GALLERY_DLG_COLOR ); - - mpSplitter->SetBackground( Wallpaper( GALLERY_DLG_COLOR ) ); - mpSplitter->SetControlBackground( GALLERY_DLG_COLOR ); - mpSplitter->SetControlForeground( GALLERY_DLG_COLOR ); - - mpBrowser1->SetBackground( Wallpaper( GALLERY_DLG_COLOR ) ); - mpBrowser1->SetControlBackground( GALLERY_DLG_COLOR ); - mpBrowser1->SetControlForeground( GALLERY_DLG_COLOR ); - - mpBrowser2->SetBackground( Wallpaper( GALLERY_DLG_COLOR ) ); - mpBrowser2->SetControlBackground( GALLERY_DLG_COLOR ); - mpBrowser2->SetControlForeground( GALLERY_DLG_COLOR ); -} - -void GalleryBrowser::Resize() -{ - // call parent - SfxDockingWindow::Resize(); - - // update hor/ver - const Size aNewSize( GetOutputSizePixel() ); - const bool bNewLayoutHorizontal(aNewSize.Width() > aNewSize.Height()); - const bool bOldLayoutHorizontal(mpSplitter->IsHorizontal()); - const long nSplitPos( bOldLayoutHorizontal ? mpSplitter->GetPosPixel().X() : mpSplitter->GetPosPixel().Y()); - const long nSplitSize( bOldLayoutHorizontal ? mpSplitter->GetOutputSizePixel().Width() : mpSplitter->GetOutputSizePixel().Height()); - - if(bNewLayoutHorizontal != bOldLayoutHorizontal) - { - mpSplitter->SetHorizontal(bNewLayoutHorizontal); - } - - const long nFrameLen = LogicToPixel( Size( 3, 0 ), MAP_APPFONT ).Width(); - const long nFrameLen2 = nFrameLen << 1; - - if(bNewLayoutHorizontal) - { - mpBrowser1->SetPosSizePixel( - Point( nFrameLen, nFrameLen ), - Size(nSplitPos - nFrameLen, aNewSize.Height() - nFrameLen2) ); - - mpSplitter->SetPosSizePixel( - Point( nSplitPos, 0), - Size( nSplitSize, aNewSize.Height() ) ); - - mpSplitter->SetDragRectPixel( - Rectangle( - Point( nFrameLen2, 0 ), - Size( aNewSize.Width() - ( nFrameLen2 << 1 ) - nSplitSize, aNewSize.Height() ) ) ); - - mpBrowser2->SetPosSizePixel( - Point( nSplitPos + nSplitSize, nFrameLen ), - Size( aNewSize.Width() - nSplitSize - nSplitPos - nFrameLen, aNewSize.Height() - nFrameLen2 ) ); - } - else - { - mpBrowser1->SetPosSizePixel( - Point( nFrameLen, nFrameLen ), - Size(aNewSize.Width() - nFrameLen2, nSplitPos - nFrameLen)); - - mpSplitter->SetPosSizePixel( - Point( 0, nSplitPos), - Size( aNewSize.Width(), nSplitSize ) ); - - mpSplitter->SetDragRectPixel( - Rectangle( - Point( 0, nFrameLen2 ), - Size( aNewSize.Width(), aNewSize.Height() - ( nFrameLen2 << 1 ) - nSplitSize ) )); - - mpBrowser2->SetPosSizePixel( - Point( nFrameLen, nSplitPos + nSplitSize ), - Size( aNewSize.Width() - nFrameLen2, aNewSize.Height() - nSplitSize - nSplitPos - nFrameLen )); - } - - maLastSize = aNewSize; -} - -bool GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* ) -{ - const sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); - bool bRet = ( !rKEvt.GetKeyCode().IsMod1() && - ( ( KEY_TAB == nCode ) || ( KEY_F6 == nCode && rKEvt.GetKeyCode().IsMod2() ) ) ); - - if( bRet ) - { - if( !rKEvt.GetKeyCode().IsShift() ) - { - if( mpBrowser1->mpThemes->HasChildPathFocus( true ) ) - mpBrowser2->GetViewWindow()->GrabFocus(); - else if( mpBrowser2->GetViewWindow()->HasFocus() ) - mpBrowser2->maViewBox.GrabFocus(); - else if( mpBrowser2->maViewBox.HasFocus() ) - mpBrowser1->maNewTheme.GrabFocus(); - else - mpBrowser1->mpThemes->GrabFocus(); - } - else - { - if( mpBrowser1->mpThemes->HasChildPathFocus( true ) ) - mpBrowser1->maNewTheme.GrabFocus(); - else if( mpBrowser1->maNewTheme.HasFocus() ) - mpBrowser2->maViewBox.GrabFocus(); - else if( mpBrowser2->maViewBox.HasFocus() ) - mpBrowser2->GetViewWindow()->GrabFocus(); - else - mpBrowser1->mpThemes->GrabFocus(); - } - } - - return bRet; -} - -bool GalleryBrowser::Close() -{ - return SfxDockingWindow::Close(); -} - -void GalleryBrowser::GetFocus() -{ - SfxDockingWindow::GetFocus(); - mpBrowser1->GrabFocus(); -} - -void GalleryBrowser::ThemeSelectionHasChanged() -{ - mpBrowser2->SelectTheme( mpBrowser1->GetSelectedTheme() ); -} - -IMPL_LINK_NOARG(GalleryBrowser, SplitHdl) -{ - if(mpSplitter->IsHorizontal()) - { - mpSplitter->SetPosPixel( Point( mpSplitter->GetSplitPosPixel(), mpSplitter->GetPosPixel().Y() ) ); - } - else - { - mpSplitter->SetPosPixel( Point( mpSplitter->GetPosPixel().X(), mpSplitter->GetSplitPosPixel() ) ); - } - - Resize(); - - return 0L; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index e59653d83c09..23fbb678f40a 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -25,10 +25,11 @@ #include <vcl/menu.hxx> #include <svl/lstner.hxx> #include <vector> -#include "svx/galbrws.hxx" #include <boost/function.hpp> +class GalleryBrowser1; + // - GalleryButton - class GalleryButton : public PushButton diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 2779824c7499..0e6577cd081c 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -656,16 +656,10 @@ bool GalleryBrowser2::KeyInput( const KeyEvent& rKEvt, Window* pWindow ) { Point aSelPos; const sal_uIntPtr nItemId = ImplGetSelectedItemId( NULL, aSelPos ); - GalleryBrowser* pParentBrowser = dynamic_cast<GalleryBrowser*>(GetParent()); bool bRet = false; - if (pParentBrowser != NULL) - bRet = pParentBrowser->KeyInput( rKEvt, pWindow ); - else - { - svx::sidebar::GalleryControl* pParentControl = dynamic_cast<svx::sidebar::GalleryControl*>(GetParent()); - if (pParentControl != NULL) - bRet = pParentControl->GalleryKeyInput(rKEvt, pWindow); - } + svx::sidebar::GalleryControl* pParentControl = dynamic_cast<svx::sidebar::GalleryControl*>(GetParent()); + if (pParentControl != NULL) + bRet = pParentControl->GalleryKeyInput(rKEvt, pWindow); if( !bRet && !maViewBox.HasFocus() && nItemId && mpCurTheme ) { diff --git a/svx/source/gallery2/galexpl.cxx b/svx/source/gallery2/galexpl.cxx index da73fbb8be6a..75def1b09e86 100644 --- a/svx/source/gallery2/galexpl.cxx +++ b/svx/source/gallery2/galexpl.cxx @@ -23,7 +23,6 @@ #include <sfx2/viewfrm.hxx> #include "svx/gallery1.hxx" #include "svx/galtheme.hxx" -#include "svx/galbrws.hxx" #include "svx/gallery.hxx" #include "galobj.hxx" diff --git a/sw/inc/pch/precompiled_sw.hxx b/sw/inc/pch/precompiled_sw.hxx index 3d708ce10097..f6c74f92bf27 100644 --- a/sw/inc/pch/precompiled_sw.hxx +++ b/sw/inc/pch/precompiled_sw.hxx @@ -849,7 +849,6 @@ #include <svx/fontworkgallery.hxx> #include <svx/formatpaintbrushctrl.hxx> #include <svx/framelink.hxx> -#include <svx/galbrws.hxx> #include <svx/gallery.hxx> #include <svx/galleryitem.hxx> #include <svx/grafctrl.hxx> diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index ed8f68e326f7..ae7527cc7b95 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -23,7 +23,6 @@ #include <swerror.h> #include <vcl/wrkwin.hxx> #include <vcl/graph.hxx> -#include <svx/galbrws.hxx> #include <svx/svdobj.hxx> #include <svtools/ehdl.hxx> #include <svx/fntszctl.hxx> diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx index 15d7c9b573e7..b4667ae9692f 100644 --- a/sw/source/uibase/uiview/view0.cxx +++ b/sw/source/uibase/uiview/view0.cxx @@ -21,7 +21,6 @@ #include "hintids.hxx" #include <vcl/graph.hxx> -#include <svx/galbrws.hxx> #include <svl/srchitem.hxx> #include <SwSpellDialogChildWindow.hxx> #include <svl/eitem.hxx> diff --git a/unusedcode.easy b/unusedcode.easy index 4e5facbface0..29dc6f94cc84 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -36,6 +36,7 @@ ScVbaFormat<ooo::vba::excel::XStyle>::getAddIndent() ScVbaFormat<ooo::vba::excel::XStyle>::setAddIndent(com::sun::star::uno::Any const&) SfxAppMenuControl_Impl::RegisterControl(unsigned short, SfxModule*) SfxInt64Item::SetValue(long) +SfxTemplateDialogWrapper::SetParagraphFamily() StyleSettings::SetCursorSize(long) StyleSettings::SetFloatTitleHeight(long) StyleSettings::SetHideDisabledMenuItems(bool) diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index a43b09b45755..0cbc46548223 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1647,18 +1647,6 @@ OKButton::OKButton( Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -OKButton::OKButton( Window* pParent, const ResId& rResId ) : - PushButton( WINDOW_OKBUTTON ) -{ - rResId.SetRT( RSC_OKBUTTON ); - WinBits nStyle = ImplInitRes( rResId ); - ImplInit( pParent, nStyle ); - ImplLoadRes( rResId ); - - if ( !(nStyle & WB_HIDE) ) - Show(); -} - void OKButton::Click() { // close parent if no link set @@ -1704,18 +1692,6 @@ CancelButton::CancelButton( Window* pParent, WinBits nStyle ) : ImplInit( pParent, nStyle ); } -CancelButton::CancelButton( Window* pParent, const ResId& rResId ) : - PushButton( WINDOW_CANCELBUTTON ) -{ - rResId.SetRT( RSC_CANCELBUTTON ); - WinBits nStyle = ImplInitRes( rResId ); - ImplInit( pParent, nStyle ); - ImplLoadRes( rResId ); - - if ( !(nStyle & WB_HIDE) ) - Show(); -} - void CancelButton::Click() { // close parent if link not set |