summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-11-05 09:52:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-11-05 10:36:28 +0000
commit70892959541ad6259e5b9039d8dfaf63bd1b0516 (patch)
tree12274097be3340b5d7e29c99fee625a8bbf4898b
parentbe838ce7ff1db338e35f7d30b8bc6243ab3aaebb (diff)
replace %PRODUCTNAME
Change-Id: I2fa2786366adf0b3d8875baa98a9a558cdf497db
-rw-r--r--vcl/inc/vcl/builder.hxx1
-rw-r--r--vcl/source/window/builder.cxx4
2 files changed, 4 insertions, 1 deletions
diff --git a/vcl/inc/vcl/builder.hxx b/vcl/inc/vcl/builder.hxx
index de8da5154e84..b3a0e1326b5f 100644
--- a/vcl/inc/vcl/builder.hxx
+++ b/vcl/inc/vcl/builder.hxx
@@ -120,6 +120,7 @@ private:
OString m_sID;
OString m_sHelpRoot;
+ OString m_sProductName;
Window *m_pParent;
bool m_bToplevelHasDeferredInit;
ParserState *m_pParserState;
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 7f25cc5a8c45..dcef331df2f8 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -9,6 +9,7 @@
#include <osl/module.hxx>
#include <sal/log.hxx>
+#include <unotools/configmgr.hxx>
#include <vcl/builder.hxx>
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
@@ -75,6 +76,7 @@ namespace
VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OString sID)
: m_sID(sID)
, m_sHelpRoot(OUStringToOString(sUIFile, RTL_TEXTENCODING_UTF8))
+ , m_sProductName(OUStringToOString(utl::ConfigManager::getProductName(), RTL_TEXTENCODING_UTF8))
, m_pParent(pParent)
, m_pParserState(new ParserState)
{
@@ -1509,7 +1511,7 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, const OString &rI
if (!sProperty.isEmpty())
{
sProperty = sProperty.replace('_', '-');
- rMap[sProperty] = sValue;
+ rMap[sProperty] = sValue.replaceAll("%PRODUCTNAME", m_sProductName);
}
}