2012-06-12 11:28:01 -05:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2004-09-06 09:11:38 -05:00
|
|
|
|
|
|
|
package com.sun.star.comp.beans;
|
|
|
|
|
|
|
|
import com.sun.star.uno.UnoRuntime;
|
|
|
|
|
2004-10-14 04:37:14 -05:00
|
|
|
/** Wrapper class for a com.sun.star.frame.XController.
|
|
|
|
*
|
|
|
|
* @since OOo 2.0.0
|
|
|
|
*/
|
|
|
|
public class Controller
|
2004-09-06 09:11:38 -05:00
|
|
|
extends Wrapper
|
|
|
|
implements
|
|
|
|
com.sun.star.frame.XController
|
|
|
|
{
|
|
|
|
private com.sun.star.frame.XController xController;
|
|
|
|
private com.sun.star.frame.XDispatchProvider xDispatchProvider;
|
|
|
|
|
|
|
|
Controller( com.sun.star.frame.XController xController )
|
|
|
|
{
|
|
|
|
super( xController );
|
|
|
|
this.xController = xController;
|
2012-08-20 11:05:35 -05:00
|
|
|
xDispatchProvider = UnoRuntime.queryInterface( com.sun.star.frame.XDispatchProvider.class,
|
|
|
|
xController );
|
2004-09-06 09:11:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================
|
|
|
|
// com.sun.star.frame.XController
|
|
|
|
//--------------------------------------------------------------
|
|
|
|
|
|
|
|
public void attachFrame( /*IN*/ com.sun.star.frame.XFrame xFrame )
|
|
|
|
{
|
|
|
|
xController.attachFrame( xFrame );
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean attachModel( /*IN*/ com.sun.star.frame.XModel xModel )
|
|
|
|
{
|
|
|
|
return xController.attachModel( xModel );
|
|
|
|
}
|
|
|
|
|
|
|
|
public boolean suspend( /*IN*/boolean bSuspend )
|
|
|
|
{
|
|
|
|
return xController.suspend( bSuspend );
|
|
|
|
}
|
|
|
|
|
|
|
|
public java.lang.Object getViewData( )
|
|
|
|
{
|
|
|
|
return xController.getViewData();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void restoreViewData( /*IN*/java.lang.Object aData )
|
|
|
|
{
|
|
|
|
xController.restoreViewData( aData );
|
|
|
|
}
|
|
|
|
|
|
|
|
public com.sun.star.frame.XModel getModel( )
|
|
|
|
{
|
|
|
|
return xController.getModel();
|
|
|
|
}
|
|
|
|
|
|
|
|
public com.sun.star.frame.XFrame getFrame( )
|
|
|
|
{
|
|
|
|
return xController.getFrame();
|
|
|
|
}
|
|
|
|
|
|
|
|
//==============================================================
|
|
|
|
// com.sun.star.frame.XDispatchProvider
|
|
|
|
//--------------------------------------------------------------
|
|
|
|
|
|
|
|
public com.sun.star.frame.XDispatch queryDispatch(
|
|
|
|
/*IN*/ com.sun.star.util.URL aURL,
|
|
|
|
/*IN*/ String aTargetFrameName,
|
|
|
|
/*IN*/ int nSearchFlags )
|
|
|
|
{
|
|
|
|
return xDispatchProvider.queryDispatch( aURL, aTargetFrameName, nSearchFlags );
|
|
|
|
}
|
|
|
|
|
|
|
|
public com.sun.star.frame.XDispatch[] queryDispatches(
|
|
|
|
/*IN*/ com.sun.star.frame.DispatchDescriptor[] aRequests )
|
|
|
|
{
|
|
|
|
return xDispatchProvider.queryDispatches( aRequests );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|