summaryrefslogtreecommitdiff
path: root/toolkit/source/layout
diff options
context:
space:
mode:
authorFelix Zhang <fezhang@suse.com>2011-11-15 10:15:49 +0800
committerJan Holesovsky <kendy@suse.cz>2011-11-15 14:39:55 +0100
commitd11a82acfd1f529eb399780a1ec2d7a8edb2a40d (patch)
tree63dd5e268545b04ef97353d2bfff8c6167b3394e /toolkit/source/layout
parenteacfa0f77c3d161f3e0c207120dcf3c2958acee4 (diff)
remove unused methods from layout
Diffstat (limited to 'toolkit/source/layout')
-rw-r--r--toolkit/source/layout/vcl/wbutton.cxx9
-rw-r--r--toolkit/source/layout/vcl/wcontainer.cxx134
-rw-r--r--toolkit/source/layout/vcl/wfield.cxx98
-rw-r--r--toolkit/source/layout/vcl/wrapper.cxx73
-rw-r--r--toolkit/source/layout/vcl/wrapper.hxx3
5 files changed, 0 insertions, 317 deletions
diff --git a/toolkit/source/layout/vcl/wbutton.cxx b/toolkit/source/layout/vcl/wbutton.cxx
index f3272dcc1c85..0cb855192f2f 100644
--- a/toolkit/source/layout/vcl/wbutton.cxx
+++ b/toolkit/source/layout/vcl/wbutton.cxx
@@ -143,7 +143,6 @@ void Button::Click()
}
IMPL_GET_IMPL( Button );
-IMPL_GET_WINDOW (Button);
class PushButtonImpl : public ButtonImpl
, public ::cppu::WeakImplHelper1< awt::XItemListener >
@@ -193,13 +192,6 @@ PushButton::~PushButton ()
SetToggleHdl (Link ());
}
-void PushButton::Check( bool bCheck )
-{
- getImpl().setProperty( "State", uno::Any( (sal_Int16) !!bCheck ) );
- // XButton doesn't have explicit toggle event
- getImpl().fireToggle();
-}
-
void PushButton::SetToggleHdl( const Link& link )
{
if (&getImpl () && getImpl().mxButton.is ())
@@ -207,7 +199,6 @@ void PushButton::SetToggleHdl( const Link& link )
}
IMPL_GET_IMPL( PushButton );
-IMPL_GET_WINDOW (PushButton);
#define BUTTON_IMPL(t, parent, response) \
class t##Impl : public parent##Impl \
diff --git a/toolkit/source/layout/vcl/wcontainer.cxx b/toolkit/source/layout/vcl/wcontainer.cxx
deleted file mode 100644
index 868915b33f47..000000000000
--- a/toolkit/source/layout/vcl/wcontainer.cxx
+++ /dev/null
@@ -1,134 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "wrapper.hxx"
-
-#include <com/sun/star/awt/XLayoutRoot.hpp>
-#include <com/sun/star/awt/XLayoutContainer.hpp>
-#include <comphelper/processfactory.hxx>
-#include <layout/core/helper.hxx>
-#include <tools/debug.hxx>
-
-using namespace ::com::sun::star;
-
-namespace layout
-{
-
-Container::Container( Context const* context, char const* pId )
- : mxContainer( context->GetPeerHandle( pId ), uno::UNO_QUERY )
-{
- if ( !mxContainer.is() )
- {
- OSL_TRACE( "Error: failed to associate container with '%s'", pId );
- }
-}
-
-Container::Container( rtl::OUString const& rName, sal_Int32 nBorder )
-{
- mxContainer = layoutimpl::WidgetFactory::createContainer( rName );
-
- uno::Reference< beans::XPropertySet > xProps( mxContainer, uno::UNO_QUERY_THROW );
- xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Border" ) ),
- uno::Any( nBorder ) );
-}
-
-void Container::ShowAll( bool bShow )
-{
- struct inner
- {
- static void setChildrenVisible( uno::Reference < awt::XLayoutContainer > xCont,
- bool bVisible ) /* auxiliary */
- {
- if ( xCont.is() )
- {
- uno::Sequence< uno::Reference < awt::XLayoutConstrains > > aChildren;
- aChildren = xCont->getChildren();
- for (int i = 0; i < aChildren.getLength(); i++)
- {
- uno::Reference < awt::XLayoutConstrains > xChild( aChildren[ i ] );
-
- uno::Reference< awt::XWindow > xWin( xChild, uno::UNO_QUERY);
- if ( xWin.is() )
- xWin->setVisible( bVisible );
-
- uno::Reference < awt::XLayoutContainer > xChildCont(
- xChild, uno::UNO_QUERY );
- setChildrenVisible( xChildCont, bVisible );
- }
- }
- }
- };
-
- inner::setChildrenVisible( mxContainer, bShow );
-}
-
-void Table::setProps( uno::Reference< awt::XLayoutConstrains > xChild,
- bool bXExpand, bool bYExpand, sal_Int32 nXSpan, sal_Int32 nYSpan )
-{
- uno::Reference< beans::XPropertySet > xProps
- ( mxContainer->getChildProperties( xChild ), uno::UNO_QUERY_THROW );
- xProps->setPropertyValue( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "XExpand" ) ),
- uno::Any( bXExpand ) );
- xProps->setPropertyValue( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "YExpand" ) ),
- uno::Any( bYExpand ) );
- xProps->setPropertyValue( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "ColSpan" ) ),
- uno::Any( nXSpan ) );
- xProps->setPropertyValue( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "RowSpan" ) ),
- uno::Any( nYSpan ) );
-}
-
-Box::Box( rtl::OUString const& rName, sal_Int32 nBorder, bool bHomogeneous )
- : Container( rName, nBorder )
-{
- uno::Reference< beans::XPropertySet > xProps( mxContainer, uno::UNO_QUERY_THROW );
- xProps->setPropertyValue( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "Homogeneous" ) ),
- uno::Any( bHomogeneous ) );
-}
-
-void Box::setProps( uno::Reference< awt::XLayoutConstrains > xChild,
- bool bExpand, bool bFill, sal_Int32 nPadding )
-{
- uno::Reference< beans::XPropertySet > xProps
- ( mxContainer->getChildProperties( xChild ), uno::UNO_QUERY_THROW );
-
- xProps->setPropertyValue( rtl::OUString ( RTL_CONSTASCII_USTRINGPARAM( "Expand" ) ),
- uno::Any( bExpand ) );
- xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Fill" ) ),
- uno::Any( bFill ) );
- xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Padding" ) ),
- uno::Any( nPadding ) );
-}
-
-Box::Box( Context const* context, char const* pId )
- : Container( context, pId )
-{
-}
-
-} // namespace layout
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/layout/vcl/wfield.cxx b/toolkit/source/layout/vcl/wfield.cxx
index 04b0757ca999..78b4484c2298 100644
--- a/toolkit/source/layout/vcl/wfield.cxx
+++ b/toolkit/source/layout/vcl/wfield.cxx
@@ -109,80 +109,6 @@ void Edit::SetModifyHdl( const Link& link )
}
IMPL_GET_IMPL( Edit );
-IMPL_GET_WINDOW (Edit);
-
-class FormatterBaseImpl
-{
- protected:
- PeerHandle mpeer;
- public:
- explicit FormatterBaseImpl( const PeerHandle &peer )
- : mpeer( peer )
- {
- };
-};
-
-FormatterBase::FormatterBase( FormatterBaseImpl *pFormatImpl )
- : mpFormatImpl( pFormatImpl )
-{
-}
-
-class NumericFormatterImpl : public FormatterBaseImpl
-{
- public:
- uno::Reference< awt::XNumericField > mxField;
- explicit NumericFormatterImpl( const PeerHandle &peer )
- : FormatterBaseImpl( peer )
- , mxField( peer, uno::UNO_QUERY )
- {
- }
-
- // FIXME: burn that CPU ! cut/paste from vclxwindows.cxx
- double valueToDouble( sal_Int64 nValue )
- {
- sal_Int16 nDigits = mxField->getDecimalDigits();
- double n = (double)nValue;
- for ( sal_uInt16 d = 0; d < nDigits; d++ )
- n /= 10;
- return n;
- } // FIXME: burn that CPU ! cut/paste from vclxwindows.cxx
- sal_Int64 doubleToValue( double nValue )
- {
- sal_Int16 nDigits = mxField->getDecimalDigits();
- double n = nValue;
- for ( sal_uInt16 d = 0; d < nDigits; d++ )
- n *= 10;
- return (sal_Int64) n;
- }
-};
-
-class MetricFormatterImpl : public FormatterBaseImpl
-{
- public:
- uno::Reference< awt::XMetricField > mxField;
- explicit MetricFormatterImpl( const PeerHandle &peer )
- : FormatterBaseImpl( peer )
- , mxField( peer, uno::UNO_QUERY )
- {
- }
-};
-
-NumericFormatter::NumericFormatter( FormatterBaseImpl *pImpl )
- : FormatterBase( pImpl )
-{
-}
-
-NumericFormatterImpl& NumericFormatter::getFormatImpl() const
-{
- return *( static_cast<NumericFormatterImpl *>( mpFormatImpl ) );
-}
-
-MetricFormatter::MetricFormatter( FormatterBaseImpl *pImpl )
- : FormatterBase( pImpl )
-{
-}
-MetricFormatterImpl& MetricFormatter::getFormatImpl() const
-{ return *( static_cast<MetricFormatterImpl *>( mpFormatImpl ) ); }
class ListBoxImpl : public ControlImpl
, public ::cppu::WeakImplHelper1< awt::XActionListener >
@@ -351,30 +277,6 @@ ListBox::~ListBox ()
{
}
-sal_uInt16 ListBox::GetEntryPos( String const& rStr ) const
-{
- return getImpl().GetEntryPos( rStr );
-}
-
-String ListBox::GetEntry( sal_uInt16 nPos ) const
-{
- return getImpl().GetEntry( nPos );
-}
-
-void ListBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect )
-{
-#if LAYOUT_API_CALLS_HANDLER
- getImpl().SelectEntryPos( nPos, bSelect );
-#else /* !LAYOUT_API_CALLS_HANDLER */
- GetListBox ()->SelectEntryPos (nPos, bSelect);
-#endif /* !LAYOUT_API_CALLS_HANDLER */
-}
-
-sal_uInt16 ListBox::GetSelectEntryPos( sal_uInt16 nSelIndex ) const
-{
- return getImpl().GetSelectEntryPos( nSelIndex );
-}
-
void ListBox::SetNoSelection ()
{
GetListBox ()->SetNoSelection ();
diff --git a/toolkit/source/layout/vcl/wrapper.cxx b/toolkit/source/layout/vcl/wrapper.cxx
index b175ea2be0b9..8e437bc874ad 100644
--- a/toolkit/source/layout/vcl/wrapper.cxx
+++ b/toolkit/source/layout/vcl/wrapper.cxx
@@ -191,14 +191,6 @@ void SAL_CALL WindowImpl::disposing (lang::EventObject const&)
mxWindow.clear ();
}
-uno::Any WindowImpl::getProperty (char const* name)
-{
- if ( !this || !mxVclPeer.is() )
- return css::uno::Any();
- return mxVclPeer->getProperty
- ( rtl::OUString( name, strlen( name ), RTL_TEXTENCODING_ASCII_US ) );
-}
-
void WindowImpl::setProperty (char const *name, uno::Any any)
{
if ( !this || !mxVclPeer.is() )
@@ -321,11 +313,6 @@ void Window::ParentSet (Window *window)
window->SetParent (GetWindow ());
}
-Context *Window::getContext()
-{
- return this && mpImpl ? mpImpl->mpCtx : NULL;
-}
-
PeerHandle Window::GetPeer() const
{
if ( !mpImpl )
@@ -447,16 +434,6 @@ uno::Reference< awt::XToolkit > getToolkit()
return xToolkit;
}
-PeerHandle Window::CreatePeer( Window *parent, WinBits nStyle, const char *pName)
-{
- long nWinAttrbs = 0;
- for (int i = 0; i < toolkitVclPropsMapLen; i++)
- if ( nStyle & toolkitVclPropsMap[ i ].vclStyle )
- nWinAttrbs |= toolkitVclPropsMap[ i ].initAttr;
-
- return layoutimpl::WidgetFactory::createWidget (getToolkit(), parent->GetPeer(), OUString::createFromAscii( pName ), nWinAttrbs);
-}
-
void Window::Show( bool bVisible )
{
if ( !getImpl().mxWindow.is() )
@@ -496,11 +473,6 @@ void ControlImpl::SetGetFocusHdl (Link const& link)
mGetFocusHdl = link;
}
-Link& ControlImpl::GetGetFocusHdl ()
-{
- return mGetFocusHdl;
-}
-
void ControlImpl::SetLoseFocusHdl (Link const& link)
{
if (!mGetFocusHdl || !link)
@@ -508,11 +480,6 @@ void ControlImpl::SetLoseFocusHdl (Link const& link)
mLoseFocusHdl = link;
}
-Link& ControlImpl::GetLoseFocusHdl ()
-{
- return mGetFocusHdl;
-}
-
void ControlImpl::UpdateListening (Link const& link)
{
if (!link && (!!mGetFocusHdl || !!mLoseFocusHdl)
@@ -577,7 +544,6 @@ Dialog::~Dialog ()
{
}
-IMPL_GET_WINDOW (Dialog);
IMPL_GET_IMPL (Dialog);
#define MX_DIALOG if (getImpl ().mxDialog.is ()) getImpl ().mxDialog
@@ -719,40 +685,6 @@ void MessageBox::init (OUString const& message, OUString const& yes, OUString co
helpButton.Hide ();
}
-#undef MESSAGE_BOX_IMPL
-#define MESSAGE_BOX_IMPL(Name)\
- Name##Box::Name##Box (::Window *parent, char const* message,\
- char const* yes, char const* no, const rtl::OString& help_id,\
- char const* xml_file, char const* id)\
- : MessageBox (parent, message, yes, no, help_id, xml_file, id)\
- {\
- image##Name.Show ();\
- }\
- Name##Box::Name##Box (::Window *parent, OUString const& message,\
- OUString yes, OUString no, const rtl::OString& help_id,\
- char const* xml_file, char const* id)\
- : MessageBox (parent, message, yes, no, help_id, xml_file, id)\
- {\
- image##Name.Show ();\
- }\
- Name##Box::Name##Box (::Window *parent, WinBits bits, char const* message,\
- char const* yes, char const* no, const rtl::OString& help_id,\
- char const* xml_file, char const* id)\
- : MessageBox (parent, bits, message, yes, no, help_id, xml_file, id)\
- {\
- image##Name.Show ();\
- }\
- Name##Box::Name##Box (::Window *parent, WinBits bits, OUString const& message,\
- OUString yes, OUString no, const rtl::OString& help_id,\
- char const* xml_file, char const* id)\
- : MessageBox (parent, bits, message, yes, no, help_id, xml_file, id)\
- {\
- image##Name.Show ();\
- }
-
-MESSAGE_BOX_IMPL (Error);
-MESSAGE_BOX_IMPL (Info);
-
class TabControlImpl
: public ControlImpl
, public ::cppu::WeakImplHelper1 <awt::XTabListener>
@@ -836,11 +768,6 @@ TabControl::~TabControl ()
SetDeactivatePageHdl (Link ());
}
-void TabControl::SetCurPageId (sal_uInt16 id)
-{
- getImpl ().redraw ();
- GetTabControl ()->SetCurPageId (id);
-}
void TabControl::SetActivatePageHdl (Link const& link)
{
if (&getImpl () && getImpl().mxTabControl.is ())
diff --git a/toolkit/source/layout/vcl/wrapper.hxx b/toolkit/source/layout/vcl/wrapper.hxx
index 8a88be68001e..3ac89468cfa4 100644
--- a/toolkit/source/layout/vcl/wrapper.hxx
+++ b/toolkit/source/layout/vcl/wrapper.hxx
@@ -58,7 +58,6 @@ public:
virtual ~WindowImpl ();
void wrapperGone();
- css::uno::Any getProperty (char const *name);
void setProperty (char const *name, css::uno::Any any);
void redraw (bool resize=false);
@@ -77,9 +76,7 @@ public:
~ControlImpl ();
virtual void SetGetFocusHdl (Link const& link);
- Link& GetGetFocusHdl ();
virtual void SetLoseFocusHdl (Link const& link);
- Link& GetLoseFocusHdl ();
virtual void UpdateListening (Link const& link);
// XFocusListener