Get rid of CREATEVERSIONRESMGR[_NAME]

This commit is contained in:
Stephan Bergmann 2012-02-23 17:01:23 +01:00
parent 64de14a0c1
commit 86ffa60647
23 changed files with 37 additions and 59 deletions

View file

@ -46,7 +46,7 @@ BasicDLL::BasicDLL()
{
BASIC_DLL() = this;
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
pBasResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(sb), aLocale );
pBasResMgr = ResMgr::CreateResMgr("sb", aLocale );
bDebugMode = sal_False;
bBreakEnabled = sal_True;
}

View file

@ -623,7 +623,7 @@ ResMgr* implGetResMgr( void )
if( !pResMgr )
{
::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
pResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(sb), aLocale );
pResMgr = ResMgr::CreateResMgr("sb", aLocale );
}
return pResMgr;
}

View file

@ -40,7 +40,7 @@ ResMgr & RessourceManager::getRessourceManager()
{
// not threadsafe
if( ! m_pRessourceManager )
m_pRessourceManager = CREATEVERSIONRESMGR( chartcontroller );
m_pRessourceManager = ResMgr::CreateResMgr("chartcontroller");
OSL_ASSERT( m_pRessourceManager );
return *m_pRessourceManager;
}

View file

@ -428,7 +428,7 @@ namespace
{
ResMgr * operator ()()
{
return ResMgr::CreateResMgr (CREATEVERSIONRESMGR_NAME(fps_office));
return ResMgr::CreateResMgr ("fps_office");
}
static ResMgr * getOrCreate()

View file

@ -98,7 +98,7 @@ namespace
{
ResMgr * operator ()()
{
return ResMgr::CreateResMgr (CREATEVERSIONRESMGR_NAME(svs));
return ResMgr::CreateResMgr ("svs");
}
static ResMgr * getOrCreate()
{

View file

@ -141,7 +141,7 @@ KDE4FilePicker::KDE4FilePicker( const uno::Reference<lang::XMultiServiceFactory>
lang::XEventListener,
lang::XServiceInfo>( _helperMutex ),
m_xServiceMgr( xServiceMgr ),
_resMgr( CREATEVERSIONRESMGR( fps_office ) )
_resMgr( ResMgr::CreateResMgr("fps_office") )
{
_extraControls = new QWidget();
_layout = new QGridLayout(_extraControls);

View file

@ -107,7 +107,7 @@ UnxFilePicker::UnxFilePicker( const uno::Reference<lang::XMultiServiceFactory>&
m_nFilePickerRead( -1 ),
m_pNotifyThread( NULL ),
m_pCommandThread( NULL ),
m_pResMgr( CREATEVERSIONRESMGR( fps_office ) )
m_pResMgr( ResMgr::CreateResMgr("fps_office") )
{
}

View file

@ -74,7 +74,7 @@ static ResMgr* pSolverResMgr = NULL;
OUString lcl_GetResourceString( sal_uInt32 nId )
{
if (!pSolverResMgr)
pSolverResMgr = CREATEVERSIONRESMGR( solver );
pSolverResMgr = ResMgr::CreateResMgr("solver");
return String( ResId( nId, *pSolverResMgr ) );
}

View file

@ -356,7 +356,7 @@ void SAL_DLLPUBLIC_EXPORT plugin_init_sys_tray()
pShutdownIcon->GetResString( STR_QUICKSTART_TIP ),
RTL_TEXTENCODING_UTF8 );
pVCLResMgr = CREATEVERSIONRESMGR( vcl );
pVCLResMgr = ResMgr::CreateResMgr("vcl");
GdkPixbuf *pPixbuf = ResIdToPixbuf( SV_ICON_ID_OFFICE );
pTrayIcon = gtk_status_icon_new_from_pixbuf(pPixbuf);

View file

@ -77,7 +77,7 @@ SimpleResMgr * ResMgrMap::get(css::lang::Locale const & locale) {
Map::iterator i(map_.find(code));
if (i == map_.end()) {
boost::scoped_ptr< SimpleResMgr > mgr(
new SimpleResMgr(CREATEVERSIONRESMGR_NAME(svl), locale));
new SimpleResMgr("svl", locale));
i = map_.insert(Map::value_type(code, mgr.get())).first;
mgr.reset();
}

View file

@ -161,7 +161,7 @@ SfxErrorHandler::SfxErrorHandler(sal_uInt16 nIdP, sal_uLong lStartP, sal_uLong l
if( ! pMgr )
{
com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
pFreeMgr = pMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(ofa), aLocale );
pFreeMgr = pMgr = ResMgr::CreateResMgr("ofa", aLocale );
}
}
@ -311,7 +311,7 @@ sal_Bool SfxErrorHandler::GetClassString(sal_uLong lClassId, String &rStr) const
{
sal_Bool bRet = sal_False;
com::sun::star::lang::Locale aLocale( Application::GetSettings().GetUILocale() );
ResMgr* pResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(ofa), aLocale );
ResMgr* pResMgr = ResMgr::CreateResMgr("ofa", aLocale );
if( pResMgr )
{
ResId aId(RID_ERRHDL, *pResMgr );
@ -441,7 +441,7 @@ sal_Bool SfxErrorContext::GetString(sal_uLong nErrId, String &rStr)
if( ! pMgr )
{
com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale();
pFreeMgr = pMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(ofa), aLocale );
pFreeMgr = pMgr = ResMgr::CreateResMgr("ofa", aLocale );
}
if( pMgr )
{

View file

@ -49,7 +49,7 @@ ResMgr * ImpSvtData::GetResMgr(const ::com::sun::star::lang::Locale aLocale)
{
if (!pResMgr)
{
pResMgr = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(svt), aLocale );
pResMgr = ResMgr::CreateResMgr("svt", aLocale );
}
return pResMgr;
}

View file

@ -3675,7 +3675,7 @@ namespace svxform
m_aFilePickerBtn.SetClickHdl( LINK( this, AddInstanceDialog, FilePickerHdl ) );
// load the filter name from fps_office resource
m_sAllFilterName = String( ResId( STR_FILTERNAME_ALL, *CREATEVERSIONRESMGR(fps_office) ) );
m_sAllFilterName = String( ResId( STR_FILTERNAME_ALL, *ResMgr::CreateResMgr("fps_office") ) );
}
AddInstanceDialog::~AddInstanceDialog()

View file

@ -51,8 +51,6 @@ using namespace ::com::sun::star::ui::dialogs::CommonFilePickerElementIds;
//
//------------------------------------------------------------
#define RES_NAME svt
// because the label of a listbox is
// a control itself (static text) we
// have defined a control id for this
@ -128,7 +126,7 @@ public:
CResourceProvider_Impl( )
{
m_ResMgr = CREATEVERSIONRESMGR( RES_NAME );
m_ResMgr = ResMgr::CreateResMgr("svt");
}
//-------------------------------------

View file

@ -34,9 +34,6 @@
#include <tools/resid.hxx>
#include <com/sun/star/lang/Locale.hpp>
#define CREATEVERSIONRESMGR_NAME( Name ) #Name
#define CREATEVERSIONRESMGR( Name ) ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( Name ) )
#include <vector>
class SvStream;

View file

@ -353,7 +353,7 @@ BOOL UcbExplorerListBoxEntry::createNewContent( const ContentInfo& rInfo,
const OUString& rName = pProps[ n ].Name;
std::auto_ptr< ResMgr > xManager(
ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( ucbexplorer ) ) );
ResMgr::CreateResMgr( "ucbexplorer" ) );
StringInputDialog* pDlg = new StringInputDialog( *xManager.get(), rName, rName );
USHORT nRet = pDlg->Execute();
if ( nRet == RET_OK )
@ -441,7 +441,7 @@ BOOL UcbExplorerListBoxEntry::createNewContent( const ContentInfo& rInfo,
// data to supply to the new content.
std::auto_ptr< ResMgr > xManager(
ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( ucbexplorer ) ) );
ResMgr::CreateResMgr( "ucbexplorer" ) );
StringInputDialog* pDlg = new StringInputDialog(
*xManager.get(),
OUString(RTL_CONSTASCII_USTRINGPARAM(
@ -649,7 +649,7 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt )
if ( pEntry )
{
std::auto_ptr< ResMgr > xManager(
ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( ucbexplorer ) ) );
ResMgr::CreateResMgr( "ucbexplorer" ) );
PopupMenu* pMenu = new PopupMenu( ResId( MENU_POPUP, *xManager.get() ) );
PopupMenu* pNewMenu = 0;
@ -764,7 +764,7 @@ void UcbExplorerTreeListBox::Command( const CommandEvent& rCEvt )
}
std::auto_ptr< ResMgr > xManager(
ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( ucbexplorer ) ) );
ResMgr::CreateResMgr( "ucbexplorer" ) );
StringInputDialog* pDlg
= new StringInputDialog(
*xManager.get(),
@ -1137,8 +1137,7 @@ void MyApp::Main()
// Create/init/show app window.
//////////////////////////////////////////////////////////////////////
std::auto_ptr< ResMgr > xManager(
ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( ucbexplorer ) ) );
std::auto_ptr< ResMgr > xManager( ResMgr::CreateResMgr( "ucbexplorer" ) );
UcbExplorerWindow aAppWin( *xManager.get(), 0, WB_APP | WB_STDWORK );

View file

@ -94,7 +94,7 @@ executeLoginDialog(
if (!bCanUseSysCreds)
nFlags |= LF_NO_USESYSCREDS;
boost::scoped_ptr< ResMgr > xManager( ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
UniString aRealm(rRealm);
boost::scoped_ptr< LoginDialog > xDialog(
new LoginDialog( pParent, nFlags, rInfo.GetServer(), &aRealm, xManager.get()));
@ -425,8 +425,7 @@ executeMasterPasswordDialog(
{
SolarMutexGuard aGuard;
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
boost::scoped_ptr< MasterPasswordCreateDialog > xDialog(
@ -528,8 +527,7 @@ executePasswordDialog(
{
SolarMutexGuard aGuard;
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
if (bIsSimplePasswordRequest)

View file

@ -50,8 +50,7 @@ executeCookieDialog(Window * pParent, CntHTTPCookieRequest & rRequest)
{
SolarMutexGuard aGuard;
std::auto_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
std::auto_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
std::auto_ptr< CookiesDialog > xDialog(
new CookiesDialog(pParent, &rRequest, xManager.get()));
xDialog->Execute();

View file

@ -160,11 +160,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
rtl::OUString aMessage;
{
enum Source { SOURCE_DEFAULT, SOURCE_CNT, SOURCE_SVX, SOURCE_UUI };
static char const * const aManager[4]
= { CREATEVERSIONRESMGR_NAME(ofa),
CREATEVERSIONRESMGR_NAME(cnt),
CREATEVERSIONRESMGR_NAME(svx),
CREATEVERSIONRESMGR_NAME(uui) };
static char const * const aManager[4] = { "ofa", "cnt", "svx", "uui" };
static sal_uInt16 const aId[4]
= { RID_ERRHDL,
RID_CHAOS_START + 12,

View file

@ -65,8 +65,7 @@ executeFilterDialog(
{
SolarMutexGuard aGuard;
std::auto_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
std::auto_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
std::auto_ptr< uui::FilterDialog > xDialog(
new uui::FilterDialog(pParent, xManager.get()));

View file

@ -84,8 +84,7 @@ handleLockedDocumentRequest_(
try
{
SolarMutexGuard aGuard;
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
if (!xManager.get())
return;
@ -175,8 +174,7 @@ handleChangedByOthersRequest_(
try
{
SolarMutexGuard aGuard;
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
if (!xManager.get())
return;
@ -214,8 +212,7 @@ handleLockFileIgnoreRequest_(
try
{
SolarMutexGuard aGuard;
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
if (!xManager.get())
return;

View file

@ -155,8 +155,7 @@ executeUnknownAuthDialog(
{
SolarMutexGuard aGuard;
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
boost::scoped_ptr< UnknownAuthDialog > xDialog(
new UnknownAuthDialog( pParent,
rXCert,
@ -204,8 +203,7 @@ executeSSLWarnDialog(
{
SolarMutexGuard aGuard;
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
boost::scoped_ptr< SSLWarnDialog > xDialog(
new SSLWarnDialog( pParent,
rXCert,

View file

@ -1204,7 +1204,7 @@ NameClashResolveDialogResult executeSimpleNameClashResolveDialog( Window *pParen
rtl::OUString & rProposedNewName,
bool bAllowOverwrite )
{
boost::scoped_ptr< ResMgr > xManager( ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( uui ) ) );
boost::scoped_ptr< ResMgr > xManager( ResMgr::CreateResMgr( "uui" ) );
if ( !xManager.get() )
return ABORT;
@ -1313,7 +1313,7 @@ UUIInteractionHelper::handleGenericErrorRequest(
ErrorHandler::GetErrorString( nErrorCode, aErrorString );
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( uui ) ) );
ResMgr::CreateResMgr( "uui" ) );
rtl::OUString aTitle( utl::ConfigManager::getProductName() );
::rtl::OUString aErrTitle
@ -1355,8 +1355,7 @@ UUIInteractionHelper::handleMacroConfirmRequest(
bool bApprove = false;
boost::scoped_ptr< ResMgr > pResMgr(
ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( uui ) ) );
boost::scoped_ptr< ResMgr > pResMgr( ResMgr::CreateResMgr( "uui" ) );
if ( pResMgr.get() )
{
bool bShowSignatures = aSignInfo.getLength() > 0;
@ -1419,8 +1418,7 @@ UUIInteractionHelper::handleFutureDocumentVersionUpdateRequest(
if ( !s_bDeferredToNextSession )
{
boost::scoped_ptr< ResMgr > pResMgr(
ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( uui ) ) );
boost::scoped_ptr< ResMgr > pResMgr( ResMgr::CreateResMgr( "uui" ) );
if ( pResMgr.get() )
{
::uui::NewerVersionWarningDialog aDialog(
@ -1490,8 +1488,7 @@ UUIInteractionHelper::handleBrokenPackageRequest(
::rtl::OUString aMessage;
{
SolarMutexGuard aGuard;
boost::scoped_ptr< ResMgr > xManager(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
boost::scoped_ptr< ResMgr > xManager(ResMgr::CreateResMgr("uui"));
if (!xManager.get())
return;