2004-11-26 13:26:30 -06:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 16:39:39 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2004-11-26 13:26:30 -06:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2004-11-26 13:26:30 -06:00
|
|
|
*
|
2008-04-10 16:39:39 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2004-11-26 13:26:30 -06:00
|
|
|
*
|
2008-04-10 16:39:39 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2004-11-26 13:26:30 -06:00
|
|
|
*
|
2008-04-10 16:39:39 -05:00
|
|
|
* 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.
|
2004-11-26 13:26:30 -06:00
|
|
|
*
|
2008-04-10 16:39:39 -05:00
|
|
|
* 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).
|
2004-11-26 13:26:30 -06:00
|
|
|
*
|
2008-04-10 16:39:39 -05:00
|
|
|
* 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.
|
2004-11-26 13:26:30 -06:00
|
|
|
*
|
|
|
|
************************************************************************/
|
2006-09-16 13:20:57 -05:00
|
|
|
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sd.hxx"
|
2004-11-26 13:26:30 -06:00
|
|
|
#include "SlideTransitionPanel.hxx"
|
|
|
|
|
2005-03-18 10:02:31 -06:00
|
|
|
#include "taskpane/TaskPaneControlFactory.hxx"
|
|
|
|
|
2004-11-26 13:26:30 -06:00
|
|
|
#include "strings.hrc"
|
|
|
|
#include "sdresid.hxx"
|
|
|
|
#include <com/sun/star/frame/XModel.hpp>
|
|
|
|
|
|
|
|
namespace sd
|
|
|
|
{
|
|
|
|
|
|
|
|
class ViewShellBase;
|
|
|
|
extern ::Window * createSlideTransitionPanel( ::Window* pParent, ViewShellBase& rBase );
|
|
|
|
|
|
|
|
namespace toolpanel { namespace controls {
|
|
|
|
|
|
|
|
|
2005-03-18 10:02:31 -06:00
|
|
|
|
2004-11-26 13:26:30 -06:00
|
|
|
SlideTransitionPanel::SlideTransitionPanel(TreeNode* pParent, ViewShellBase& rBase)
|
|
|
|
: SubToolPanel (pParent),
|
|
|
|
maPreferredSize( 100, 200 )
|
|
|
|
{
|
|
|
|
mpWrappedControl = createSlideTransitionPanel( pParent->GetWindow(), rBase );
|
|
|
|
mpWrappedControl->Show();
|
|
|
|
}
|
|
|
|
|
|
|
|
SlideTransitionPanel::~SlideTransitionPanel()
|
|
|
|
{
|
|
|
|
delete mpWrappedControl;
|
|
|
|
}
|
|
|
|
|
2005-03-18 10:02:31 -06:00
|
|
|
std::auto_ptr<ControlFactory> SlideTransitionPanel::CreateControlFactory (ViewShellBase& rBase)
|
|
|
|
{
|
|
|
|
return std::auto_ptr<ControlFactory>(
|
|
|
|
new ControlFactoryWithArgs1<SlideTransitionPanel,ViewShellBase>(rBase));
|
|
|
|
}
|
|
|
|
|
2004-11-26 13:26:30 -06:00
|
|
|
Size SlideTransitionPanel::GetPreferredSize()
|
|
|
|
{
|
|
|
|
return maPreferredSize;
|
|
|
|
}
|
2006-12-12 11:52:01 -06:00
|
|
|
sal_Int32 SlideTransitionPanel::GetPreferredWidth(sal_Int32 )
|
2004-11-26 13:26:30 -06:00
|
|
|
{
|
|
|
|
return maPreferredSize.Width();
|
|
|
|
}
|
2006-12-12 11:52:01 -06:00
|
|
|
sal_Int32 SlideTransitionPanel::GetPreferredHeight(sal_Int32 )
|
2004-11-26 13:26:30 -06:00
|
|
|
{
|
|
|
|
return maPreferredSize.Height();
|
|
|
|
}
|
|
|
|
::Window* SlideTransitionPanel::GetWindow()
|
|
|
|
{
|
|
|
|
return mpWrappedControl;
|
|
|
|
}
|
|
|
|
bool SlideTransitionPanel::IsResizable()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
bool SlideTransitionPanel::IsExpandable() const
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2005-07-14 04:27:06 -05:00
|
|
|
|
|
|
|
|
|
|
|
::com::sun::star::uno::Reference<
|
|
|
|
::com::sun::star::accessibility::XAccessible> SlideTransitionPanel::CreateAccessibleObject (
|
|
|
|
const ::com::sun::star::uno::Reference<
|
2006-12-12 11:52:01 -06:00
|
|
|
::com::sun::star::accessibility::XAccessible>& )
|
2005-07-14 04:27:06 -05:00
|
|
|
{
|
|
|
|
if (GetWindow() != NULL)
|
|
|
|
return GetWindow()->GetAccessible();
|
|
|
|
else
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2004-11-26 13:26:30 -06:00
|
|
|
} } } // end of namespace ::sd::toolpanel::controls
|