Files
libreoffice/chart2/source/controller/dialogs/tp_PolarOptions.cxx

116 lines
3.7 KiB
C++
Raw Normal View History

/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2008 by Sun Microsystems, Inc.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: tp_PolarOptions.cxx,v $
* $Revision: 1.3 $
*
* This file is part of OpenOffice.org.
*
* 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.
*
* 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).
*
* 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.
*
************************************************************************/
#include "precompiled_chart2.hxx"
#include "tp_PolarOptions.hxx"
#include "tp_PolarOptions.hrc"
#include "ResId.hxx"
#include "TabPages.hrc"
#include "chartview/ChartSfxItemIds.hxx"
#include "NoWarningThisInCTOR.hxx"
#include <svtools/eitem.hxx>
#include <svtools/intitem.hxx>
#include <svtools/controldims.hrc>
//.............................................................................
namespace chart
{
//.............................................................................
PolarOptionsTabPage::PolarOptionsTabPage( Window* pWindow,const SfxItemSet& rInAttrs ) :
SfxTabPage( pWindow, SchResId(TP_POLAROPTIONS), rInAttrs ),
m_aCB_Clockwise( this, SchResId( CB_CLOCKWISE ) ),
m_aFL_StartingAngle( this, SchResId( FL_STARTING_ANGLE ) ),
m_aAngleDial( this, SchResId( CT_ANGLE_DIAL ) ),
m_aFT_Degrees( this, SchResId( FT_ROTATION_DEGREES ) ),
m_aNF_StartingAngle( this, SchResId( NF_STARTING_ANGLE ) )
{
FreeResource();
m_aAngleDial.SetLinkedField( &m_aNF_StartingAngle );
}
PolarOptionsTabPage::~PolarOptionsTabPage()
{
}
SfxTabPage* PolarOptionsTabPage::Create( Window* pWindow,const SfxItemSet& rOutAttrs )
{
return new PolarOptionsTabPage( pWindow, rOutAttrs );
}
BOOL PolarOptionsTabPage::FillItemSet( SfxItemSet& rOutAttrs )
{
if( m_aAngleDial.IsVisible() )
{
rOutAttrs.Put(SfxInt32Item(SCHATTR_STARTING_ANGLE,
static_cast< sal_Int32 >(m_aAngleDial.GetRotation()/100)));
}
if( m_aCB_Clockwise.IsVisible() )
CWS-TOOLING: integrate CWS chart35 2009-02-20 12:33:54 +0100 nn r268312 : correct line ends 2009-01-19 12:50:45 +0100 iha r266491 : #i91800# style:text-position='0' is wrongly imported 2009-01-19 11:59:09 +0100 iha r266486 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-16 16:45:50 +0100 iha r266435 : #i93802# clockwise does not work on solars sparc 2009-01-16 13:23:37 +0100 iha r266414 : #i91037# Position of Datalabels in 3D Bar-Charts are crossing the edge 2009-01-15 14:09:27 +0100 iha r266370 : #i98102# checkbox show equation should not be checked initially 2009-01-14 17:41:33 +0100 iha r266323 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 16:23:06 +0100 iha r266316 : #i97133# #i97318# chart type is not detected correctly in case of invisible series 2009-01-14 13:43:38 +0100 iha r266298 : #i84417# Unable to edit existing chart title with clipboard 2009-01-14 13:43:04 +0100 iha r266297 : #i84417# Unable to edit existing chart title with IME 2009-01-14 13:14:15 +0100 dr r266293 : do not set CharEscapement property if not needed 2009-01-14 00:48:46 +0100 er r266262 : #i81383# changed ASC and JIS to use transliteration provided by i18n transliteration; patch from <bluedwarf> 2009-01-14 00:28:06 +0100 er r266261 : #i97536# silence gcc's unbracketed && || warnings 2009-01-13 22:43:45 +0100 er r266259 : #i97905# corrected IndexKey order 2009-01-13 20:36:15 +0100 er r266254 : #i97905# add SKK/EUR conversion (plus MTL/EUR and CYP/EUR) 2009-01-13 20:31:17 +0100 er r266253 : #i97905# updated locale data; contributed by <brko> 2009-01-13 11:57:08 +0100 iha r266204 : #i84103# cannot set data in xy diagram in draw 2009-01-12 20:29:37 +0100 nn r266181 : #i97680# GetStylesContainer: handle non-available style family 2009-01-12 19:53:19 +0100 nn r266180 : #i98000# don't get initial zoom value via SfxViewFrame::Current 2009-01-12 16:11:19 +0100 iha r266166 : #i71686# XY charts without valid x values are not imported correctly from Excel 2009-01-09 17:10:20 +0100 iha r266102 : #i95051# truncated asian strings on scale tabpage 2009-01-09 15:58:46 +0100 iha r266094 : #i89430# truncated asian strings in smooth lines dialog 2009-01-09 13:09:14 +0100 iha r266076 : #i94813# importing pie chart with multiline categories crashes
2009-03-03 11:39:43 +00:00
rOutAttrs.Put(SfxBoolItem(SCHATTR_CLOCKWISE,m_aCB_Clockwise.IsChecked()));
return TRUE;
}
void PolarOptionsTabPage::Reset(const SfxItemSet& rInAttrs)
{
const SfxPoolItem *pPoolItem = NULL;
long nTmp;
if (rInAttrs.GetItemState(SCHATTR_STARTING_ANGLE, TRUE, &pPoolItem) == SFX_ITEM_SET)
{
nTmp = (long)((const SfxInt32Item*)pPoolItem)->GetValue();
m_aAngleDial.SetRotation( nTmp*100 );
}
else
{
m_aFL_StartingAngle.Show(FALSE);
m_aAngleDial.Show(FALSE);
m_aNF_StartingAngle.Show(FALSE);
m_aFT_Degrees.Show(FALSE);
}
if (rInAttrs.GetItemState(SCHATTR_CLOCKWISE, TRUE, &pPoolItem) == SFX_ITEM_SET)
{
BOOL bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
m_aCB_Clockwise.Check(bCheck);
}
else
{
m_aCB_Clockwise.Show(FALSE);
}
}
//.............................................................................
} //namespace chart
//.............................................................................