changed symbol information handling
This commit is contained in:
parent
215120d8a3
commit
57395628fd
2 changed files with 27 additions and 102 deletions
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: dlg_ObjectProperties.cxx,v $
|
||||
*
|
||||
* $Revision: 1.4 $
|
||||
* $Revision: 1.5 $
|
||||
*
|
||||
* last change: $Author: iha $ $Date: 2003-11-12 18:13:41 $
|
||||
* last change: $Author: iha $ $Date: 2003-11-13 15:17:51 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -312,56 +312,26 @@ USHORT SchAttribTabDlg::GetResId(ObjectType eObjectType)
|
|||
}
|
||||
return nRet;
|
||||
}
|
||||
/*
|
||||
USHORT SchAttribTabDlg::GetResId(AttrType eType)
|
||||
|
||||
void SchAttribTabDlg::setSymbolInformation( SfxItemSet* pSymbolShapeProperties,
|
||||
Graphic* pAutoSymbolGraphic )
|
||||
{
|
||||
switch (eType)
|
||||
{
|
||||
case ATTR_TITLE: return TAB_TITLE;
|
||||
case ATTR_LEGEND: return TAB_LEGEND;
|
||||
case ATTR_DATA_ROW: return TAB_DATA_ROW;
|
||||
case ATTR_DATA_LINE: return TAB_DATA_LINE;
|
||||
case ATTR_DATA_POINT: return TAB_DATA_POINT;
|
||||
case ATTR_AXIS: return TAB_AXIS;
|
||||
case ATTR_X_AXIS_2D:
|
||||
case ATTR_X_AXIS_3D: return TAB_X_AXIS;
|
||||
case ATTR_Y_AXIS_2D:
|
||||
case ATTR_Y_AXIS_3D: return TAB_Y_AXIS;
|
||||
case ATTR_Z_AXIS: return TAB_Z_AXIS;
|
||||
case ATTR_GRID: return TAB_GRID;
|
||||
case ATTR_LINE: return TAB_LINE;
|
||||
case ATTR_DIAGRAM_AREA: return TAB_DIAGRAM_AREA;
|
||||
case ATTR_DIAGRAM_WALL: return TAB_DIAGRAM_WALL;
|
||||
case ATTR_DIAGRAM_FLOOR: return TAB_DIAGRAM_FLOOR;
|
||||
case ATTR_DIAGRAM_STOCK_LOSS: return TAB_DIAGRAM_STOCK_LOSS;
|
||||
case ATTR_DIAGRAM_STOCK_PLUS: return TAB_DIAGRAM_STOCK_PLUS;
|
||||
default: return 0;
|
||||
}
|
||||
m_pSymbolShapeProperties = pSymbolShapeProperties;
|
||||
m_pAutoSymbolGraphic = pAutoSymbolGraphic;
|
||||
}
|
||||
*/
|
||||
|
||||
SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
|
||||
const SfxItemSet* pAttr,
|
||||
const ObjectPropertiesDialogParameter* pDialogParameter,
|
||||
const ViewElementListProvider* pViewElementListProvider,
|
||||
const SfxItemSet* pSymbolAttr,
|
||||
Graphic aGraphic)
|
||||
const ViewElementListProvider* pViewElementListProvider )
|
||||
: SfxTabDialog(pParent, SchResId(GetResId(pDialogParameter->getObjectType())), pAttr)
|
||||
, eObjectType(pDialogParameter->getObjectType())
|
||||
, nDlgType(nNoArrowNoShadowDlg)
|
||||
, nPageType(0)
|
||||
, m_pParameter( pDialogParameter )
|
||||
, m_pViewElementListProvider( pViewElementListProvider )
|
||||
, mpSymbolAttr(pSymbolAttr)
|
||||
, maSymbolGraphic(aGraphic)
|
||||
/*
|
||||
, pColorTab(pViewElementListProvider->GetColorTable())
|
||||
, pGradientList(pViewElementListProvider->GetGradientList())
|
||||
, pHatchingList(pViewElementListProvider->GetHatchList())
|
||||
, pBitmapList(pViewElementListProvider->GetBitmapList())
|
||||
, pDashList(pViewElementListProvider->GetDashList())
|
||||
, pLineEndList(pViewElementListProvider->GetLineEndList())
|
||||
*/
|
||||
, m_pSymbolShapeProperties(NULL)
|
||||
, m_pAutoSymbolGraphic(NULL)
|
||||
, nColorTableState(CT_NONE)
|
||||
, nGradientListState(CT_NONE)
|
||||
, nHatchingListState(CT_NONE)
|
||||
|
@ -515,6 +485,8 @@ SchAttribTabDlg::SchAttribTabDlg(Window* pParent,
|
|||
|
||||
SchAttribTabDlg::~SchAttribTabDlg()
|
||||
{
|
||||
delete m_pSymbolShapeProperties;
|
||||
delete m_pAutoSymbolGraphic;
|
||||
}
|
||||
|
||||
void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage)
|
||||
|
@ -535,9 +507,10 @@ void SchAttribTabDlg::PageCreated(USHORT nId, SfxTabPage &rPage)
|
|||
{
|
||||
((SvxLineTabPage&)rPage).ShowSymbolControls(TRUE);
|
||||
((SvxLineTabPage&)rPage).SetSymbolList(m_pViewElementListProvider->GetSymbolList());
|
||||
if( mpSymbolAttr )
|
||||
((SvxLineTabPage&)rPage).SetSymbolAttr(mpSymbolAttr);
|
||||
((SvxLineTabPage&)rPage).SetAutoSymbolGraphic(&maSymbolGraphic);
|
||||
if( m_pSymbolShapeProperties )
|
||||
((SvxLineTabPage&)rPage).SetSymbolAttr(m_pSymbolShapeProperties);
|
||||
if( m_pAutoSymbolGraphic )
|
||||
((SvxLineTabPage&)rPage).SetAutoSymbolGraphic(m_pAutoSymbolGraphic);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
*
|
||||
* $RCSfile: dlg_ObjectProperties.hxx,v $
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
* last change: $Author: iha $ $Date: 2003-11-08 22:58:03 $
|
||||
* last change: $Author: iha $ $Date: 2003-11-13 15:17:07 $
|
||||
*
|
||||
* The Contents of this file are made available subject to the terms of
|
||||
* either of the following licenses
|
||||
|
@ -76,30 +76,6 @@ namespace chart
|
|||
{
|
||||
//.............................................................................
|
||||
|
||||
/*
|
||||
enum AttrType
|
||||
{
|
||||
ATTR_TITLE,
|
||||
ATTR_LEGEND,
|
||||
ATTR_DATA_ROW,
|
||||
ATTR_DATA_LINE,
|
||||
ATTR_DATA_POINT,
|
||||
ATTR_AXIS,
|
||||
ATTR_X_AXIS_2D,
|
||||
ATTR_X_AXIS_3D,
|
||||
ATTR_Y_AXIS_2D,
|
||||
ATTR_Y_AXIS_3D,
|
||||
ATTR_Z_AXIS,
|
||||
ATTR_GRID,
|
||||
ATTR_DIAGRAM_AREA,
|
||||
ATTR_DIAGRAM_WALL,
|
||||
ATTR_DIAGRAM_FLOOR,
|
||||
ATTR_LINE,
|
||||
ATTR_DIAGRAM_STOCK_LOSS,
|
||||
ATTR_DIAGRAM_STOCK_PLUS
|
||||
};
|
||||
*/
|
||||
|
||||
class ObjectPropertiesDialogParameter
|
||||
{
|
||||
public:
|
||||
|
@ -133,26 +109,9 @@ private:
|
|||
bool m_bCanAxisLabelsBeStaggered;
|
||||
};
|
||||
|
||||
/*
|
||||
#define CHATTR_COUNT (CHATTR_DIAGRAM_FLOOR + 1)
|
||||
|
||||
enum OrderMode
|
||||
{
|
||||
CHORDMODE_NONE,
|
||||
CHORDMODE_X_AXIS,
|
||||
CHORDMODE_Y_AXIS
|
||||
};
|
||||
|
||||
#define CHORDMODE_COUNT (CHORDMODE_Y_AXIS + 1)
|
||||
|
||||
#define AxisTypeX 1
|
||||
#define AxisTypeY 2
|
||||
#define AxisTypeZ 3
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* Attributs-Tab-Dialog
|
||||
|* dialog for properties of different chart object
|
||||
|*
|
||||
\************************************************************************/
|
||||
|
||||
|
@ -169,17 +128,8 @@ private:
|
|||
const ObjectPropertiesDialogParameter * const m_pParameter;
|
||||
const ViewElementListProvider* const m_pViewElementListProvider;
|
||||
|
||||
const SfxItemSet* mpSymbolAttr;
|
||||
Graphic maSymbolGraphic;
|
||||
|
||||
/*
|
||||
XColorTable* pColorTab;
|
||||
XGradientList* pGradientList;
|
||||
XHatchList* pHatchingList;
|
||||
XBitmapList* pBitmapList;
|
||||
XDashList* pDashList;
|
||||
XLineEndList* pLineEndList;
|
||||
*/
|
||||
SfxItemSet* m_pSymbolShapeProperties;
|
||||
Graphic* m_pAutoSymbolGraphic;
|
||||
|
||||
ChangeType nColorTableState;
|
||||
ChangeType nGradientListState;
|
||||
|
@ -187,16 +137,18 @@ private:
|
|||
ChangeType nBitmapListState;
|
||||
|
||||
static USHORT GetResId(ObjectType eObjectType);
|
||||
////static USHORT GetResId(AttrType eType);
|
||||
virtual void PageCreated(USHORT nId, SfxTabPage& rPage);
|
||||
|
||||
public:
|
||||
SchAttribTabDlg(Window* pParent, const SfxItemSet* pAttr,
|
||||
const ObjectPropertiesDialogParameter* pDialogParameter,
|
||||
const ViewElementListProvider* pViewElementListProvider,
|
||||
const SfxItemSet* pSymbolAttr=NULL,
|
||||
Graphic aSymbolGraphic=Graphic());
|
||||
const ViewElementListProvider* pViewElementListProvider );
|
||||
virtual ~SchAttribTabDlg();
|
||||
|
||||
//pSymbolShapeProperties: Properties to be set on the symbollist shapes
|
||||
//pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected
|
||||
//this class takes ownership over both parameter
|
||||
void setSymbolInformation( SfxItemSet* pSymbolShapeProperties, Graphic* pAutoSymbolGraphic );
|
||||
};
|
||||
|
||||
//.............................................................................
|
||||
|
|
Loading…
Reference in a new issue