summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <timar@fsf.hu>2011-03-05 11:48:51 +0100
committerAndras Timar <timar@fsf.hu>2011-03-05 16:26:28 +0100
commitd4b9ff4722fc73cb6d613065bdbc7ae9b3f96d00 (patch)
treede818483ad59c7474232a0a46f5bf48fbf837ef4
parentb2a06d3210d488deea327711dc9e2edb9b1c96bf (diff)
Replace OpenOffice.org to %PRODUCTNAME
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui.hrc0
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_dialog.src0
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx13
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.src4
-rw-r--r--desktop/source/deployment/inc/dp_dependencies.hxx9
-rw-r--r--desktop/source/deployment/misc/dp_dependencies.cxx4
-rw-r--r--desktop/source/deployment/misc/dp_misc.src4
7 files changed, 29 insertions, 5 deletions
diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc
index 6ec110001f..6ec110001f 100755..100644
--- a/desktop/source/deployment/gui/dp_gui.hrc
+++ b/desktop/source/deployment/gui/dp_gui.hrc
diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src b/desktop/source/deployment/gui/dp_gui_dialog.src
index cb9454fba6..cb9454fba6 100755..100644
--- a/desktop/source/deployment/gui/dp_gui_dialog.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog.src
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 590b8daa9b..df1744fa5c 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -1039,6 +1039,7 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG)
{
// create error string for version mismatch
::rtl::OUString sVersion( RTL_CONSTASCII_USTRINGPARAM("%VERSION") );
+ ::rtl::OUString sProductName( RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME") );
sal_Int32 nPos = m_noDependencyCurVer.indexOf( sVersion );
if ( nPos >= 0 )
{
@@ -1046,7 +1047,17 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG)
::rtl::Bootstrap::expandMacros(sCurVersion);
m_noDependencyCurVer = m_noDependencyCurVer.replaceAt( nPos, sVersion.getLength(), sCurVersion );
}
-
+ nPos = m_noDependencyCurVer.indexOf( sProductName );
+ if ( nPos >= 0 )
+ {
+ m_noDependencyCurVer = m_noDependencyCurVer.replaceAt( nPos, sProductName.getLength(), BrandName::get() );
+ }
+ nPos = m_noDependency.indexOf( sProductName );
+ if ( nPos >= 0 )
+ {
+ m_noDependency = m_noDependency.replaceAt( nPos, sProductName.getLength(), BrandName::get() );
+ }
+
b.append(m_noInstall);
b.append(LF);
b.append(m_noDependency);
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src
index 500d28e432..a7fb03a9b7 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.src
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src
@@ -234,10 +234,10 @@ ModalDialog RID_DLG_UPDATE {
Text[en-US] = "The extension cannot be updated because:";
};
String RID_DLG_UPDATE_NODEPENDENCY {
- Text[en-US] = "Required OpenOffice.org version doesn't match:";
+ Text[en-US] = "Required %PRODUCTNAME version doesn't match:";
};
String RID_DLG_UPDATE_NODEPENDENCY_CUR_VER {
- Text[en-US] = "You have OpenOffice.org %VERSION";
+ Text[en-US] = "You have %PRODUCTNAME %VERSION";
};
String RID_DLG_UPDATE_BROWSERBASED {
Text[en-US] = "browser based update";
diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx
index 2e57c06275..f31d5f3084 100644
--- a/desktop/source/deployment/inc/dp_dependencies.hxx
+++ b/desktop/source/deployment/inc/dp_dependencies.hxx
@@ -29,6 +29,7 @@
#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_DEPENDENCIES_HXX
#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_DEPENDENCIES_HXX
+#include "unotools/configmgr.hxx"
#include "sal/config.h"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Sequence.hxx"
@@ -44,6 +45,14 @@ namespace rtl { class OUString; }
namespace dp_misc {
+struct BrandName : public ::rtl::StaticWithInit<const ::rtl::OUString, BrandName> {
+ const ::rtl::OUString operator () () {
+ return ::utl::ConfigManager::GetDirectConfigProperty(
+ ::utl::ConfigManager::PRODUCTNAME ).get< ::rtl::OUString >();
+ }
+};
+
+
/**
Dependency handling.
*/
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index 5322f7fce7..5c945df6b2 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -137,6 +137,7 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
::rtl::OUString sReason;
::rtl::OUString sValue;
::rtl::OUString sVersion(RTL_CONSTASCII_USTRINGPARAM("%VERSION"));
+ ::rtl::OUString sProductName(RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME"));
if ( dependency->getNamespaceURI().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( xmlNamespace ) )
&& dependency->getTagName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenOffice.org-minimal-version" ) ) )
@@ -166,6 +167,9 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
sal_Int32 nPos = sReason.indexOf( sVersion );
if ( nPos >= 0 )
sReason = sReason.replaceAt( nPos, sVersion.getLength(), sValue );
+ nPos = sReason.indexOf( sProductName );
+ if ( nPos >= 0 )
+ sReason = sReason.replaceAt( nPos, sProductName.getLength(), BrandName::get() );
return sReason;
}
diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src
index 78e87c2078..4c36644ec2 100644
--- a/desktop/source/deployment/misc/dp_misc.src
+++ b/desktop/source/deployment/misc/dp_misc.src
@@ -32,9 +32,9 @@ String RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN {
};
String RID_DEPLYOMENT_DEPENDENCIES_MIN {
- Text[en-US] = "Extensions requires at least OpenOffice.org %VERSION";
+ Text[en-US] = "Extensions requires at least %PRODUCTNAME %VERSION";
};
String RID_DEPLYOMENT_DEPENDENCIES_MAX {
- Text[en-US] = "Extension doesn't support versions greater than: OpenOffice.org %VERSION";
+ Text[en-US] = "Extension doesn't support versions greater than: %PRODUCTNAME %VERSION";
};