office-gobmx/chart2/source/inc/TitleHelper.hxx
Vladimir Glazounov b8b84d6bc2 INTEGRATION: CWS chart2mst3 (1.3.4); FILE MERGED
2006/08/03 13:44:56 bm 1.3.4.9: warning removed: comma in last enum entry
2006/01/24 10:53:56 bm 1.3.4.8: use ReferenceSizeProvider to adapt auto-scale settings for newly created objects
2005/12/21 21:29:15 iha 1.3.4.7: remove identifiers from model objects and create an index based CID protocol instead for selection purposes
2005/12/07 14:00:47 iha 1.3.4.6: remove dependendy from special title identifiers
2005/12/01 18:51:24 iha 1.3.4.5: create axis title with correct rotation default + don't mix x and y in barcharts
2005/10/07 11:46:57 bm 1.3.4.4: RESYNC: (1.3-1.4); FILE MERGED
2005/07/13 11:43:06 iha 1.3.4.3: added method getTitleType()
2004/05/26 16:26:56 bm 1.3.4.2: default font sizes adapted
2004/04/27 13:33:49 bm 1.3.4.1: +createTitle method for creating a title, if you only have an XDiagram
(creation of main-title not possible there)
2007-05-22 17:23:19 +00:00

118 lines
4.4 KiB
C++

/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: TitleHelper.hxx,v $
*
* $Revision: 1.5 $
*
* last change: $Author: vg $ $Date: 2007-05-22 18:23:19 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library 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 for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef _CHART2_TOOLS_TITLEHELPER_HXX
#define _CHART2_TOOLS_TITLEHELPER_HXX
#include "ReferenceSizeProvider.hxx"
#ifndef _COM_SUN_STAR_CHART2_XTITLED_HPP_
#include <com/sun/star/chart2/XTitled.hpp>
#endif
#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_
#include <com/sun/star/frame/XModel.hpp>
#endif
#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
#include <com/sun/star/uno/XComponentContext.hpp>
#endif
#ifndef _COM_SUN_STAR_CHART2_XDIAGRAM_HPP_
#include <com/sun/star/chart2/XDiagram.hpp>
#endif
//.............................................................................
namespace chart
{
//.............................................................................
class TitleHelper
{
public:
enum eTitleType
{
TITLE_BEGIN = 0,
MAIN_TITLE = 0,
SUB_TITLE,
X_AXIS_TITLE,
Y_AXIS_TITLE,
Z_AXIS_TITLE,
// SECOND_X_AXIS_TITLE,
// SECOND_Y_AXIS_TITLE,
NORMAL_TITLE_END,
//it is intended that this both types are after NORMAL_TITLE_END
TITLE_AT_STANDARD_X_AXIS_POSITION, //equals the Y_AXIS_TITLE for barchart
TITLE_AT_STANDARD_Y_AXIS_POSITION //equals the X_AXIS_TITLE for barchart
};
static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XTitle >
getTitle( eTitleType nTitleIndex
, const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XModel >& xModel );
static ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XTitle >
createTitle( eTitleType nTitleIndex
, const rtl::OUString& rTitleText
, const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XModel >& xModel
, const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext > & xContext
, ReferenceSizeProvider * pRefSizeProvider = 0 );
static void removeTitle( eTitleType nTitleIndex
, const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XModel >& xModel );
static rtl::OUString getCompleteString( const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XTitle >& xTitle );
static void setCompleteString( const rtl::OUString& rNewText
, const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XTitle >& xTitle
, const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XComponentContext > & xContext
, float * pDefaultCharHeight = 0 );
static bool getTitleType( eTitleType& rType
, const ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XTitle >& xTitle
, const ::com::sun::star::uno::Reference<
::com::sun::star::frame::XModel >& xModel );
};
//.............................................................................
} //namespace chart
//.............................................................................
#endif