Kaydet (Commit) d650d404 authored tarafından Tor Lillqvist's avatar Tor Lillqvist Kaydeden (comit) Tor Lillqvist

Deduplicate CTB, TBC and CTBWrapper (for disable-dynloading)

Change-Id: I0e9895ca59fa75958107df2cbf4348214df52664
üst 45948e12
...@@ -343,7 +343,7 @@ void ImportExcel8::ReadBasic( void ) ...@@ -343,7 +343,7 @@ void ImportExcel8::ReadBasic( void )
SvStorageStreamRef xXCB = xRootStrg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "XCB" ) ), STREAM_STD_READ | STREAM_NOCREATE ); SvStorageStreamRef xXCB = xRootStrg->OpenSotStream( String( RTL_CONSTASCII_USTRINGPARAM( "XCB" ) ), STREAM_STD_READ | STREAM_NOCREATE );
if ( xXCB.Is()|| SVSTREAM_OK == xXCB->GetError() ) if ( xXCB.Is()|| SVSTREAM_OK == xXCB->GetError() )
{ {
CTBWrapper wrapper; ScCTBWrapper wrapper;
if ( wrapper.Read( *xXCB ) ) if ( wrapper.Read( *xXCB ) )
{ {
#if OSL_DEBUG_LEVEL > 1 #if OSL_DEBUG_LEVEL > 1
......
...@@ -94,17 +94,17 @@ CTBS::CTBS() : bSignature(0), bVersion(0), reserved1(0), reserved2(0), reserved3 ...@@ -94,17 +94,17 @@ CTBS::CTBS() : bSignature(0), bVersion(0), reserved1(0), reserved2(0), reserved3
{ {
} }
CTB::CTB() : nViews( 0 ), ectbid(0) ScCTB::ScCTB() : nViews( 0 ), ectbid(0)
{ {
} }
CTB::CTB(sal_uInt16 nNum ) : nViews( nNum ), ectbid(0) ScCTB::ScCTB(sal_uInt16 nNum ) : nViews( nNum ), ectbid(0)
{ {
} }
bool CTB::Read( SvStream &rS ) bool ScCTB::Read( SvStream &rS )
{ {
OSL_TRACE("CTB::Read() stream pos 0x%x", rS.Tell() ); OSL_TRACE("ScCTB::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell(); nOffSet = rS.Tell();
tb.Read( rS ); tb.Read( rS );
for ( sal_uInt16 index = 0; index < nViews; ++index ) for ( sal_uInt16 index = 0; index < nViews; ++index )
...@@ -117,17 +117,17 @@ bool CTB::Read( SvStream &rS ) ...@@ -117,17 +117,17 @@ bool CTB::Read( SvStream &rS )
for ( sal_Int16 index = 0; index < tb.getcCL(); ++index ) for ( sal_Int16 index = 0; index < tb.getcCL(); ++index )
{ {
TBC aTBC; ScTBC aTBC;
aTBC.Read( rS ); aTBC.Read( rS );
rTBC.push_back( aTBC ); rTBC.push_back( aTBC );
} }
return true; return true;
} }
void CTB::Print( FILE* fp ) void ScCTB::Print( FILE* fp )
{ {
Indent a; Indent a;
indent_printf( fp, "[ 0x%x ] CTB -- dump\n", nOffSet ); indent_printf( fp, "[ 0x%x ] ScCTB -- dump\n", nOffSet );
indent_printf( fp, " nViews 0x%x\n", nViews); indent_printf( fp, " nViews 0x%x\n", nViews);
tb.Print( fp ); tb.Print( fp );
...@@ -141,25 +141,25 @@ void CTB::Print( FILE* fp ) ...@@ -141,25 +141,25 @@ void CTB::Print( FILE* fp )
it->Print( fp ); it->Print( fp );
} }
indent_printf( fp, " ectbid 0x%x\n", ectbid); indent_printf( fp, " ectbid 0x%x\n", ectbid);
std::vector<TBC>::iterator it_end = rTBC.end(); std::vector<ScTBC>::iterator it_end = rTBC.end();
counter = 0; counter = 0;
for ( std::vector<TBC>::iterator it = rTBC.begin(); it != it_end; ++it ) for ( std::vector<ScTBC>::iterator it = rTBC.begin(); it != it_end; ++it )
{ {
indent_printf( fp, " TBC [%d]\n", counter++); indent_printf( fp, " ScTBC [%d]\n", counter++);
Indent c; Indent c;
it->Print( fp ); it->Print( fp );
} }
} }
bool CTB::IsMenuToolbar() bool ScCTB::IsMenuToolbar()
{ {
return tb.IsMenuToolbar(); return tb.IsMenuToolbar();
} }
bool CTB::ImportMenuTB( CTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& xMenuDesc, CustomToolBarImportHelper& helper ) bool ScCTB::ImportMenuTB( ScCTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& xMenuDesc, CustomToolBarImportHelper& helper )
{ {
sal_Int32 index = 0; sal_Int32 index = 0;
for ( std::vector< TBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it, ++index ) for ( std::vector< ScTBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it, ++index )
{ {
if ( !it->ImportToolBarControl( rWrapper, xMenuDesc, helper, IsMenuToolbar() ) ) if ( !it->ImportToolBarControl( rWrapper, xMenuDesc, helper, IsMenuToolbar() ) )
return false; return false;
...@@ -167,7 +167,7 @@ bool CTB::ImportMenuTB( CTBWrapper& rWrapper, const css::uno::Reference< css::co ...@@ -167,7 +167,7 @@ bool CTB::ImportMenuTB( CTBWrapper& rWrapper, const css::uno::Reference< css::co
return true; return true;
} }
bool CTB::ImportCustomToolBar( CTBWrapper& rWrapper, CustomToolBarImportHelper& helper ) bool ScCTB::ImportCustomToolBar( ScCTBWrapper& rWrapper, CustomToolBarImportHelper& helper )
{ {
static rtl::OUString sToolbarPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/custom_" ) ); static rtl::OUString sToolbarPrefix( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/custom_" ) );
...@@ -186,7 +186,7 @@ bool CTB::ImportCustomToolBar( CTBWrapper& rWrapper, CustomToolBarImportHelper& ...@@ -186,7 +186,7 @@ bool CTB::ImportCustomToolBar( CTBWrapper& rWrapper, CustomToolBarImportHelper&
xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UIName") ), uno::makeAny( name.getString() ) ); xProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("UIName") ), uno::makeAny( name.getString() ) );
rtl::OUString sToolBarName = sToolbarPrefix.concat( name.getString() ); rtl::OUString sToolBarName = sToolbarPrefix.concat( name.getString() );
for ( std::vector< TBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it ) for ( std::vector< ScTBC >::iterator it = rTBC.begin(); it != rTBC.end(); ++it )
{ {
if ( !it->ImportToolBarControl( rWrapper, xIndexContainer, helper, IsMenuToolbar() ) ) if ( !it->ImportToolBarControl( rWrapper, xIndexContainer, helper, IsMenuToolbar() ) )
return false; return false;
...@@ -236,14 +236,14 @@ void CTBS::Print( FILE* fp ) ...@@ -236,14 +236,14 @@ void CTBS::Print( FILE* fp )
indent_printf( fp, " ictbView 0x%x\n", ictbView ); indent_printf( fp, " ictbView 0x%x\n", ictbView );
} }
TBC::TBC() ScTBC::ScTBC()
{ {
} }
bool bool
TBC::Read(SvStream &rS) ScTBC::Read(SvStream &rS)
{ {
OSL_TRACE("TBC::Read() stream pos 0x%x", rS.Tell() ); OSL_TRACE("ScTBC::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell(); nOffSet = rS.Tell();
if ( !tbch.Read( rS ) ) if ( !tbch.Read( rS ) )
return false; return false;
...@@ -266,10 +266,10 @@ TBC::Read(SvStream &rS) ...@@ -266,10 +266,10 @@ TBC::Read(SvStream &rS)
void void
TBC::Print(FILE* fp) ScTBC::Print(FILE* fp)
{ {
Indent a; Indent a;
indent_printf( fp, "[ 0x%x ] TBC -- dump\n", nOffSet ); indent_printf( fp, "[ 0x%x ] ScTBC -- dump\n", nOffSet );
tbch.Print( fp ); tbch.Print( fp );
if ( tbcCmd.get() ) if ( tbcCmd.get() )
tbcCmd->Print( fp ); tbcCmd->Print( fp );
...@@ -277,7 +277,7 @@ TBC::Print(FILE* fp) ...@@ -277,7 +277,7 @@ TBC::Print(FILE* fp)
tbcd->Print( fp ); tbcd->Print( fp );
} }
bool TBC::ImportToolBarControl( CTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuToolbar ) bool ScTBC::ImportToolBarControl( ScCTBWrapper& rWrapper, const css::uno::Reference< css::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuToolbar )
{ {
// how to identify built-in-command ? // how to identify built-in-command ?
// bool bBuiltin = false; // bool bBuiltin = false;
...@@ -290,11 +290,11 @@ bool TBC::ImportToolBarControl( CTBWrapper& rWrapper, const css::uno::Reference< ...@@ -290,11 +290,11 @@ bool TBC::ImportToolBarControl( CTBWrapper& rWrapper, const css::uno::Reference<
TBCMenuSpecific* pMenu = tbcd->getMenuSpecific(); TBCMenuSpecific* pMenu = tbcd->getMenuSpecific();
if ( pMenu ) if ( pMenu )
{ {
// search for CTB with the appropriate name ( it contains the // search for ScCTB with the appropriate name ( it contains the
// menu items, although we cannot import ( or create ) a menu on // menu items, although we cannot import ( or create ) a menu on
// a custom toolbar we can import the menu items in a separate // a custom toolbar we can import the menu items in a separate
// toolbar ( better than nothing ) // toolbar ( better than nothing )
CTB* pCustTB = rWrapper.GetCustomizationData( pMenu->Name() ); ScCTB* pCustTB = rWrapper.GetCustomizationData( pMenu->Name() );
if ( pCustTB ) if ( pCustTB )
{ {
uno::Reference< container::XIndexContainer > xMenuDesc; uno::Reference< container::XIndexContainer > xMenuDesc;
...@@ -365,24 +365,24 @@ bool TBCCmd::Read( SvStream &rS ) ...@@ -365,24 +365,24 @@ bool TBCCmd::Read( SvStream &rS )
return true; return true;
} }
CTBWrapper::CTBWrapper() ScCTBWrapper::ScCTBWrapper()
{ {
} }
CTBWrapper::~CTBWrapper() ScCTBWrapper::~ScCTBWrapper()
{ {
} }
bool bool
CTBWrapper::Read( SvStream &rS) ScCTBWrapper::Read( SvStream &rS)
{ {
OSL_TRACE("CTBWrapper::Read() stream pos 0x%x", rS.Tell() ); OSL_TRACE("ScCTBWrapper::Read() stream pos 0x%x", rS.Tell() );
nOffSet = rS.Tell(); nOffSet = rS.Tell();
if ( !ctbSet.Read( rS ) ) if ( !ctbSet.Read( rS ) )
return false; return false;
for ( sal_uInt16 index = 0; index < ctbSet.ctb; ++index ) for ( sal_uInt16 index = 0; index < ctbSet.ctb; ++index )
{ {
CTB aCTB( ctbSet.ctbViews ); ScCTB aCTB( ctbSet.ctbViews );
if ( !aCTB.Read( rS ) ) if ( !aCTB.Read( rS ) )
return false; return false;
rCTB.push_back( aCTB ); rCTB.push_back( aCTB );
...@@ -391,23 +391,23 @@ CTBWrapper::Read( SvStream &rS) ...@@ -391,23 +391,23 @@ CTBWrapper::Read( SvStream &rS)
} }
void void
CTBWrapper::Print( FILE* fp ) ScCTBWrapper::Print( FILE* fp )
{ {
Indent a; Indent a;
indent_printf( fp, "[ 0x%x ] CTBWrapper -- dump\n", nOffSet ); indent_printf( fp, "[ 0x%x ] ScCTBWrapper -- dump\n", nOffSet );
ctbSet.Print( fp ); ctbSet.Print( fp );
std::vector<CTB>::iterator it_end = rCTB.end(); std::vector<ScCTB>::iterator it_end = rCTB.end();
for ( std::vector<CTB>::iterator it = rCTB.begin(); it != it_end; ++it ) for ( std::vector<ScCTB>::iterator it = rCTB.begin(); it != it_end; ++it )
{ {
Indent b; Indent b;
it->Print( fp ); it->Print( fp );
} }
} }
CTB* CTBWrapper::GetCustomizationData( const rtl::OUString& sTBName ) ScCTB* ScCTBWrapper::GetCustomizationData( const rtl::OUString& sTBName )
{ {
CTB* pCTB = NULL; ScCTB* pCTB = NULL;
for ( std::vector< CTB >::iterator it = rCTB.begin(); it != rCTB.end(); ++it ) for ( std::vector< ScCTB >::iterator it = rCTB.begin(); it != rCTB.end(); ++it )
{ {
if ( it->GetName().equals( sTBName ) ) if ( it->GetName().equals( sTBName ) )
{ {
...@@ -418,7 +418,7 @@ CTB* CTBWrapper::GetCustomizationData( const rtl::OUString& sTBName ) ...@@ -418,7 +418,7 @@ CTB* CTBWrapper::GetCustomizationData( const rtl::OUString& sTBName )
return pCTB; return pCTB;
} }
bool CTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh ) bool ScCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
{ {
if(rCTB.empty()) if(rCTB.empty())
return true; return true;
...@@ -426,8 +426,8 @@ bool CTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh ) ...@@ -426,8 +426,8 @@ bool CTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::ModuleUIConfigurationManagerSupplier::create(xContext) ); uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::ModuleUIConfigurationManagerSupplier::create(xContext) );
std::vector<CTB>::iterator it_end = rCTB.end(); std::vector<ScCTB>::iterator it_end = rCTB.end();
for ( std::vector<CTB>::iterator it = rCTB.begin(); it != it_end; ++it ) for ( std::vector<ScCTB>::iterator it = rCTB.begin(); it != it_end; ++it )
{ {
// for each customtoolbar // for each customtoolbar
CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument" ) ) ) ); CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument" ) ) ) );
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
namespace css = ::com::sun::star; namespace css = ::com::sun::star;
class CTBWrapper; class ScCTBWrapper;
// hmm I don't normally use these packed structures // hmm I don't normally use these packed structures
// but.. hey always good to do something different // but.. hey always good to do something different
class TBCCmd : public TBBase class TBCCmd : public TBBase
...@@ -52,36 +52,36 @@ public: ...@@ -52,36 +52,36 @@ public:
void Print(FILE* fp); void Print(FILE* fp);
}; };
class TBC : public TBBase class ScTBC : public TBBase
{ {
TBCHeader tbch; TBCHeader tbch;
boost::shared_ptr<TBCCmd> tbcCmd; // optional boost::shared_ptr<TBCCmd> tbcCmd; // optional
boost::shared_ptr<TBCData> tbcd; boost::shared_ptr<TBCData> tbcd;
public: public:
TBC(); ScTBC();
~TBC(){} ~ScTBC(){}
void Print( FILE* ); void Print( FILE* );
bool Read(SvStream &rS); bool Read(SvStream &rS);
bool ImportToolBarControl( CTBWrapper&, const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar ); bool ImportToolBarControl( ScCTBWrapper&, const com::sun::star::uno::Reference< com::sun::star::container::XIndexContainer >& toolbarcontainer, CustomToolBarImportHelper& helper, bool bIsMenuBar );
}; };
class CTB : public TBBase class ScCTB : public TBBase
{ {
sal_uInt16 nViews; sal_uInt16 nViews;
TB tb; TB tb;
std::vector<TBVisualData> rVisualData; std::vector<TBVisualData> rVisualData;
sal_uInt32 ectbid; sal_uInt32 ectbid;
std::vector< TBC > rTBC; std::vector< ScTBC > rTBC;
bool ImportCustomToolBar_Impl( CTBWrapper&, CustomToolBarImportHelper& ); bool ImportCustomToolBar_Impl( ScCTBWrapper&, CustomToolBarImportHelper& );
public: public:
CTB(); ScCTB();
CTB(sal_uInt16); ScCTB(sal_uInt16);
~CTB(){} ~ScCTB(){}
void Print( FILE* ); void Print( FILE* );
bool Read(SvStream &rS); bool Read(SvStream &rS);
bool IsMenuToolbar(); bool IsMenuToolbar();
bool ImportCustomToolBar( CTBWrapper&, CustomToolBarImportHelper& ); bool ImportCustomToolBar( ScCTBWrapper&, CustomToolBarImportHelper& );
bool ImportMenuTB( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& ); bool ImportMenuTB( ScCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
rtl::OUString GetName() { return tb.getName().getString(); } rtl::OUString GetName() { return tb.getName().getString(); }
...@@ -106,19 +106,19 @@ public: ...@@ -106,19 +106,19 @@ public:
bool Read(SvStream &rS); bool Read(SvStream &rS);
}; };
class CTBWrapper : public TBBase class ScCTBWrapper : public TBBase
{ {
CTBS ctbSet; CTBS ctbSet;
std::vector< CTB > rCTB; std::vector< ScCTB > rCTB;
public: public:
CTBWrapper(); ScCTBWrapper();
~CTBWrapper(); ~ScCTBWrapper();
bool Read(SvStream &rS); bool Read(SvStream &rS);
void Print( FILE* ); void Print( FILE* );
bool ImportCustomToolBar( SfxObjectShell& rDocSh ); bool ImportCustomToolBar( SfxObjectShell& rDocSh );
CTB* GetCustomizationData( const rtl::OUString& name ); ScCTB* GetCustomizationData( const rtl::OUString& name );
}; };
......
...@@ -45,22 +45,22 @@ public: ...@@ -45,22 +45,22 @@ public:
void Print( FILE* fp ); void Print( FILE* fp );
}; };
class CTBWrapper; class SwCTBWrapper;
class TBC : public TBBase class SwTBC : public TBBase
{ {
TBCHeader tbch; TBCHeader tbch;
boost::shared_ptr< sal_uInt32 > cid; // optional boost::shared_ptr< sal_uInt32 > cid; // optional
boost::shared_ptr<TBCData> tbcd; boost::shared_ptr<TBCData> tbcd;
public: public:
TBC(); SwTBC();
~TBC(); ~SwTBC();
bool Read(SvStream &rS); bool Read(SvStream &rS);
void Print( FILE* ); void Print( FILE* );
bool ImportToolBarControl( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper&, bool ); bool ImportToolBarControl( SwCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper&, bool );
rtl::OUString GetCustomText(); rtl::OUString GetCustomText();
}; };
class CTB : public TBBase class SwCTB : public TBBase
{ {
Xst name; Xst name;
sal_Int32 cbTBData; sal_Int32 cbTBData;
...@@ -70,18 +70,18 @@ class CTB : public TBBase ...@@ -70,18 +70,18 @@ class CTB : public TBBase
sal_uInt16 reserved; sal_uInt16 reserved;
sal_uInt16 unused; sal_uInt16 unused;
sal_Int32 cCtls; sal_Int32 cCtls;
std::vector< TBC > rTBC; std::vector< SwTBC > rTBC;
CTB(const CTB&); SwCTB(const SwCTB&);
CTB& operator = ( const CTB&); SwCTB& operator = ( const SwCTB&);
public: public:
CTB(); SwCTB();
~CTB(); ~SwCTB();
bool Read(SvStream &rS); bool Read(SvStream &rS);
void Print( FILE* fp ); void Print( FILE* fp );
bool IsMenuToolbar(); bool IsMenuToolbar();
bool ImportCustomToolBar( CTBWrapper&, CustomToolBarImportHelper& ); bool ImportCustomToolBar( SwCTBWrapper&, CustomToolBarImportHelper& );
bool ImportMenuTB( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& ); bool ImportMenuTB( SwCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
rtl::OUString GetName() { return tb.getName().getString(); } rtl::OUString GetName() { return tb.getName().getString(); }
}; };
...@@ -124,32 +124,32 @@ public: ...@@ -124,32 +124,32 @@ public:
bool Read(SvStream &rS); bool Read(SvStream &rS);
}; };
class CTBWrapper; class SwCTBWrapper;
class Customization : public TBBase class Customization : public TBBase
{ {
friend class CTBWrapper; friend class SwCTBWrapper;
sal_Int32 tbidForTBD; sal_Int32 tbidForTBD;
sal_uInt16 reserved1; sal_uInt16 reserved1;
sal_Int16 ctbds; sal_Int16 ctbds;
CTBWrapper* pWrapper; SwCTBWrapper* pWrapper;
boost::shared_ptr< CTB > customizationDataCTB; boost::shared_ptr< SwCTB > customizationDataCTB;
std::vector< TBDelta > customizationDataTBDelta; std::vector< TBDelta > customizationDataTBDelta;
bool bIsDroppedMenuTB; bool bIsDroppedMenuTB;
bool ImportMenu( CTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& ); bool ImportMenu( SwCTBWrapper&, const css::uno::Reference< css::container::XIndexContainer >&, CustomToolBarImportHelper& );
public: public:
Customization( CTBWrapper* rapper ); Customization( SwCTBWrapper* rapper );
~Customization(); ~Customization();
bool Read(SvStream &rS); bool Read(SvStream &rS);
bool ImportCustomToolBar( CTBWrapper&, CustomToolBarImportHelper& ); bool ImportCustomToolBar( SwCTBWrapper&, CustomToolBarImportHelper& );
bool ImportMenu( CTBWrapper&, CustomToolBarImportHelper& ); bool ImportMenu( SwCTBWrapper&, CustomToolBarImportHelper& );
void Print( FILE* ); void Print( FILE* );
sal_Int32 GetTBIDForTB(){ return tbidForTBD; } sal_Int32 GetTBIDForTB(){ return tbidForTBD; }
CTB* GetCustomizationData() { return customizationDataCTB.get(); }; SwCTB* GetCustomizationData() { return customizationDataCTB.get(); };
}; };
class SfxObjectShell; class SfxObjectShell;
class CTBWrapper : public Tcg255SubStruct class SwCTBWrapper : public Tcg255SubStruct
{ {
// reserved1 is the ch field of Tcg255SubStruct // reserved1 is the ch field of Tcg255SubStruct
sal_uInt16 reserved2; sal_uInt16 reserved2;
...@@ -162,21 +162,21 @@ class CTBWrapper : public Tcg255SubStruct ...@@ -162,21 +162,21 @@ class CTBWrapper : public Tcg255SubStruct
sal_Int32 cbDTBC; sal_Int32 cbDTBC;
std::vector< TBC > rtbdc; // std::vector< SwTBC > rtbdc; //
std::vector< Customization > rCustomizations; // array of Customizations std::vector< Customization > rCustomizations; // array of Customizations
std::vector< sal_Int16 > dropDownMenuIndices; // array of indexes of Customization toolbars that are dropped by a menu std::vector< sal_Int16 > dropDownMenuIndices; // array of indexes of Customization toolbars that are dropped by a menu
CTBWrapper(const CTBWrapper&); SwCTBWrapper(const SwCTBWrapper&);
CTBWrapper& operator = ( const CTBWrapper&); SwCTBWrapper& operator = ( const SwCTBWrapper&);
public: public:
CTBWrapper( bool bReadId = true ); SwCTBWrapper( bool bReadId = true );
~CTBWrapper(); ~SwCTBWrapper();
void InsertDropIndex( sal_Int32 aIndex ) { dropDownMenuIndices.push_back( aIndex ); } void InsertDropIndex( sal_Int32 aIndex ) { dropDownMenuIndices.push_back( aIndex ); }
TBC* GetTBCAtOffset( sal_uInt32 nStreamOffset ); SwTBC* GetTBCAtOffset( sal_uInt32 nStreamOffset );
bool Read(SvStream &rS); bool Read(SvStream &rS);
bool ImportCustomToolBar( SfxObjectShell& rDocSh ); bool ImportCustomToolBar( SfxObjectShell& rDocSh );
Customization* GetCustomizaton( sal_Int16 index ); Customization* GetCustomizaton( sal_Int16 index );
CTB* GetCustomizationData( const rtl::OUString& name ); SwCTB* GetCustomizationData( const rtl::OUString& name );
void Print( FILE* ); void Print( FILE* );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment