summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/module.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/appl/module.cxx')
-rw-r--r--sfx2/source/appl/module.cxx60
1 files changed, 18 insertions, 42 deletions
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index a02e3128f9..251f0d3873 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,9 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-#ifndef GCC
-#endif
-
#include <stdio.h>
#include <tools/rcid.h>
@@ -68,12 +66,10 @@ public:
SfxChildWinFactArr_Impl* pFactArr;
ImageList* pImgListSmall;
ImageList* pImgListBig;
- ImageList* pImgListHiSmall;
- ImageList* pImgListHiBig;
SfxModule_Impl();
~SfxModule_Impl();
- ImageList* GetImageList( ResMgr*, BOOL, BOOL bHiContrast = FALSE );
+ ImageList* GetImageList( ResMgr* pResMgr, BOOL bBig );
};
SfxModule_Impl::SfxModule_Impl()
@@ -90,18 +86,15 @@ SfxModule_Impl::~SfxModule_Impl()
delete pFactArr;
delete pImgListSmall;
delete pImgListBig;
- delete pImgListHiSmall;
- delete pImgListHiBig;
}
-ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, BOOL bBig, BOOL bHiContrast )
+ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, BOOL bBig )
{
- ImageList*& rpList = bBig ? ( bHiContrast ? pImgListHiBig: pImgListBig ) :
- ( bHiContrast ? pImgListHiSmall : pImgListSmall );
+ ImageList*& rpList = bBig ? pImgListBig : pImgListSmall;
if ( !rpList )
{
- ResId aResId( bBig ? ( bHiContrast ? RID_DEFAULTIMAGELIST_LCH : RID_DEFAULTIMAGELIST_LC ) :
- ( bHiContrast ? RID_DEFAULTIMAGELIST_SCH : RID_DEFAULTIMAGELIST_SC ), *pResMgr );
+ ResId aResId( bBig ? ( RID_DEFAULTIMAGELIST_LC ) : ( RID_DEFAULTIMAGELIST_SC ), *pResMgr );
+
aResId.SetRT( RSC_IMAGELIST );
DBG_ASSERT( pResMgr->IsAvailable(aResId), "No default ImageList!" );
@@ -130,16 +123,7 @@ ResMgr* SfxModule::GetResMgr()
}
//====================================================================
-/*
-SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP,
- SfxObjectFactory* pFactoryP )
- : pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L)
-{
- Construct_Impl();
- if ( pFactoryP )
- pFactoryP->SetModule_Impl( this );
-}
-*/
+
SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP,
SfxObjectFactory* pFactoryP, ... )
: pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L)
@@ -170,8 +154,6 @@ void SfxModule::Construct_Impl()
pImpl->pFactArr=0;
pImpl->pImgListSmall=0;
pImpl->pImgListBig=0;
- pImpl->pImgListHiSmall=0;
- pImpl->pImgListHiBig=0;
SetPool( &pApp->GetPool() );
}
@@ -185,7 +167,8 @@ SfxModule::~SfxModule()
{
if ( SFX_APP()->Get_Impl() )
{
- // Das Modul wird noch vor dem DeInitialize zerst"ort, also auis dem Array entfernen
+ // The module will be destroyed before the Deinitialize,
+ // so remove from the array
SfxModuleArr_Impl& rArr = GetModules_Impl();
for( USHORT nPos = rArr.Count(); nPos--; )
{
@@ -214,22 +197,20 @@ SfxSlotPool* SfxModule::GetSlotPool() const
void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
{
- DBG_ASSERT( pImpl, "Kein echtes Modul!" );
+ DBG_ASSERT( pImpl, "No real Modul!" );
if (!pImpl->pFactArr)
pImpl->pFactArr = new SfxChildWinFactArr_Impl;
-//#ifdef DBG_UTIL
for (USHORT nFactory=0; nFactory<pImpl->pFactArr->Count(); ++nFactory)
{
if (pFact->nId == (*pImpl->pFactArr)[nFactory]->nId)
{
pImpl->pFactArr->Remove( nFactory );
- DBG_ERROR("ChildWindow mehrfach registriert!");
+ DBG_ERROR("ChildWindow registered multiple times!");
return;
}
}
-//#endif
pImpl->pFactArr->C40_INSERT(
SfxChildWinFactory, pFact, pImpl->pFactArr->Count() );
@@ -240,7 +221,7 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
void SfxModule::RegisterChildWindowContext( USHORT nId,
SfxChildWinContextFactory *pFact)
{
- DBG_ASSERT( pImpl, "Kein echtes Modul!" );
+ DBG_ASSERT( pImpl, "No real Modul!" );
USHORT nCount = pImpl->pFactArr->Count();
for (USHORT nFactory=0; nFactory<nCount; ++nFactory)
@@ -255,7 +236,7 @@ void SfxModule::RegisterChildWindowContext( USHORT nId,
}
}
- DBG_ERROR( "Kein ChildWindow fuer diesen Context!" );
+ DBG_ERROR( "No ChildWindow for this Context!" );
}
//-------------------------------------------------------------------------
@@ -272,7 +253,7 @@ void SfxModule::RegisterToolBoxControl( SfxTbxCtrlFactory *pFact )
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
(pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
{
- DBG_WARNING("TbxController-Registrierung ist nicht eindeutig!");
+ DBG_WARNING("TbxController-Registering is not clearly defined!");
}
}
#endif
@@ -294,7 +275,7 @@ void SfxModule::RegisterStatusBarControl( SfxStbCtrlFactory *pFact )
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
(pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
{
- DBG_WARNING("StbController-Registrierung ist nicht eindeutig!");
+ DBG_WARNING("TbxController-Registering is not clearly defined!");
}
}
#endif
@@ -316,7 +297,7 @@ void SfxModule::RegisterMenuControl( SfxMenuCtrlFactory *pFact )
if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
(pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
{
- DBG_WARNING("MenuController-Registrierung ist nicht eindeutig!");
+ DBG_WARNING("MenuController-Registering is not clearly defined!");
}
}
#endif
@@ -354,15 +335,10 @@ SfxChildWinFactArr_Impl* SfxModule::GetChildWinFactories_Impl() const
ImageList* SfxModule::GetImageList_Impl( BOOL bBig )
{
- return pImpl->GetImageList( pResMgr, bBig, FALSE );
-}
-
-ImageList* SfxModule::GetImageList_Impl( BOOL bBig, BOOL bHiContrast )
-{
- return pImpl->GetImageList( pResMgr, bBig, bHiContrast );
+ return pImpl->GetImageList( pResMgr, bBig );
}
-SfxTabPage* SfxModule::CreateTabPage( USHORT, Window*, const SfxItemSet& )
+SfxTabPage* SfxModule::CreateTabPage( USHORT, Window*, const SfxItemSet& )
{
return NULL;
}