2010-10-12 15:57:08 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-21 22:06:52 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2004-11-16 09:56:10 +00:00
|
|
|
|
2006-09-16 23:05:27 +00:00
|
|
|
|
2004-11-16 09:56:10 +00:00
|
|
|
#include "resourcehelper.hxx"
|
|
|
|
#include "frm_resource.hxx"
|
|
|
|
|
2014-11-14 22:52:35 +01:00
|
|
|
#include <osl/diagnose.h>
|
2004-11-16 09:56:10 +00:00
|
|
|
#include <rtl/ustring.hxx>
|
|
|
|
|
|
|
|
|
|
|
|
namespace xforms
|
|
|
|
{
|
|
|
|
|
|
|
|
OUString getResource( sal_uInt16 nResourceId )
|
|
|
|
{
|
|
|
|
return getResource( nResourceId, OUString(), OUString(), OUString() );
|
|
|
|
}
|
|
|
|
|
|
|
|
OUString getResource( sal_uInt16 nResourceId,
|
|
|
|
const OUString& rInfo1 )
|
|
|
|
{
|
|
|
|
return getResource( nResourceId, rInfo1, OUString(), OUString() );
|
|
|
|
}
|
|
|
|
|
|
|
|
OUString getResource( sal_uInt16 nResourceId,
|
|
|
|
const OUString& rInfo1,
|
|
|
|
const OUString& rInfo2 )
|
|
|
|
{
|
|
|
|
return getResource( nResourceId, rInfo1, rInfo2, OUString() );
|
|
|
|
}
|
|
|
|
|
|
|
|
OUString getResource( sal_uInt16 nResourceId,
|
|
|
|
const OUString& rInfo1,
|
|
|
|
const OUString& rInfo2,
|
|
|
|
const OUString& rInfo3 )
|
|
|
|
{
|
|
|
|
OUString sResource = frm::ResourceManager::loadString( nResourceId );
|
2011-12-26 15:08:46 -02:00
|
|
|
OSL_ENSURE( !sResource.isEmpty(), "resource not found?" );
|
2004-11-16 09:56:10 +00:00
|
|
|
|
2013-01-30 11:44:23 +01:00
|
|
|
OUString sString( sResource );
|
2013-01-30 15:12:34 +01:00
|
|
|
sString = sString.replaceAll( "$1", rInfo1 );
|
|
|
|
sString = sString.replaceAll( "$2", rInfo2 );
|
|
|
|
sString = sString.replaceAll( "$3", rInfo3 );
|
2013-01-30 11:44:23 +01:00
|
|
|
return sString;
|
2004-11-16 09:56:10 +00:00
|
|
|
}
|
|
|
|
|
2006-06-19 12:05:25 +00:00
|
|
|
} // namespace xforms
|
2010-10-12 15:57:08 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|