drop window related stuff from rsc
Change-Id: I7045a34bec2f55f06239fe77e61347da73c38534 Reviewed-on: https://gerrit.libreoffice.org/30263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -37,16 +37,7 @@ class RscTypCont;
|
|||||||
extern OString* pStdParType;
|
extern OString* pStdParType;
|
||||||
extern OString* pStdPar1;
|
extern OString* pStdPar1;
|
||||||
extern OString* pStdPar2;
|
extern OString* pStdPar2;
|
||||||
extern OString* pWinParType;
|
|
||||||
extern OString* pWinPar1;
|
|
||||||
extern OString* pWinPar2;
|
|
||||||
extern sal_uInt32 nRefDeep;
|
extern sal_uInt32 nRefDeep;
|
||||||
extern sal_uInt32 nRsc_XYMAPMODEId;
|
|
||||||
extern sal_uInt32 nRsc_WHMAPMODEId;
|
|
||||||
extern sal_uInt32 nRsc_X;
|
|
||||||
extern sal_uInt32 nRsc_Y;
|
|
||||||
extern sal_uInt32 nRsc_WIDTH;
|
|
||||||
extern sal_uInt32 nRsc_HEIGHT;
|
|
||||||
extern sal_uInt32 nRsc_DELTALANG;
|
extern sal_uInt32 nRsc_DELTALANG;
|
||||||
extern sal_uInt32 nRsc_DELTASYSTEM;
|
extern sal_uInt32 nRsc_DELTASYSTEM;
|
||||||
extern sal_uInt32 nRsc_EXTRADATA;
|
extern sal_uInt32 nRsc_EXTRADATA;
|
||||||
|
@@ -79,62 +79,6 @@ class RscTypCont
|
|||||||
::std::vector< RscSysEntry* >
|
::std::vector< RscSysEntry* >
|
||||||
aSysLst; // list of system resources
|
aSysLst; // list of system resources
|
||||||
|
|
||||||
Atom nWinBitVarId; // name of the winbit variable
|
|
||||||
Atom nBorderId;
|
|
||||||
Atom nHideId;
|
|
||||||
Atom nClipChildrenId;
|
|
||||||
Atom nSizeableId;
|
|
||||||
Atom nMoveableId;
|
|
||||||
Atom nMinimizeId;
|
|
||||||
Atom nMaximizeId;
|
|
||||||
Atom nCloseableId;
|
|
||||||
Atom nStdPopupId;
|
|
||||||
Atom nAppId;
|
|
||||||
Atom nTabstopId;
|
|
||||||
Atom nGroupId;
|
|
||||||
Atom nSysmodalId;
|
|
||||||
Atom nLeftId;
|
|
||||||
Atom nCenterId;
|
|
||||||
Atom nRightId;
|
|
||||||
Atom nTopId;
|
|
||||||
Atom nVCenterId;
|
|
||||||
Atom nBottomId;
|
|
||||||
Atom nHScrollId;
|
|
||||||
Atom nVScrollId;
|
|
||||||
Atom nSortId;
|
|
||||||
Atom nDefaultId;
|
|
||||||
Atom nSVLookId;
|
|
||||||
Atom nRepeatId;
|
|
||||||
Atom nDropDownId;
|
|
||||||
Atom nPassWordId;
|
|
||||||
Atom nReadOnlyId;
|
|
||||||
Atom nAutoSizeId;
|
|
||||||
Atom nSpinId;
|
|
||||||
Atom nTabControlId;
|
|
||||||
Atom nSimpleModeId;
|
|
||||||
Atom nDragId;
|
|
||||||
Atom nScrollId;
|
|
||||||
Atom nZoomableId;
|
|
||||||
Atom nHideWhenDeactivateId;
|
|
||||||
Atom nAutoHScrollId;
|
|
||||||
Atom nAutoVScrollId;
|
|
||||||
Atom nWordBreakId;
|
|
||||||
Atom nLeftLabelId;
|
|
||||||
Atom nHasLinesId;
|
|
||||||
Atom nHasButtonsId;
|
|
||||||
Atom nRectStyleId;
|
|
||||||
Atom nLineSpacingId;
|
|
||||||
Atom nSmallStyleId;
|
|
||||||
Atom nEnableResizingId;
|
|
||||||
Atom nDockableId;
|
|
||||||
Atom nScaleId;
|
|
||||||
Atom nIgnoreTabId;
|
|
||||||
Atom nNoSplitDrawId;
|
|
||||||
Atom nTopImageId;
|
|
||||||
Atom nNoLabelId;
|
|
||||||
Atom nVertId;
|
|
||||||
Atom nSysWinId;
|
|
||||||
|
|
||||||
void Init(); // initializes classes and tables
|
void Init(); // initializes classes and tables
|
||||||
void SETCONST( RscConst *, const char *, sal_uInt32 );
|
void SETCONST( RscConst *, const char *, sal_uInt32 );
|
||||||
void SETCONST( RscConst *, Atom, sal_uInt32 );
|
void SETCONST( RscConst *, Atom, sal_uInt32 );
|
||||||
@@ -187,7 +131,6 @@ public:
|
|||||||
RscIdRange aIdLong;
|
RscIdRange aIdLong;
|
||||||
RscString aString;
|
RscString aString;
|
||||||
RscString aStringLiteral;
|
RscString aStringLiteral;
|
||||||
RscFlag aWinBits;
|
|
||||||
RscLangEnum aLangType;
|
RscLangEnum aLangType;
|
||||||
RscLangArray aLangString;
|
RscLangArray aLangString;
|
||||||
RscLangArray aLangShort;
|
RscLangArray aLangShort;
|
||||||
|
@@ -55,7 +55,6 @@ RscTypCont::RscTypCont( RscError * pErrHdl,
|
|||||||
, aIdLong( pHS->getID( "IDLONG" ), RSC_NOTYPE )
|
, aIdLong( pHS->getID( "IDLONG" ), RSC_NOTYPE )
|
||||||
, aString( pHS->getID( "Chars" ), RSC_NOTYPE )
|
, aString( pHS->getID( "Chars" ), RSC_NOTYPE )
|
||||||
, aStringLiteral( pHS->getID( "Chars" ), RSC_NOTYPE )
|
, aStringLiteral( pHS->getID( "Chars" ), RSC_NOTYPE )
|
||||||
, aWinBits( pHS->getID( "WinBits" ), RSC_NOTYPE )
|
|
||||||
, aLangType()
|
, aLangType()
|
||||||
, aLangString( pHS->getID( "Lang_Chars" ), RSC_NOTYPE, &aString, &aLangType )
|
, aLangString( pHS->getID( "Lang_Chars" ), RSC_NOTYPE, &aString, &aLangType )
|
||||||
, aLangShort( pHS->getID( "Lang_short" ), RSC_NOTYPE, &aShort, &aLangType )
|
, aLangShort( pHS->getID( "Lang_short" ), RSC_NOTYPE, &aShort, &aLangType )
|
||||||
@@ -185,7 +184,6 @@ RscTypCont::~RscTypCont()
|
|||||||
aNoZeroShort.Pre_dtor();
|
aNoZeroShort.Pre_dtor();
|
||||||
aIdLong.Pre_dtor();
|
aIdLong.Pre_dtor();
|
||||||
aString.Pre_dtor();
|
aString.Pre_dtor();
|
||||||
aWinBits.Pre_dtor();
|
|
||||||
aVersion.pClass->Pre_dtor();
|
aVersion.pClass->Pre_dtor();
|
||||||
// sub-types
|
// sub-types
|
||||||
Pre_dtorTree( pRoot );
|
Pre_dtorTree( pRoot );
|
||||||
@@ -233,7 +231,6 @@ RscTop * RscTypCont::SearchType( Atom nId )
|
|||||||
ELSE_IF( aNoZeroShort )
|
ELSE_IF( aNoZeroShort )
|
||||||
ELSE_IF( aIdLong )
|
ELSE_IF( aIdLong )
|
||||||
ELSE_IF( aString )
|
ELSE_IF( aString )
|
||||||
ELSE_IF( aWinBits )
|
|
||||||
ELSE_IF( aLangType )
|
ELSE_IF( aLangType )
|
||||||
ELSE_IF( aLangString )
|
ELSE_IF( aLangString )
|
||||||
ELSE_IF( aLangShort )
|
ELSE_IF( aLangShort )
|
||||||
|
@@ -79,15 +79,6 @@ void RscTypCont::Init()
|
|||||||
/* values for integer types */
|
/* values for integer types */
|
||||||
aNmTb.Put( "TRUE", BOOLEAN, (sal_IntPtr)true );
|
aNmTb.Put( "TRUE", BOOLEAN, (sal_IntPtr)true );
|
||||||
aNmTb.Put( "FALSE", BOOLEAN, (sal_IntPtr)false );
|
aNmTb.Put( "FALSE", BOOLEAN, (sal_IntPtr)false );
|
||||||
|
|
||||||
aNmTb.Put( "XSCALE", XSCALE , (sal_IntPtr)0 );
|
|
||||||
aNmTb.Put( "YSCALE", YSCALE , (sal_IntPtr)0 );
|
|
||||||
aNmTb.Put( "RGB", RGB , (sal_IntPtr)0 );
|
|
||||||
aNmTb.Put( "POSSIZE", GEOMETRY, (sal_IntPtr)0 );
|
|
||||||
aNmTb.Put( "POS", POSITION, (sal_IntPtr)0 );
|
|
||||||
aNmTb.Put( "SIZE", DIMENSION, (sal_IntPtr)0 );
|
|
||||||
aNmTb.Put( "ZoomInOutputSize", INZOOMOUTPUTSIZE,(sal_IntPtr)0 );
|
|
||||||
aNmTb.Put( "FloatingPos", FLOATINGPOS, (sal_IntPtr)0 );
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
aShort.SetRange( -32768, 32767 );
|
aShort.SetRange( -32768, 32767 );
|
||||||
@@ -106,122 +97,6 @@ void RscTypCont::Init()
|
|||||||
|
|
||||||
aIdLong.SetRange( SAL_MIN_INT32, SAL_MAX_INT32 );
|
aIdLong.SetRange( SAL_MIN_INT32, SAL_MAX_INT32 );
|
||||||
}
|
}
|
||||||
{
|
|
||||||
// variable name for WinBits
|
|
||||||
nWinBitVarId = aNmTb.Put( "_WinBits", VARNAME );
|
|
||||||
|
|
||||||
// Windows
|
|
||||||
nBorderId = pHS->getID( "WB_BORDER" );
|
|
||||||
aWinBits.SetConstant( nBorderId, sal::static_int_cast<sal_Int32>(WB_BORDER) );
|
|
||||||
nHideId = pHS->getID( "WB_HIDE" );
|
|
||||||
aWinBits.SetConstant( nHideId, sal::static_int_cast<sal_Int32>(WB_HIDE) );
|
|
||||||
nClipChildrenId = pHS->getID( "WB_CLIPCHILDREN" );
|
|
||||||
aWinBits.SetConstant( nClipChildrenId, sal::static_int_cast<sal_Int32>(WB_CLIPCHILDREN) );
|
|
||||||
nSizeableId = pHS->getID( "WB_SIZEABLE" );
|
|
||||||
aWinBits.SetConstant( nSizeableId, sal::static_int_cast<sal_Int32>(WB_SIZEABLE) );
|
|
||||||
nMoveableId = pHS->getID( "WB_MOVEABLE" );
|
|
||||||
aWinBits.SetConstant( nMoveableId, sal::static_int_cast<sal_Int32>(WB_MOVEABLE) );
|
|
||||||
nMinimizeId = pHS->getID( "WB_MINABLE" );
|
|
||||||
aWinBits.SetConstant( nMinimizeId, 0 /*WB_MINABLE*/ );
|
|
||||||
nMaximizeId = pHS->getID( "WB_MAXABLE" );
|
|
||||||
aWinBits.SetConstant( nMaximizeId, 0 /*WB_MAXABLE*/ );
|
|
||||||
nCloseableId = pHS->getID( "WB_CLOSEABLE" );
|
|
||||||
aWinBits.SetConstant( nCloseableId, sal::static_int_cast<sal_Int32>(WB_CLOSEABLE) );
|
|
||||||
nAppId = pHS->getID( "WB_APP" );
|
|
||||||
aWinBits.SetConstant( nAppId, sal::static_int_cast<sal_Int32>(WB_APP) );
|
|
||||||
nTabstopId = pHS->getID( "WB_TABSTOP" );
|
|
||||||
aWinBits.SetConstant( nTabstopId, sal::static_int_cast<sal_Int32>(WB_TABSTOP) );
|
|
||||||
nGroupId = pHS->getID( "WB_GROUP" );
|
|
||||||
aWinBits.SetConstant( nGroupId, sal::static_int_cast<sal_Int32>(WB_GROUP) );
|
|
||||||
nSysmodalId = pHS->getID( "WB_SYSMODAL" );
|
|
||||||
aWinBits.SetConstant( nSysmodalId, 0 /*WB_SYSMODAL*/ );
|
|
||||||
}
|
|
||||||
{
|
|
||||||
nLeftId = pHS->getID( "WB_LEFT" );
|
|
||||||
aWinBits.SetConstant( nLeftId, sal::static_int_cast<sal_Int32>(WB_LEFT) );
|
|
||||||
nCenterId = pHS->getID( "WB_CENTER" );
|
|
||||||
aWinBits.SetConstant( nCenterId, sal::static_int_cast<sal_Int32>(WB_CENTER) );
|
|
||||||
nRightId = pHS->getID( "WB_RIGHT" );
|
|
||||||
aWinBits.SetConstant( nRightId, sal::static_int_cast<sal_Int32>(WB_RIGHT) );
|
|
||||||
nTopId = pHS->getID( "WB_TOP" );
|
|
||||||
aWinBits.SetConstant( nTopId, sal::static_int_cast<sal_Int32>(WB_TOP) );
|
|
||||||
nVCenterId = pHS->getID( "WB_VCENTER" );
|
|
||||||
aWinBits.SetConstant( nVCenterId, sal::static_int_cast<sal_Int32>(WB_VCENTER) );
|
|
||||||
nBottomId = pHS->getID( "WB_BOTTOM" );
|
|
||||||
aWinBits.SetConstant( nBottomId, sal::static_int_cast<sal_Int32>(WB_BOTTOM) );
|
|
||||||
nHScrollId = pHS->getID( "WB_HSCROLL" );
|
|
||||||
aWinBits.SetConstant( nHScrollId, sal::static_int_cast<sal_Int32>(WB_HSCROLL) );
|
|
||||||
nVScrollId = pHS->getID( "WB_VSCROLL" );
|
|
||||||
aWinBits.SetConstant( nVScrollId, sal::static_int_cast<sal_Int32>(WB_VSCROLL) );
|
|
||||||
nSortId = pHS->getID( "WB_SORT" );
|
|
||||||
aWinBits.SetConstant( nSortId, sal::static_int_cast<sal_Int32>(WB_SORT) );
|
|
||||||
nDefaultId = pHS->getID( "WB_DEFBUTTON" );
|
|
||||||
aWinBits.SetConstant( nDefaultId, sal::static_int_cast<sal_Int32>(WB_DEFBUTTON) );
|
|
||||||
nRepeatId = pHS->getID( "WB_REPEAT" );
|
|
||||||
aWinBits.SetConstant( nRepeatId, sal::static_int_cast<sal_Int32>(WB_REPEAT) );
|
|
||||||
nSVLookId = pHS->getID( "WB_SVLOOK" );
|
|
||||||
aWinBits.SetConstant( nSVLookId, sal::static_int_cast<sal_Int32>(WB_3DLOOK) );
|
|
||||||
nDropDownId = pHS->getID( "WB_DROPDOWN" );
|
|
||||||
aWinBits.SetConstant( nDropDownId, sal::static_int_cast<sal_Int32>(WB_DROPDOWN) );
|
|
||||||
nPassWordId = pHS->getID( "WB_PASSWORD" );
|
|
||||||
aWinBits.SetConstant( nPassWordId, sal::static_int_cast<sal_Int32>(WB_PASSWORD) );
|
|
||||||
nReadOnlyId = pHS->getID( "WB_READONLY" );
|
|
||||||
aWinBits.SetConstant( nReadOnlyId, sal::static_int_cast<sal_Int32>(WB_READONLY) );
|
|
||||||
nAutoSizeId = pHS->getID( "WB_AUTOSIZE" );
|
|
||||||
aWinBits.SetConstant( nAutoSizeId, sal::static_int_cast<sal_Int32>(WB_AUTOSIZE) );
|
|
||||||
nSpinId = pHS->getID( "WB_SPIN" );
|
|
||||||
aWinBits.SetConstant( nSpinId, sal::static_int_cast<sal_Int32>(WB_SPIN) );
|
|
||||||
nTabControlId = pHS->getID( "WB_DIALOGCONTROL" );
|
|
||||||
aWinBits.SetConstant( nTabControlId, sal::static_int_cast<sal_Int32>(WB_DIALOGCONTROL) );
|
|
||||||
nSimpleModeId = pHS->getID( "WB_SIMPLEMODE" );
|
|
||||||
aWinBits.SetConstant( nSimpleModeId, sal::static_int_cast<sal_Int32>(WB_SIMPLEMODE) );
|
|
||||||
nDragId = pHS->getID( "WB_DRAG" );
|
|
||||||
aWinBits.SetConstant( nDragId, sal::static_int_cast<sal_Int32>(WB_DRAG) );
|
|
||||||
nScrollId = pHS->getID( "WB_SCROLL" );
|
|
||||||
aWinBits.SetConstant( nScrollId, sal::static_int_cast<sal_Int32>(WB_SCROLL) );
|
|
||||||
nZoomableId = pHS->getID( "WB_ZOOMABLE" );
|
|
||||||
aWinBits.SetConstant( nZoomableId, sal::static_int_cast<sal_Int32>(WB_ROLLABLE) );
|
|
||||||
nHideWhenDeactivateId = pHS->getID( "WB_HIDEWHENDEACTIVATE" );
|
|
||||||
aWinBits.SetConstant( nHideWhenDeactivateId, 0 /*WB_HIDEWHENDEACTIVATE*/ );
|
|
||||||
nAutoHScrollId = pHS->getID( "WB_AUTOHSCROLL" );
|
|
||||||
aWinBits.SetConstant( nAutoHScrollId, sal::static_int_cast<sal_Int32>(WB_AUTOHSCROLL) );
|
|
||||||
nAutoVScrollId = pHS->getID( "WB_AUTOVSCROLL" );
|
|
||||||
aWinBits.SetConstant( nAutoVScrollId, sal::static_int_cast<sal_Int32>(WB_AUTOVSCROLL) );
|
|
||||||
nWordBreakId = pHS->getID( "WB_WORDBREAK" );
|
|
||||||
aWinBits.SetConstant( nWordBreakId, sal::static_int_cast<sal_Int32>(WB_WORDBREAK) );
|
|
||||||
nLeftLabelId = pHS->getID( "WB_LEFTLABEL" );
|
|
||||||
aWinBits.SetConstant( nLeftLabelId, 0 /*WB_LEFTLABEL*/ );
|
|
||||||
nHasLinesId = pHS->getID( "WB_HASLINES" );
|
|
||||||
aWinBits.SetConstant( nHasLinesId, sal::static_int_cast<sal_Int32>(WB_HASLINES) );
|
|
||||||
nHasButtonsId = pHS->getID( "WB_HASBUTTONS" );
|
|
||||||
aWinBits.SetConstant( nHasButtonsId, sal::static_int_cast<sal_Int32>(WB_HASBUTTONS) );
|
|
||||||
nRectStyleId = pHS->getID( "WB_RECTSTYLE" );
|
|
||||||
aWinBits.SetConstant( nRectStyleId, sal::static_int_cast<sal_Int32>(WB_RECTSTYLE) );
|
|
||||||
nLineSpacingId = pHS->getID( "WB_LINESPACING" );
|
|
||||||
aWinBits.SetConstant( nLineSpacingId, sal::static_int_cast<sal_Int32>(WB_LINESPACING) );
|
|
||||||
nSmallStyleId = pHS->getID( "WB_SMALLSTYLE" );
|
|
||||||
aWinBits.SetConstant( nSmallStyleId, sal::static_int_cast<sal_Int32>(WB_SMALLSTYLE) );
|
|
||||||
nEnableResizingId = pHS->getID( "WB_ENABLERESIZING" );
|
|
||||||
aWinBits.SetConstant( nEnableResizingId, 0 /*WB_ENABLERESIZING*/ );
|
|
||||||
nDockableId = pHS->getID( "WB_DOCKABLE" );
|
|
||||||
aWinBits.SetConstant( nDockableId, sal::static_int_cast<sal_Int32>(WB_DOCKABLE) );
|
|
||||||
nScaleId = pHS->getID( "WB_SCALE" );
|
|
||||||
aWinBits.SetConstant( nScaleId, sal::static_int_cast<sal_Int32>(WB_SCALE) );
|
|
||||||
nIgnoreTabId = pHS->getID( "WB_IGNORETAB" );
|
|
||||||
aWinBits.SetConstant( nIgnoreTabId, sal::static_int_cast<sal_Int32>(WB_IGNORETAB) );
|
|
||||||
nNoSplitDrawId = pHS->getID( "WB_NOSPLITDRAW" );
|
|
||||||
aWinBits.SetConstant( nNoSplitDrawId, sal::static_int_cast<sal_Int32>(WB_NOSPLITDRAW) );
|
|
||||||
nTopImageId = pHS->getID( "WB_TOPIMAGE" );
|
|
||||||
aWinBits.SetConstant( nTopImageId, sal::static_int_cast<sal_Int32>(WB_TOPIMAGE) );
|
|
||||||
nNoLabelId = pHS->getID( "WB_NOLABEL" );
|
|
||||||
aWinBits.SetConstant( nNoLabelId, sal::static_int_cast<sal_Int32>(WB_NOLABEL) );
|
|
||||||
nVertId = pHS->getID( "WB_VERT" );
|
|
||||||
aWinBits.SetConstant( nVertId, sal::static_int_cast<sal_Int32>(WB_VERT) );
|
|
||||||
nSysWinId = pHS->getID( "WB_SYSTEMWINDOW" );
|
|
||||||
aWinBits.SetConstant( nSysWinId, sal::static_int_cast<sal_Int32>(WB_SYSTEMWINDOW) );
|
|
||||||
nStdPopupId = pHS->getID( "WB_STDPOPUP" );
|
|
||||||
aWinBits.SetConstant( nStdPopupId, sal::static_int_cast<sal_Int32>(WB_STDPOPUP) );
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
aLangType.Init( aNmTb );
|
aLangType.Init( aNmTb );
|
||||||
aBaseLst.push_back( pFieldUnits = InitFieldUnitsType() );
|
aBaseLst.push_back( pFieldUnits = InitFieldUnitsType() );
|
||||||
|
@@ -56,38 +56,6 @@ RSCINST GetVarInst( const RSCINST & rInst, const char * pVarName )
|
|||||||
return aInst;
|
return aInst;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetNumber( const RSCINST & rInst, const char * pVarName, sal_Int32 lValue )
|
|
||||||
{
|
|
||||||
RSCINST aInst;
|
|
||||||
|
|
||||||
aInst = GetVarInst( rInst, pVarName );
|
|
||||||
|
|
||||||
if( aInst.pData )
|
|
||||||
{
|
|
||||||
ERRTYPE aError;
|
|
||||||
aError = aInst.pClass->SetNumber( aInst, lValue );
|
|
||||||
|
|
||||||
if( aError.IsError() )
|
|
||||||
pTC->pEH->Error( aError, aInst.pClass, RscId() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetConst( const RSCINST & rInst, const char * pVarName,
|
|
||||||
Atom nValueId, sal_Int32 nVal )
|
|
||||||
{
|
|
||||||
RSCINST aInst;
|
|
||||||
|
|
||||||
aInst = GetVarInst( rInst, pVarName );
|
|
||||||
if( aInst.pData )
|
|
||||||
{
|
|
||||||
ERRTYPE aError;
|
|
||||||
aError = aInst.pClass->SetConst( aInst, nValueId, nVal );
|
|
||||||
|
|
||||||
if( aError.IsError() )
|
|
||||||
pTC->pEH->Error( aError, aInst.pClass, RscId() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetString( const RSCINST & rInst, const char * pVarName, const char * pStr )
|
void SetString( const RSCINST & rInst, const char * pVarName, const char * pStr )
|
||||||
{
|
{
|
||||||
RSCINST aInst;
|
RSCINST aInst;
|
||||||
@@ -300,14 +268,6 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop )
|
|||||||
%token LINE
|
%token LINE
|
||||||
%token AUTO_ID
|
%token AUTO_ID
|
||||||
%token NOT
|
%token NOT
|
||||||
%token XSCALE
|
|
||||||
%token YSCALE
|
|
||||||
%token RGB
|
|
||||||
%token GEOMETRY
|
|
||||||
%token POSITION
|
|
||||||
%token DIMENSION
|
|
||||||
%token INZOOMOUTPUTSIZE
|
|
||||||
%token FLOATINGPOS
|
|
||||||
%token DEFINE
|
%token DEFINE
|
||||||
%token INCLUDE
|
%token INCLUDE
|
||||||
%token MACROTARGET
|
%token MACROTARGET
|
||||||
@@ -324,7 +284,6 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop )
|
|||||||
|
|
||||||
%type <macrostruct> macro_expression
|
%type <macrostruct> macro_expression
|
||||||
%type <macrostruct> id_expression
|
%type <macrostruct> id_expression
|
||||||
%type <value> long_expression
|
|
||||||
%type <string> string_multiline
|
%type <string> string_multiline
|
||||||
|
|
||||||
%type <pClass> type
|
%type <pClass> type
|
||||||
@@ -646,31 +605,6 @@ var_definitions
|
|||||||
| var_definitions var_definition
|
| var_definitions var_definition
|
||||||
;
|
;
|
||||||
|
|
||||||
xy_mapmode
|
|
||||||
: CONSTNAME
|
|
||||||
{
|
|
||||||
SetConst( S.Top(), "_XYMAPMODE", $1.hashid, $1.nValue );
|
|
||||||
}
|
|
||||||
|
|
|
||||||
;
|
|
||||||
|
|
||||||
wh_mapmode
|
|
||||||
: CONSTNAME
|
|
||||||
{
|
|
||||||
SetConst( S.Top(), "_WHMAPMODE", $1.hashid, $1.nValue );
|
|
||||||
}
|
|
||||||
|
|
|
||||||
;
|
|
||||||
|
|
||||||
xywh_mapmode
|
|
||||||
: CONSTNAME
|
|
||||||
{
|
|
||||||
SetConst( S.Top(), "_XYMAPMODE", $1.hashid, $1.nValue );
|
|
||||||
SetConst( S.Top(), "_WHMAPMODE", $1.hashid, $1.nValue );
|
|
||||||
}
|
|
||||||
|
|
|
||||||
;
|
|
||||||
|
|
||||||
var_definition
|
var_definition
|
||||||
: line_number
|
: line_number
|
||||||
| var_header var_body ';'
|
| var_header var_body ';'
|
||||||
@@ -706,67 +640,6 @@ var_definition
|
|||||||
|
|
||||||
S.Pop();
|
S.Pop();
|
||||||
}
|
}
|
||||||
| XSCALE '=' '(' long_expression ',' long_expression ')' ';'
|
|
||||||
{
|
|
||||||
SetNumber( S.Top(), "_XNUMERATOR", $4 );
|
|
||||||
SetNumber( S.Top(), "_XDENOMINATOR", $6 );
|
|
||||||
}
|
|
||||||
| YSCALE '=' '(' long_expression ',' long_expression ')' ';'
|
|
||||||
{
|
|
||||||
SetNumber( S.Top(), "_YNUMERATOR", $4 );
|
|
||||||
SetNumber( S.Top(), "_YDENOMINATOR", $6 );
|
|
||||||
}
|
|
||||||
| RGB '=' '(' long_expression ',' long_expression
|
|
||||||
',' long_expression ')' ';'
|
|
||||||
{
|
|
||||||
SetNumber( S.Top(), "RED", $4 );
|
|
||||||
SetNumber( S.Top(), "GREEN", $6 );
|
|
||||||
SetNumber( S.Top(), "BLUE", $8 );
|
|
||||||
}
|
|
||||||
| GEOMETRY '=' xywh_mapmode '(' long_expression ',' long_expression ','
|
|
||||||
long_expression ',' long_expression ')' ';'
|
|
||||||
{
|
|
||||||
SetNumber( S.Top(), "_X", $5 );
|
|
||||||
SetNumber( S.Top(), "_Y", $7 );
|
|
||||||
SetNumber( S.Top(), "_WIDTH", $9 );
|
|
||||||
SetNumber( S.Top(), "_HEIGHT", $11 );
|
|
||||||
}
|
|
||||||
| POSITION '=' xy_mapmode '(' long_expression ',' long_expression
|
|
||||||
')' ';'
|
|
||||||
{
|
|
||||||
SetNumber( S.Top(), "_X", $5 );
|
|
||||||
SetNumber( S.Top(), "_Y", $7 );
|
|
||||||
}
|
|
||||||
| DIMENSION '=' wh_mapmode '(' long_expression ',' long_expression
|
|
||||||
')' ';'
|
|
||||||
{
|
|
||||||
SetNumber( S.Top(), "_WIDTH", $5 );
|
|
||||||
SetNumber( S.Top(), "_HEIGHT", $7 );
|
|
||||||
}
|
|
||||||
| INZOOMOUTPUTSIZE '=' CONSTNAME '(' long_expression ',' long_expression
|
|
||||||
')' ';'
|
|
||||||
{
|
|
||||||
SetConst( S.Top(), "_ZOOMINMAPMODE", $3.hashid, $3.nValue );
|
|
||||||
SetNumber( S.Top(), "_ZOOMINWIDTH", $5 );
|
|
||||||
SetNumber( S.Top(), "_ZOOMINHEIGHT", $7 );
|
|
||||||
}
|
|
||||||
| INZOOMOUTPUTSIZE '=' '(' long_expression ',' long_expression ')' ';'
|
|
||||||
{
|
|
||||||
SetNumber( S.Top(), "_ZOOMINWIDTH", $4 );
|
|
||||||
SetNumber( S.Top(), "_ZOOMINHEIGHT", $6 );
|
|
||||||
}
|
|
||||||
| FLOATINGPOS '=' CONSTNAME '(' long_expression ',' long_expression
|
|
||||||
')' ';'
|
|
||||||
{
|
|
||||||
SetConst( S.Top(), "_FLOATINGPOSMAPMODE", $3.hashid, $3.nValue );
|
|
||||||
SetNumber( S.Top(), "_FLOATINGPOSX", $5 );
|
|
||||||
SetNumber( S.Top(), "_FLOATINGPOSY", $7 );
|
|
||||||
}
|
|
||||||
| FLOATINGPOS '=' '(' long_expression ',' long_expression ')' ';'
|
|
||||||
{
|
|
||||||
SetNumber( S.Top(), "_FLOATINGPOSX", $4 );
|
|
||||||
SetNumber( S.Top(), "_FLOATINGPOSY", $6 );
|
|
||||||
}
|
|
||||||
;
|
;
|
||||||
|
|
||||||
var_header_class
|
var_header_class
|
||||||
@@ -1173,16 +1046,6 @@ string_multiline
|
|||||||
}
|
}
|
||||||
;
|
;
|
||||||
|
|
||||||
long_expression
|
|
||||||
: macro_expression
|
|
||||||
{
|
|
||||||
if( !$1.Evaluate( &$$ ) )
|
|
||||||
pTC->pEH->Error( ERR_ZERODIVISION, nullptr, RscId() );
|
|
||||||
if( $1.IsExpression() )
|
|
||||||
delete $1.aExp.pExp;
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
macro_expression
|
macro_expression
|
||||||
: RSCDEFINE
|
: RSCDEFINE
|
||||||
{
|
{
|
||||||
|
@@ -24,12 +24,6 @@
|
|||||||
#include <rscall.h>
|
#include <rscall.h>
|
||||||
#include <rsckey.hxx>
|
#include <rsckey.hxx>
|
||||||
|
|
||||||
Atom nRsc_XYMAPMODEId = InvalidAtom;
|
|
||||||
Atom nRsc_WHMAPMODEId = InvalidAtom;
|
|
||||||
Atom nRsc_X = InvalidAtom;
|
|
||||||
Atom nRsc_Y = InvalidAtom;
|
|
||||||
Atom nRsc_WIDTH = InvalidAtom;
|
|
||||||
Atom nRsc_HEIGHT = InvalidAtom;
|
|
||||||
Atom nRsc_DELTALANG = InvalidAtom;
|
Atom nRsc_DELTALANG = InvalidAtom;
|
||||||
Atom nRsc_DELTASYSTEM = InvalidAtom;
|
Atom nRsc_DELTASYSTEM = InvalidAtom;
|
||||||
Atom nRsc_EXTRADATA = InvalidAtom;
|
Atom nRsc_EXTRADATA = InvalidAtom;
|
||||||
@@ -40,12 +34,7 @@ void InitRscCompiler()
|
|||||||
pStdPar1 = new OString('(');
|
pStdPar1 = new OString('(');
|
||||||
pStdPar2 = new OString('(');
|
pStdPar2 = new OString('(');
|
||||||
|
|
||||||
pWinParType = new OString("( vcl::Window * pParent, const ResId & rResId, sal_Bool");
|
|
||||||
pWinPar1 = new OString("( pParent,");
|
|
||||||
pWinPar2 = new OString("( this,");
|
|
||||||
nRefDeep = 10;
|
nRefDeep = 10;
|
||||||
nRsc_XYMAPMODEId = InvalidAtom;
|
|
||||||
nRsc_WHMAPMODEId = InvalidAtom;
|
|
||||||
pHS = new AtomContainer();
|
pHS = new AtomContainer();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -588,51 +588,7 @@ void RscClass::WriteSrc( const RSCINST & rInst,
|
|||||||
{
|
{
|
||||||
if( !(VAR_HIDDEN & pVarTypeList[ i ].nVarType) )
|
if( !(VAR_HIDDEN & pVarTypeList[ i ].nVarType) )
|
||||||
{
|
{
|
||||||
// hack for position and dimension
|
if( !IsDflt( rInst.pData, i ) && !IsValueDflt( rInst.pData, i ) )
|
||||||
if( nRsc_XYMAPMODEId == pVarTypeList[ i ].nVarName ||
|
|
||||||
nRsc_WHMAPMODEId == pVarTypeList[ i ].nVarName )
|
|
||||||
{
|
|
||||||
if( !IsDflt( rInst.pData, i ) || // MapUnit
|
|
||||||
!IsDflt( rInst.pData, i+1 ) || //X, Width
|
|
||||||
!IsDflt( rInst.pData, i+2 ) ) //Y, Height
|
|
||||||
{
|
|
||||||
// one value is no default
|
|
||||||
for( n = 0; n < nTab; n++ )
|
|
||||||
fputc( '\t', fOutput );
|
|
||||||
|
|
||||||
if( nRsc_XYMAPMODEId == pVarTypeList[ i ].nVarName )
|
|
||||||
fprintf( fOutput, "Pos = " );
|
|
||||||
else
|
|
||||||
fprintf( fOutput, "Size = " );
|
|
||||||
|
|
||||||
if( !IsDflt( rInst.pData, i ) )
|
|
||||||
{
|
|
||||||
aTmpI = GetInstData( rInst.pData, i, true );
|
|
||||||
aTmpI.pClass->WriteSrcHeader(
|
|
||||||
aTmpI, fOutput, pTC, nTab, RscId(), pVarName );
|
|
||||||
}
|
|
||||||
|
|
||||||
fprintf( fOutput, "( " );
|
|
||||||
aTmpI = GetInstData( rInst.pData, i+1, true );
|
|
||||||
if( !aTmpI.IsInst() )
|
|
||||||
aTmpI.pData = GetDfltData( i+1 );
|
|
||||||
|
|
||||||
aTmpI.pClass->WriteSrcHeader( aTmpI, fOutput, pTC, nTab, RscId(), pVarName );
|
|
||||||
|
|
||||||
fprintf( fOutput, ", " );
|
|
||||||
aTmpI = GetInstData( rInst.pData, i+2, true );
|
|
||||||
|
|
||||||
if( !aTmpI.IsInst() )
|
|
||||||
aTmpI.pData = GetDfltData( i+2 );
|
|
||||||
|
|
||||||
aTmpI.pClass->WriteSrcHeader(
|
|
||||||
aTmpI, fOutput, pTC, nTab, RscId(), pVarName );
|
|
||||||
fprintf( fOutput, " );\n" );
|
|
||||||
}
|
|
||||||
i += 2; // ignore _X, _Y or _Width, Height
|
|
||||||
}
|
|
||||||
else if( !IsDflt( rInst.pData, i )
|
|
||||||
&& !IsValueDflt( rInst.pData, i ) )
|
|
||||||
{
|
{
|
||||||
aTmpI = GetInstData( rInst.pData, i, true );
|
aTmpI = GetInstData( rInst.pData, i, true );
|
||||||
|
|
||||||
@@ -710,35 +666,12 @@ ERRTYPE RscClass::WriteInstRc( const RSCINST & rInst,
|
|||||||
{
|
{
|
||||||
if( !IsDflt( rInst.pData, i ) )
|
if( !IsDflt( rInst.pData, i ) )
|
||||||
{
|
{
|
||||||
if( nRsc_X == pVarTypeList[ i ].nVarName )
|
aTmpI = GetInstData( rInst.pData, i, true );
|
||||||
{
|
// set only for variable extradata with bExtra not false
|
||||||
sal_Int32 nVal = GetCorrectValues( rInst, i, 0, pTC );
|
aError = aTmpI.pClass->
|
||||||
rMem.Put( nVal );
|
WriteRcHeader( aTmpI, rMem, pTC,
|
||||||
}
|
RscId(), nDeep,
|
||||||
else if( nRsc_Y == pVarTypeList[ i ].nVarName )
|
(nRsc_EXTRADATA == pVarTypeList[ i ].nVarName) && bExtra );
|
||||||
{
|
|
||||||
sal_Int32 nVal = GetCorrectValues( rInst, i, 1, pTC );
|
|
||||||
rMem.Put( nVal );
|
|
||||||
}
|
|
||||||
else if( nRsc_WIDTH == pVarTypeList[ i ].nVarName )
|
|
||||||
{
|
|
||||||
sal_Int32 nVal = GetCorrectValues( rInst, i, 2, pTC );
|
|
||||||
rMem.Put( nVal );
|
|
||||||
}
|
|
||||||
else if( nRsc_HEIGHT == pVarTypeList[ i ].nVarName )
|
|
||||||
{
|
|
||||||
sal_Int32 nVal = GetCorrectValues( rInst, i, 3, pTC );
|
|
||||||
rMem.Put( nVal );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
aTmpI = GetInstData( rInst.pData, i, true );
|
|
||||||
// set only for variable extradata with bExtra not false
|
|
||||||
aError = aTmpI.pClass->
|
|
||||||
WriteRcHeader( aTmpI, rMem, pTC,
|
|
||||||
RscId(), nDeep,
|
|
||||||
(nRsc_EXTRADATA == pVarTypeList[ i ].nVarName) && bExtra );
|
|
||||||
}
|
|
||||||
sal_uInt32 nMask = rMem.GetLong( nMaskOff );
|
sal_uInt32 nMask = rMem.GetLong( nMaskOff );
|
||||||
nMask |= pVarTypeList[ i ].nMask;
|
nMask |= pVarTypeList[ i ].nMask;
|
||||||
rMem.PutAt( nMaskOff, nMask );
|
rMem.PutAt( nMaskOff, nMask );
|
||||||
|
@@ -59,9 +59,6 @@ using comphelper::string::getTokenCount;
|
|||||||
OString* pStdParType = nullptr;
|
OString* pStdParType = nullptr;
|
||||||
OString* pStdPar1 = nullptr;
|
OString* pStdPar1 = nullptr;
|
||||||
OString* pStdPar2 = nullptr;
|
OString* pStdPar2 = nullptr;
|
||||||
OString* pWinParType = nullptr;
|
|
||||||
OString* pWinPar1 = nullptr;
|
|
||||||
OString* pWinPar2 = nullptr;
|
|
||||||
sal_uInt32 nRefDeep = 10;
|
sal_uInt32 nRefDeep = 10;
|
||||||
AtomContainer* pHS = nullptr;
|
AtomContainer* pHS = nullptr;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user