summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-27 08:46:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-27 10:18:31 +0100
commit53617c8651274e581cc1b55c9705c54e03f93879 (patch)
treee47a5e84d3b38344b1f845233398a10150949145 /svx
parentf52b92f1c55657fd737c4d92010ca54e65c387d3 (diff)
callcatcher: update unused code
Change-Id: Idaed255e4f004ad555ccbd6ba9dc29bf522d3c5f
Diffstat (limited to 'svx')
-rw-r--r--svx/Library_svxcore.mk1
-rw-r--r--svx/inc/galbrws2.hxx3
-rw-r--r--svx/source/gallery2/galbrws.cxx232
-rw-r--r--svx/source/gallery2/galbrws1.hxx3
-rw-r--r--svx/source/gallery2/galbrws2.cxx12
-rw-r--r--svx/source/gallery2/galexpl.cxx1
6 files changed, 7 insertions, 245 deletions
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"