summaryrefslogtreecommitdiff
path: root/toolkit/source/layout/core
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas.kanapickas@gmail.com>2010-10-18 16:52:05 +0100
committerMichael Meeks <michael.meeks@novell.com>2010-10-18 16:52:27 +0100
commit849a713ffd29a58ae79e48f80835c28bbd9d5a72 (patch)
tree7d2c662f43a00f3bc04a0d51c685544074538a5c /toolkit/source/layout/core
parentf7cbde525450a1a9427873c264791c65056c4f2a (diff)
remove non-compiled code
Diffstat (limited to 'toolkit/source/layout/core')
-rw-r--r--toolkit/source/layout/core/container.cxx41
-rw-r--r--toolkit/source/layout/core/helper.cxx69
-rw-r--r--toolkit/source/layout/core/import.hxx48
-rw-r--r--toolkit/source/layout/core/proplist.cxx25
-rw-r--r--toolkit/source/layout/core/root.cxx18
5 files changed, 0 insertions, 201 deletions
diff --git a/toolkit/source/layout/core/container.cxx b/toolkit/source/layout/core/container.cxx
index 7c7556a79929..f5822bc4569a 100644
--- a/toolkit/source/layout/core/container.cxx
+++ b/toolkit/source/layout/core/container.cxx
@@ -104,10 +104,6 @@ Container::setChildParent( const uno::Reference< awt::XLayoutConstrains >& xChil
if ( xContChild.is() )
{
xContChild->setParent( uno::Reference< awt::XLayoutContainer >( this ) );
-#if 0
- assert( !mxLayoutUnit.is() );
- xContChild->setLayoutUnit( mxLayoutUnit );
-#endif
}
}
@@ -118,46 +114,9 @@ Container::unsetChildParent( const uno::Reference< awt::XLayoutConstrains >& xCh
if ( xContChild.is() )
{
xContChild->setParent( uno::Reference< awt::XLayoutContainer >() );
-#if 0
- xContChild->setLayoutUnit( uno::Reference< awt::XLayoutUnit >() );
-#endif
}
}
-#if 0
-std::string
-Container::getLabel() // debug label
-{
- std::string depth;
- uno::Reference< awt::XLayoutContainer > xContainer( this );
- while ( xContainer.is() )
- {
- int node = 0; // child nb
- uno::Reference< awt::XLayoutContainer > xParent = xContainer->getContainerParent();
- if ( xParent.is() )
- {
-
- uno::Sequence< uno::Reference< awt::XLayoutConstrains > > aChildren;
- aChildren = xParent->getChildren();
- for ( node = 0; node < aChildren.getLength(); node++ )
- if ( aChildren[ node ] == xContainer )
- break;
- }
-
- char str[ 8 ];
- snprintf( str, 8, "%d", node );
- if ( depth.empty() )
- depth = std::string( str );
- else
- depth = std::string( str ) + ":" + depth;
-
- xContainer = xParent;
- }
-
- return std::string( getName() ) + " (" + depth + ")";
-}
-#endif
-
void Container::propertiesChanged()
{
// cl: why this assertion? This is also called to set properties at the top level widget which has no parent!?
diff --git a/toolkit/source/layout/core/helper.cxx b/toolkit/source/layout/core/helper.cxx
index 70e1f82dce51..1434054d8cf9 100644
--- a/toolkit/source/layout/core/helper.cxx
+++ b/toolkit/source/layout/core/helper.cxx
@@ -70,26 +70,6 @@ getParent( uno::Reference< uno::XInterface > xRef )
return uno::Reference< awt::XWindowPeer >();
}
-#if 0
-static uno::Reference< awt::XWindowPeer >
-getToplevel( uno::Reference< uno::XInterface > xRef )
-{
- uno::Reference< awt::XWindowPeer > xTop, i;
- while ( ( i = uno::Reference< awt::XWindowPeer >( xRef, uno::UNO_QUERY ) ).is() )
- {
- xTop = i;
-
- uno::Reference< awt::XLayoutContainer > xCont( xRef, uno::UNO_QUERY );
- if ( xCont.is() )
- xRef = xCont->getParent();
- else
- xRef = uno::Reference< awt::XWindowPeer >();
- }
-
- return xTop;
-}
-#endif
-
}
#include "bin.hxx"
@@ -142,13 +122,7 @@ uno::Reference <awt::XLayoutConstrains> WidgetFactory::toolkitCreateWidget (uno:
{
desc.Type = awt::WindowClass_SIMPLE;
-#if 0
- // top container -- a wrapper for framewindow -- is de-coupled
- // from awt::XWindowPeer. So, getParent() fails at it.
- uno::Reference< awt::XWindowPeer > xWinParent = getParent( xParent );
-#else
uno::Reference< awt::XWindowPeer > xWinParent( xParent, uno::UNO_QUERY );
-#endif
assert( xParent.is() );
assert( xWinParent.is() );
/*
@@ -197,18 +171,6 @@ uno::Reference <awt::XLayoutConstrains> WidgetFactory::toolkitCreateWidget (uno:
return uno::Reference< awt::XLayoutConstrains >();
}
-#if 0 // This shadows the show="false" property and seems otherwise
- // unnecessary
-
- // default to visible, let then people change it on properties
- if ( ! bToplevel )
- {
- uno::Reference< awt::XWindow> xWindow( xPeer, uno::UNO_QUERY );
- if ( xWindow.is() )
- xWindow->setVisible( true );
- }
-#endif
-
return xPeer;
}
@@ -325,25 +287,6 @@ PropHelper::getFastPropertyValue( uno::Any& rValue,
{
OSL_ASSERT( nHandle >= 0 && nHandle < (sal_Int32) maDetails.size() );
const PropDetails &rInfo = maDetails[ nHandle ];
-#if 0
- switch ( rInfo.aType.getTypeClass() )
- {
-#define MAP(classtype,ctype) \
- case uno::TypeClass_##classtype: \
- rValue <<= *(ctype *)(rInfo.pValue); \
- break
- MAP( DOUBLE, double );
- MAP( SHORT, sal_Int16 );
- MAP( LONG, sal_Int32 );
- MAP( UNSIGNED_SHORT, sal_uInt16 );
- MAP( UNSIGNED_LONG, sal_uInt32 );
- MAP( STRING, ::rtl::OUString );
- default:
- DBG_ERROR( "ERROR: unknown type to map!" );
- break;
- }
-#undef MAP
-#endif
rValue.setValue( rInfo.pValue, rInfo.aType );
}
@@ -598,14 +541,9 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren
}
else if ( name.equalsAscii( "tabpage" ) )
{
-#if 0
- if ( !parent )
- parent = layout::TabPage::global_parent;
-#else
if (layout::TabPage::global_parent)
parent = layout::TabPage::global_parent;
layout::TabPage::global_parent = 0;
-#endif
//window = new TabPage( parent, ImplGetWinBits( attributes, 0 ) );
attributes ^= awt::WindowAttribute::SHOW;
WinBits nStyle = ImplGetWinBits( attributes, 0 );
@@ -629,13 +567,6 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren
window = new Window( parent, ImplGetWinBits( attributes, 0 ) );
*component = new layoutimpl::LocalizedString();
}
-#if 0 // parent paranoia
- else if ( name.equalsAscii( "listbox" ) )
- {
- window = new ListBox (parent, ImplGetWinBits (attributes, 0));
- *component = new VCLXListBox ();
- }
-#endif
else if (name.equalsAscii ("svxfontlistbox")
|| name.equalsAscii ("svxlanguagebox"))
{
diff --git a/toolkit/source/layout/core/import.hxx b/toolkit/source/layout/core/import.hxx
index 0b49c559dd92..2eea1b0975ee 100644
--- a/toolkit/source/layout/core/import.hxx
+++ b/toolkit/source/layout/core/import.hxx
@@ -89,54 +89,6 @@ private:
RadioGroupsMap mxRadioGroups;
};
-#if 0
-// generator
-class Widget
-{
-public:
- Widget( css::uno::Reference< css::awt::XToolkit > xToolkit,
- css::uno::Reference< css::awt::XWindow > xToplevel,
- rtl::OUString unoName, long attrbs );
- virtual ~Widget();
-
- virtual void setProperties( const PropList &rProps );
-
- virtual bool addChild( Widget *pChild );
- virtual void setChildProperties( Widget *pChild, const PropList &rProps );
-
- inline css::uno::Reference< css::awt::XLayoutConstrains > getPeer()
- { return mxWidget; }
-
- inline css::uno::Reference< css::awt::XLayoutConstrains > getContainer()
- { return mxContainer; }
-
-protected:
- css::uno::Reference< css::awt::XLayoutConstrains > mxWidget;
- css::uno::Reference< css::awt::XLayoutContainer > mxContainer;
-};
-
-class Root
-{
-public:
- Root( css::uno::Reference< css::awt::XToolkit > xToolkit )
- : mxToolkit( xToolkit ) {}
- ~Root();
-
- virtual Widget *create( rtl::OUString id, const rtl::OUString unoName, long attrbs );
-
- css::uno::Reference< css::awt::XLayoutConstrains > getById( rtl::OUString id );
- inline css::uno::Reference< css::awt::XLayoutConstrains > getToplevel();
-
-protected:
- css::uno::Reference< css::awt::XToolkit > mxToolkit;
- Widget *mpToplevel;
-
- typedef std::hash_map< rtl::OUString, css::uno::Reference< css::awt::XLayoutConstrains >,
- rtl::OUStringHash > ItemHash;
- ItemHash maItems;
-};
-#endif
-
// parser
class ImportContext : public ::cppu::WeakImplHelper1< css::xml::input::XRoot >
{
diff --git a/toolkit/source/layout/core/proplist.cxx b/toolkit/source/layout/core/proplist.cxx
index d1b6a9b9f4ea..24c9bc471833 100644
--- a/toolkit/source/layout/core/proplist.cxx
+++ b/toolkit/source/layout/core/proplist.cxx
@@ -349,31 +349,6 @@ static const AttributesMap attribsMap[] =
};
static const int attribsMapLen = sizeof( attribsMap ) / sizeof( AttributesMap );
-#if 0
-long getAttribute( const OUString &rName, bool bTopWindow )
-{
-
- int min = 0, max = attribsMapLen - 1, mid, cmp;
- do
- {
- mid = min +( max - min )/2;
- cmp = rName.compareToAscii( attribsMap[ mid ].name );
- if ( cmp > 0 )
- min = mid+1;
- else if ( cmp < 0 )
- max = mid-1;
- else
- {
- if ( bTopWindow || attribsMap[ mid ].value )
- return attribsMap[ mid ].windowAttr;
- return 0;
- }
- }
- while ( min <= max );
- return 0;
-}
-#endif
-
void propsFromAttributes( const uno::Reference<xml::input::XAttributes> & xAttributes,
PropList &rProps, sal_Int32 nNamespace )
{
diff --git a/toolkit/source/layout/core/root.cxx b/toolkit/source/layout/core/root.cxx
index b360595aebec..f5b96d94d5ae 100644
--- a/toolkit/source/layout/core/root.cxx
+++ b/toolkit/source/layout/core/root.cxx
@@ -330,24 +330,6 @@ LayoutWidget *LayoutRoot::create( OUString id, const OUString unoName, long attr
return pWidget;
}
-#if 0
-uno::Reference< awt::XLayoutConstrains > LayoutRoot::getToplevel()
-{
- if ( mpToplevel )
- return mpToplevel->getPeer();
- return uno::Reference< awt::XLayoutConstrains > ();
-}
-
-uno::Reference< awt::XLayoutConstrains > LayoutRoot::getById( OUString id )
-{
- uno::Reference< awt::XLayoutConstrains > rRef = 0;
- ItemHash::iterator it = maItems.find( id );
- if ( it != maItems.end() )
- rRef = it->second;
- return rRef;
-}
-#endif
-
LayoutWidget::LayoutWidget( uno::Reference< awt::XToolkit > xToolkit,
uno::Reference< awt::XLayoutContainer > xParent,
OUString unoName, long attrbs )