drop now unused SfxStyleItem, etc.
Change-Id: I61227079c376299d17250970b19acb0c415034fb
This commit is contained in:
@@ -19,13 +19,7 @@
|
|||||||
#ifndef INCLUDED_RSC_RSCSFX_HXX
|
#ifndef INCLUDED_RSC_RSCSFX_HXX
|
||||||
#define INCLUDED_RSC_RSCSFX_HXX
|
#define INCLUDED_RSC_RSCSFX_HXX
|
||||||
|
|
||||||
// StarView (RSC_NOTYPE) bis (RSC_NOTYPE + 0x190)
|
|
||||||
// Sfx (RSC_NOTYPE + 0x200) bis (RSC_NOTYPE + 0x20F)
|
|
||||||
#define RSC_SFX_STYLE_FAMILIES (0x100 + 0x201)
|
|
||||||
#define RSC_SFX_STYLE_FAMILY_ITEM (0x100 + 0x202)
|
|
||||||
#define RSC_SFX_SLOT_INFO (0x100 + 0x203)
|
#define RSC_SFX_SLOT_INFO (0x100 + 0x203)
|
||||||
// StarMoney (RSC_NOTYPE + 0x210) bis (RSC_NOTYPE + 0x22F)
|
|
||||||
// Public (RSC_NOTYPE + 0x300) bis (RSC_NOTYPE + 0x3FF)
|
|
||||||
|
|
||||||
//========== S F X =======================================
|
//========== S F X =======================================
|
||||||
// This is used as a flags enum in sw/, but only there,
|
// This is used as a flags enum in sw/, but only there,
|
||||||
@@ -42,26 +36,12 @@ enum class SfxStyleFamily {
|
|||||||
All = 0x7fff
|
All = 0x7fff
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// SfxTemplate
|
|
||||||
enum class SfxStyleItem {
|
|
||||||
None = 0x00,
|
|
||||||
List = 0x01,
|
|
||||||
Bitmap = 0x02,
|
|
||||||
Text = 0x04,
|
|
||||||
HelpText = 0x08,
|
|
||||||
StyleFamily = 0x10,
|
|
||||||
Image = 0x20
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// SfxSlotInfo
|
// SfxSlotInfo
|
||||||
enum class SfxSlotInfo {
|
enum class SfxSlotInfo {
|
||||||
SlotName = 0x1,
|
SlotName = 0x1,
|
||||||
HelpText = 0x2
|
HelpText = 0x2
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -62,10 +62,6 @@ public:
|
|||||||
virtual RSCCLASS_TYPE GetClassType() const override;
|
virtual RSCCLASS_TYPE GetClassType() const override;
|
||||||
|
|
||||||
void Pre_dtor() override;
|
void Pre_dtor() override;
|
||||||
ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
|
|
||||||
RSCINST * pDflt,
|
|
||||||
RSCVAR nVarType, SfxStyleItem nMask,
|
|
||||||
Atom nDataBaseName = InvalidAtom ) override;
|
|
||||||
ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
|
ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
|
||||||
RSCINST * pDflt,
|
RSCINST * pDflt,
|
||||||
RSCVAR nVarType, SfxSlotInfo nMask,
|
RSCVAR nVarType, SfxSlotInfo nMask,
|
||||||
|
@@ -38,7 +38,6 @@ class RscCont;
|
|||||||
class RscCmdLine;
|
class RscCmdLine;
|
||||||
enum class KeyFuncType : sal_Int32;
|
enum class KeyFuncType : sal_Int32;
|
||||||
enum class MenuItemBits : sal_Int16;
|
enum class MenuItemBits : sal_Int16;
|
||||||
enum class SfxStyleFamily;
|
|
||||||
enum class MapUnit;
|
enum class MapUnit;
|
||||||
|
|
||||||
struct WriteRcContext
|
struct WriteRcContext
|
||||||
@@ -84,7 +83,6 @@ class RscTypCont
|
|||||||
void SETCONST( RscConst *, Atom, sal_uInt32 );
|
void SETCONST( RscConst *, Atom, sal_uInt32 );
|
||||||
inline void SETCONST( RscConst *p1, const char * p2, KeyFuncType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
|
inline void SETCONST( RscConst *p1, const char * p2, KeyFuncType p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
|
||||||
inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
|
inline void SETCONST( RscConst *p1, Atom p2, MenuItemBits p3 ) { SETCONST(p1, p2, static_cast<sal_uInt32>(p3)); }
|
||||||
inline void SETCONST( RscConst *p1, const char * p2, SfxStyleFamily p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); }
|
|
||||||
inline void SETCONST( RscConst *p1, const char * p2, MapUnit p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); }
|
inline void SETCONST( RscConst *p1, const char * p2, MapUnit p3 ) { SETCONST(p1, p2, static_cast<sal_uInt16>(p3)); }
|
||||||
RscEnum * InitFieldUnitsType();
|
RscEnum * InitFieldUnitsType();
|
||||||
RscEnum * InitColor();
|
RscEnum * InitColor();
|
||||||
@@ -111,12 +109,6 @@ class RscTypCont
|
|||||||
RscTop * InitClassMenuItem( RscTop * pSuper );
|
RscTop * InitClassMenuItem( RscTop * pSuper );
|
||||||
RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem );
|
RscTop * InitClassMenu( RscTop * pSuper, RscTop * pMenuItem );
|
||||||
|
|
||||||
RscTop * InitClassSfxStyleFamilyItem( RscTop * pSuper,
|
|
||||||
RscTop * pClassBitmap,
|
|
||||||
RscTop * pClassImage,
|
|
||||||
RscArray * pStrLst );
|
|
||||||
RscTop * InitClassSfxTemplateDialog( RscTop * pSuper,
|
|
||||||
RscTop * pStyleFamily );
|
|
||||||
RscTop * InitClassSfxSlotInfo( RscTop * pSuper );
|
RscTop * InitClassSfxSlotInfo( RscTop * pSuper );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -81,11 +81,6 @@ public:
|
|||||||
virtual ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
|
virtual ERRTYPE SetRef( const RSCINST & rInst, const RscId & rRefId );
|
||||||
|
|
||||||
// sets the variable
|
// sets the variable
|
||||||
virtual ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
|
|
||||||
RSCINST * pDflt,
|
|
||||||
RSCVAR nVarType, SfxStyleItem nMask,
|
|
||||||
Atom nDataBaseName = InvalidAtom );
|
|
||||||
|
|
||||||
virtual ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
|
virtual ERRTYPE SetVariable( Atom nVarName, RscTop * pClass,
|
||||||
RSCINST * pDflt,
|
RSCINST * pDflt,
|
||||||
RSCVAR nVarType, SfxSlotInfo nMask,
|
RSCVAR nVarType, SfxSlotInfo nMask,
|
||||||
|
@@ -364,80 +364,6 @@ RscTop * RscTypCont::InitClassMenu( RscTop * pSuper,
|
|||||||
return pClassMenu;
|
return pClassMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
RscTop * RscTypCont::InitClassSfxStyleFamilyItem( RscTop * pSuper,
|
|
||||||
RscTop * pClassBitmap,
|
|
||||||
RscTop * pClassImage,
|
|
||||||
RscArray * pStrLst )
|
|
||||||
{
|
|
||||||
Atom nId;
|
|
||||||
RscTop * pClassSfxFamilyStyleItem;
|
|
||||||
|
|
||||||
// initialize class
|
|
||||||
nId = pHS->getID( "SfxStyleFamilyItem" );
|
|
||||||
pClassSfxFamilyStyleItem = new RscClass( nId, RSC_SFX_STYLE_FAMILY_ITEM, pSuper );
|
|
||||||
aNmTb.Put( nId, CLASSNAME, pClassSfxFamilyStyleItem );
|
|
||||||
|
|
||||||
nId = aNmTb.Put( "FilterList", VARNAME );
|
|
||||||
pClassSfxFamilyStyleItem->SetVariable( nId, pStrLst, nullptr, 0,
|
|
||||||
SfxStyleItem::List );
|
|
||||||
nId = aNmTb.Put( "StyleBitmap", VARNAME );
|
|
||||||
pClassSfxFamilyStyleItem->SetVariable( nId, pClassBitmap, nullptr, 0,
|
|
||||||
SfxStyleItem::Bitmap );
|
|
||||||
nId = aNmTb.Put( "Text", VARNAME );
|
|
||||||
pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, nullptr, 0,
|
|
||||||
SfxStyleItem::Text );
|
|
||||||
nId = aNmTb.Put( "HelpText", VARNAME );
|
|
||||||
pClassSfxFamilyStyleItem->SetVariable( nId, &aLangString, nullptr, 0,
|
|
||||||
SfxStyleItem::HelpText );
|
|
||||||
{
|
|
||||||
RscEnum * pSfxStyleFamily;
|
|
||||||
pSfxStyleFamily = new RscEnum( pHS->getID( "StyleFamily" ),
|
|
||||||
RSC_NOTYPE );
|
|
||||||
|
|
||||||
SETCONST( pSfxStyleFamily, "SfxStyleFamily::Para", SfxStyleFamily::Para );
|
|
||||||
SETCONST( pSfxStyleFamily, "SfxStyleFamily::Char", SfxStyleFamily::Char );
|
|
||||||
SETCONST( pSfxStyleFamily, "SfxStyleFamily::Frame",SfxStyleFamily::Frame);
|
|
||||||
SETCONST( pSfxStyleFamily, "SfxStyleFamily::Page", SfxStyleFamily::Page );
|
|
||||||
SETCONST( pSfxStyleFamily, "SfxStyleFamily::Pseudo", SfxStyleFamily::Pseudo );
|
|
||||||
SETCONST( pSfxStyleFamily, "SfxStyleFamily::Table", SfxStyleFamily::Table );
|
|
||||||
aBaseLst.push_back( pSfxStyleFamily );
|
|
||||||
|
|
||||||
nId = aNmTb.Put( "StyleFamily", VARNAME );
|
|
||||||
pClassSfxFamilyStyleItem->SetVariable( nId, pSfxStyleFamily, nullptr, 0,
|
|
||||||
SfxStyleItem::StyleFamily );
|
|
||||||
}
|
|
||||||
nId = aNmTb.Put( "StyleImage", VARNAME );
|
|
||||||
pClassSfxFamilyStyleItem->SetVariable( nId, pClassImage, nullptr, 0,
|
|
||||||
SfxStyleItem::Image );
|
|
||||||
return pClassSfxFamilyStyleItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
RscTop * RscTypCont::InitClassSfxTemplateDialog( RscTop * pSuper,
|
|
||||||
RscTop * pClassFamilyStyleItem )
|
|
||||||
{
|
|
||||||
Atom nId;
|
|
||||||
RscTop * pClassSfxTemplateDialog;
|
|
||||||
|
|
||||||
// initialize class
|
|
||||||
nId = pHS->getID( "SfxStyleFamilies" );
|
|
||||||
pClassSfxTemplateDialog = new RscClass( nId, RSC_SFX_STYLE_FAMILIES, pSuper );
|
|
||||||
aNmTb.Put( nId, CLASSNAME, pClassSfxTemplateDialog );
|
|
||||||
|
|
||||||
// initialize variables
|
|
||||||
{
|
|
||||||
RscCont * pCont;
|
|
||||||
|
|
||||||
aBaseLst.push_back(
|
|
||||||
pCont = new RscCont( pHS->getID( "ContFamilyStyleItem" ), RSC_NOTYPE )
|
|
||||||
);
|
|
||||||
pCont->SetTypeClass( pClassFamilyStyleItem );
|
|
||||||
nId = aNmTb.Put( "StyleFamilyList", VARNAME );
|
|
||||||
pClassSfxTemplateDialog->SetVariable( nId, pCont );
|
|
||||||
}
|
|
||||||
|
|
||||||
return pClassSfxTemplateDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
RscTop * RscTypCont::InitClassSfxSlotInfo( RscTop * pSuper )
|
RscTop * RscTypCont::InitClassSfxSlotInfo( RscTop * pSuper )
|
||||||
{
|
{
|
||||||
Atom nId;
|
Atom nId;
|
||||||
|
@@ -168,16 +168,6 @@ void RscTypCont::Init()
|
|||||||
(sal_uInt32)RscMenuItem::Menu );
|
(sal_uInt32)RscMenuItem::Menu );
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
RscTop* pClassSfxStyleFamilyItem = InitClassSfxStyleFamilyItem( pClassMgr,
|
|
||||||
pClassBitmap,
|
|
||||||
pClassImage,
|
|
||||||
pLangStringLongTupelList );
|
|
||||||
pRoot->Insert( pClassSfxStyleFamilyItem );
|
|
||||||
|
|
||||||
RscTop* pClassSfxTemplateDialog = InitClassSfxTemplateDialog( pClassMgr,
|
|
||||||
pClassSfxStyleFamilyItem );
|
|
||||||
pRoot->Insert( pClassSfxTemplateDialog );
|
|
||||||
|
|
||||||
RscTop* pClassSfxSlotInfo = InitClassSfxSlotInfo( pClassMgr );
|
RscTop* pClassSfxSlotInfo = InitClassSfxSlotInfo( pClassMgr );
|
||||||
pRoot->Insert( pClassSfxSlotInfo );
|
pRoot->Insert( pClassSfxSlotInfo );
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,6 @@
|
|||||||
|
|
||||||
ObjectStack S;
|
ObjectStack S;
|
||||||
RscTop * pCurClass;
|
RscTop * pCurClass;
|
||||||
SfxStyleItem nCurMask;
|
|
||||||
char szErrBuf[ 100 ];
|
char szErrBuf[ 100 ];
|
||||||
|
|
||||||
RSCINST GetVarInst( const RSCINST & rInst, const char * pVarName )
|
RSCINST GetVarInst( const RSCINST & rInst, const char * pVarName )
|
||||||
@@ -286,13 +285,10 @@ RSCINST GetFirstTupelEle( const RSCINST & rTop )
|
|||||||
%type <macrostruct> id_expression
|
%type <macrostruct> id_expression
|
||||||
%type <string> string_multiline
|
%type <string> string_multiline
|
||||||
|
|
||||||
%type <pClass> type
|
|
||||||
%type <pClass> type_base
|
|
||||||
%type <header> class_header_body
|
%type <header> class_header_body
|
||||||
%type <header> class_header
|
%type <header> class_header
|
||||||
%type <header> var_header_class
|
%type <header> var_header_class
|
||||||
%type <copyref> copy_ref
|
%type <copyref> copy_ref
|
||||||
%type <ushort> type_flags
|
|
||||||
|
|
||||||
|
|
||||||
%left '|'
|
%left '|'
|
||||||
@@ -394,106 +390,6 @@ resource_definition
|
|||||||
rtl_freeMemory( pMem );
|
rtl_freeMemory( pMem );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
| new_class_definition_header '{' new_class_definition_body '}' ';'
|
|
||||||
| new_class_definition_header ';'
|
|
||||||
;
|
|
||||||
|
|
||||||
new_class_definition_header
|
|
||||||
: CLASS SYMBOL id_expression ':' CLASSNAME
|
|
||||||
{
|
|
||||||
sal_Int32 lType;
|
|
||||||
|
|
||||||
$3.Evaluate( &lType );
|
|
||||||
|
|
||||||
// Klasse anlegen
|
|
||||||
Atom nId = pHS->getID( $2 );
|
|
||||||
pCurClass = new RscClass( nId, lType, $5 );
|
|
||||||
nCurMask = SfxStyleItem::List;
|
|
||||||
pTC->aNmTb.Put( nId, CLASSNAME, pCurClass );
|
|
||||||
pTC->GetRoot()->Insert( pCurClass );
|
|
||||||
}
|
|
||||||
| CLASS CLASSNAME id_expression ':' CLASSNAME
|
|
||||||
{
|
|
||||||
pCurClass = $2;
|
|
||||||
nCurMask = SfxStyleItem::List;
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
new_class_definition_body
|
|
||||||
:
|
|
||||||
| property_definition ';' new_class_definition_body
|
|
||||||
;
|
|
||||||
|
|
||||||
property_definition
|
|
||||||
: type_flags type SYMBOL
|
|
||||||
{
|
|
||||||
// Variable anlegen
|
|
||||||
Atom nId = pTC->aNmTb.Put( $3, VARNAME );
|
|
||||||
pCurClass->SetVariable( nId, $2, nullptr, $1, nCurMask );
|
|
||||||
nCurMask = SfxStyleItem(((int)nCurMask) << 1);
|
|
||||||
}
|
|
||||||
| type_flags type VARNAME
|
|
||||||
{
|
|
||||||
pCurClass->SetVariable( $3, $2, nullptr, $1, nCurMask );
|
|
||||||
nCurMask = SfxStyleItem(((int)nCurMask) << 1);
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
type_flags
|
|
||||||
: type_flags EXTENDABLE
|
|
||||||
{
|
|
||||||
$$ = $1 | VAR_EXTENDABLE;
|
|
||||||
}
|
|
||||||
| type_flags WRITEIFSET
|
|
||||||
{
|
|
||||||
$$ = $1 | VAR_SVDYNAMIC;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
{
|
|
||||||
$$ = 0;
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
type
|
|
||||||
: type_base
|
|
||||||
{
|
|
||||||
$$ = $1;
|
|
||||||
}
|
|
||||||
| type_base '[' ']'
|
|
||||||
{
|
|
||||||
if( $1 )
|
|
||||||
{
|
|
||||||
rtl::OString aTypeName = rtl::OStringBuffer(pHS->getString($1->GetId())).
|
|
||||||
append("[]").makeStringAndClear();
|
|
||||||
$$ = pTC->SearchType( pHS->getID( aTypeName.getStr(), true ) );
|
|
||||||
if( !$$ )
|
|
||||||
{
|
|
||||||
RscCont * pCont;
|
|
||||||
pCont = new RscCont( pHS->getID( aTypeName.getStr() ), RSC_NOTYPE );
|
|
||||||
pCont->SetTypeClass( $1 );
|
|
||||||
pTC->InsertType( pCont );
|
|
||||||
$$ = pCont;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$$ = nullptr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
;
|
|
||||||
|
|
||||||
type_base
|
|
||||||
: CLASSNAME
|
|
||||||
{
|
|
||||||
$$ = $1;
|
|
||||||
}
|
|
||||||
| SYMBOL
|
|
||||||
{
|
|
||||||
RscTop * pType = pTC->SearchType( pHS->getID( $1, true ) );
|
|
||||||
if( !pType )
|
|
||||||
pTC->pEH->Error( ERR_NOTYPE, pCurClass, RscId() );
|
|
||||||
$$ = pType;
|
|
||||||
}
|
|
||||||
;
|
;
|
||||||
|
|
||||||
class_definition
|
class_definition
|
||||||
|
@@ -277,16 +277,6 @@ ERRTYPE RscClass::SetVariable( Atom nVarName,
|
|||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERRTYPE RscClass::SetVariable( Atom nVarName,
|
|
||||||
RscTop * pClass,
|
|
||||||
RSCINST * pDflt,
|
|
||||||
RSCVAR nVarType,
|
|
||||||
SfxStyleItem nMask,
|
|
||||||
Atom nDataBaseName)
|
|
||||||
{
|
|
||||||
return SetVariable(nVarName, pClass, pDflt, nVarType, (sal_uInt32)nMask, nDataBaseName);
|
|
||||||
}
|
|
||||||
|
|
||||||
ERRTYPE RscClass::SetVariable( Atom nVarName,
|
ERRTYPE RscClass::SetVariable( Atom nVarName,
|
||||||
RscTop * pClass,
|
RscTop * pClass,
|
||||||
RSCINST * pDflt,
|
RSCINST * pDflt,
|
||||||
|
@@ -102,17 +102,6 @@ ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass,
|
|||||||
return ERR_UNKNOWN_METHOD;
|
return ERR_UNKNOWN_METHOD;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass,
|
|
||||||
RSCINST * pDflt, RSCVAR nVarType, SfxStyleItem nMask,
|
|
||||||
Atom nDataBaseName )
|
|
||||||
{
|
|
||||||
if( pSuperClass )
|
|
||||||
return pSuperClass->SetVariable( nVarName, pClass, pDflt,
|
|
||||||
nVarType, nMask, nDataBaseName );
|
|
||||||
else
|
|
||||||
return ERR_UNKNOWN_METHOD;
|
|
||||||
}
|
|
||||||
|
|
||||||
ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass,
|
ERRTYPE RscTop::SetVariable( Atom nVarName, RscTop * pClass,
|
||||||
RSCINST * pDflt, RSCVAR nVarType, SfxSlotInfo nMask,
|
RSCINST * pDflt, RSCVAR nVarType, SfxSlotInfo nMask,
|
||||||
Atom nDataBaseName )
|
Atom nDataBaseName )
|
||||||
|
Reference in New Issue
Block a user