summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-08-19 09:25:11 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-08-19 09:25:11 +0000
commit83a0438df65123519f108847aa826e658d86af3e (patch)
treeef19c30ba27d86a0a229fc8de2fc563f391b80aa /framework
parentdbd2e6e1f49c56e9ce1d27ef19c90d47b8d53e87 (diff)
INTEGRATION: CWS dba31a (1.20.46); FILE MERGED
2008/07/30 12:08:41 fs 1.20.46.3: RESYNC: (1.21-1.22); FILE MERGED 2008/07/02 09:20:55 oj 1.20.46.2: RESYNC: (1.20-1.21); FILE MERGED 2008/06/06 06:44:05 oj 1.20.46.1: #i63132# substitute ($number) like menucommand does
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx27
1 files changed, 26 insertions, 1 deletions
diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx
index 91c0257ae0..8cdf1ddea5 100644
--- a/framework/source/uielement/generictoolbarcontroller.cxx
+++ b/framework/source/uielement/generictoolbarcontroller.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: generictoolbarcontroller.cxx,v $
- * $Revision: 1.22 $
+ * $Revision: 1.23 $
*
* This file is part of OpenOffice.org.
*
@@ -64,6 +64,8 @@
#include <vcl/mnemonic.hxx>
#endif
#include <tools/urlobj.hxx>
+#include <classes/resource.hrc>
+#include <classes/fwkresid.hxx>
#include <comphelper/uieventslogger.hxx>
using namespace ::com::sun::star::awt;
@@ -252,6 +254,29 @@ throw ( RuntimeException )
}
else
{
+ // Replacement for place holders
+ if ( aStrValue.matchAsciiL( "($1)", 4 ))
+ {
+ String aResStr = String( FwkResId( STR_UPDATEDOC ));
+ rtl::OUString aTmp( aResStr );
+ aTmp += rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " " ));
+ aTmp += aStrValue.copy( 4 );
+ aStrValue = aTmp;
+ }
+ else if ( aStrValue.matchAsciiL( "($2)", 4 ))
+ {
+ String aResStr = String( FwkResId( STR_CLOSEDOC_ANDRETURN ));
+ rtl::OUString aTmp( aResStr );
+ aTmp += aStrValue.copy( 4 );
+ aStrValue = aTmp;
+ }
+ else if ( aStrValue.matchAsciiL( "($3)", 4 ))
+ {
+ String aResStr = String( FwkResId( STR_SAVECOPYDOC ));
+ rtl::OUString aTmp( aResStr );
+ aTmp += aStrValue.copy( 4 );
+ aStrValue = aTmp;
+ }
::rtl::OUString aText( MnemonicGenerator::EraseAllMnemonicChars( aStrValue ) );
m_pToolbar->SetItemText( m_nID, aText );
m_pToolbar->SetQuickHelpText( m_nID, aText );