2007/05/14 20:02:31 bm 1.2.8.8: RESYNC: (1.4-1.5); FILE MERGED 2006/10/18 17:03:23 bm 1.2.8.7: RESYNC: (1.3-1.4); FILE MERGED 2006/04/10 15:03:32 iha 1.2.8.6: api restructure axis, grids, scales and increments 2006/02/20 14:45:44 iha 1.2.8.5: move SchItemPool from controller to view lib -> ChartItemPool 2005/10/07 11:13:26 bm 1.2.8.4: RESYNC: (1.2-1.3); FILE MERGED 2005/09/29 12:33:39 iha 1.2.8.3: #125781# missing helpIds for Insert:Ggrid and Insert:Axis 2004/05/17 17:33:49 iha 1.2.8.2: provide object naming; resource cleanup 2004/04/22 15:00:40 iha 1.2.8.1: #i20344# chabged legend, grid and title resources
175 lines
5.8 KiB
C++
175 lines
5.8 KiB
C++
/*************************************************************************
|
|
*
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
|
*
|
|
* $RCSfile: dlg_InsertAxis_Grid.cxx,v $
|
|
*
|
|
* $Revision: 1.6 $
|
|
*
|
|
* last change: $Author: vg $ $Date: 2007-05-22 17:33:56 $
|
|
*
|
|
* 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
|
|
*
|
|
************************************************************************/
|
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
#include "precompiled_chart2.hxx"
|
|
#include "dlg_InsertAxis_Grid.hxx"
|
|
#include "dlg_InsertAxis_Grid.hrc"
|
|
|
|
#include "ResId.hxx"
|
|
#include "chartview/ChartSfxItemIds.hxx"
|
|
#include "SchSlotIds.hxx"
|
|
#include "HelpIds.hrc"
|
|
#include "NoWarningThisInCTOR.hxx"
|
|
#include "ObjectNameProvider.hxx"
|
|
|
|
// header for class SfxBoolItem
|
|
#ifndef _SFXENUMITEM_HXX
|
|
#include <svtools/eitem.hxx>
|
|
#endif
|
|
|
|
//.............................................................................
|
|
namespace chart
|
|
{
|
|
//.............................................................................
|
|
|
|
InsertAxisOrGridDialogData::InsertAxisOrGridDialogData()
|
|
: aPossibilityList(6)
|
|
, aExistenceList(6)
|
|
{
|
|
sal_Int32 nN = 0;
|
|
for(nN=6;nN--;)
|
|
aPossibilityList[nN]=true;
|
|
for(nN=6;nN--;)
|
|
aExistenceList[nN]=false;
|
|
}
|
|
|
|
//==============================
|
|
//
|
|
// SchAxisDlg
|
|
//
|
|
//==============================
|
|
|
|
SchAxisDlg::SchAxisDlg( Window* pWindow
|
|
, const InsertAxisOrGridDialogData& rInput, BOOL bAxisDlg )
|
|
:
|
|
ModalDialog( pWindow, SchResId( DLG_AXIS_OR_GRID )),
|
|
|
|
aFlPrimary( this, SchResId( FL_PRIMARY_AXIS )),
|
|
aFlPrimaryGrid( this, SchResId( FL_PRIMARY_GRID )),
|
|
aCbPrimaryX( this, SchResId( CB_X_PRIMARY )),
|
|
aCbPrimaryY( this, SchResId( CB_Y_PRIMARY )),
|
|
aCbPrimaryZ( this, SchResId( CB_Z_PRIMARY )),
|
|
|
|
aFlSecondary( this, SchResId( FL_SECONDARY_AXIS )),
|
|
aFlSecondaryGrid( this, SchResId( FL_SECONDARY_GRID )),
|
|
aCbSecondaryX( this, SchResId( CB_X_SECONDARY )),
|
|
aCbSecondaryY( this, SchResId( CB_Y_SECONDARY )),
|
|
aCbSecondaryZ( this, SchResId( CB_Z_SECONDARY )),
|
|
|
|
aPbOK( this, SchResId( BTN_OK )),
|
|
aPbCancel( this, SchResId( BTN_CANCEL )),
|
|
aPbHelp( this, SchResId( BTN_HELP ))
|
|
|
|
//rOutAttrs( rInAttrs )
|
|
{
|
|
FreeResource();
|
|
if(!bAxisDlg)
|
|
{
|
|
SetHelpId( SID_INSERT_GRIDS );
|
|
SetText( ObjectNameProvider::getName(OBJECTTYPE_GRID,true) );
|
|
|
|
aCbPrimaryX.SetHelpId( HID_SCH_CB_XGRID );
|
|
aCbPrimaryY.SetHelpId( HID_SCH_CB_YGRID );
|
|
aCbPrimaryZ.SetHelpId( HID_SCH_CB_ZGRID );
|
|
aCbSecondaryX.SetHelpId( HID_SCH_CB_SECONDARY_XGRID );
|
|
aCbSecondaryY.SetHelpId( HID_SCH_CB_SECONDARY_YGRID );
|
|
aCbSecondaryZ.SetHelpId( HID_SCH_CB_SECONDARY_ZGRID );
|
|
|
|
aFlPrimary.Hide();
|
|
aFlSecondary.Hide();
|
|
aFlPrimaryGrid.Show();
|
|
aFlSecondaryGrid.Show();
|
|
}
|
|
else
|
|
{
|
|
SetText( ObjectNameProvider::getName(OBJECTTYPE_AXIS,true) );
|
|
|
|
//todo: remove if secondary z axis are possible somewhere
|
|
{
|
|
aCbSecondaryZ.Hide();
|
|
|
|
Size aSize( GetSizePixel() );
|
|
//aSize.Height() -= aCbSecondaryZ.GetSizePixel().Height();
|
|
aSize.Height() -= ( aCbSecondaryZ.GetPosPixel().Y() - aCbSecondaryY.GetPosPixel().Y() );
|
|
SetSizePixel(aSize);
|
|
}
|
|
}
|
|
|
|
aCbPrimaryX.Check( rInput.aExistenceList[0] );
|
|
aCbPrimaryY.Check( rInput.aExistenceList[1] );
|
|
aCbPrimaryZ.Check( rInput.aExistenceList[2] );
|
|
aCbSecondaryX.Check( rInput.aExistenceList[3] );
|
|
aCbSecondaryY.Check( rInput.aExistenceList[4] );
|
|
aCbSecondaryZ.Check( rInput.aExistenceList[5] );
|
|
|
|
aCbPrimaryX.Enable( rInput.aPossibilityList[0] );
|
|
aCbPrimaryY.Enable( rInput.aPossibilityList[1] );
|
|
aCbPrimaryZ.Enable( rInput.aPossibilityList[2] );
|
|
aCbSecondaryX.Enable( rInput.aPossibilityList[3] );
|
|
aCbSecondaryY.Enable( rInput.aPossibilityList[4] );
|
|
aCbSecondaryZ.Enable( rInput.aPossibilityList[5] );
|
|
}
|
|
|
|
SchAxisDlg::~SchAxisDlg()
|
|
{
|
|
}
|
|
|
|
void SchAxisDlg::getResult( InsertAxisOrGridDialogData& rOutput )
|
|
{
|
|
rOutput.aExistenceList[0]=aCbPrimaryX.IsChecked();
|
|
rOutput.aExistenceList[1]=aCbPrimaryY.IsChecked();
|
|
rOutput.aExistenceList[2]=aCbPrimaryZ.IsChecked();
|
|
rOutput.aExistenceList[3]=aCbSecondaryX.IsChecked();
|
|
rOutput.aExistenceList[4]=aCbSecondaryY.IsChecked();
|
|
rOutput.aExistenceList[5]=aCbSecondaryZ.IsChecked();
|
|
}
|
|
|
|
SchGridDlg::SchGridDlg( Window* pParent, const InsertAxisOrGridDialogData& rInput )
|
|
: SchAxisDlg( pParent, rInput, false )//rInAttrs, b3D, bNet, bSecondaryX, bSecondaryY, false )
|
|
{
|
|
}
|
|
|
|
SchGridDlg::~SchGridDlg()
|
|
{
|
|
}
|
|
|
|
//.............................................................................
|
|
} //namespace chart
|
|
//.............................................................................
|
|
|
|
|
|
|