diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-07 16:57:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-08 10:00:02 +0100 |
commit | cadc3c17cbef5f9fcb5273128bbda57a6afd5cb5 (patch) | |
tree | c9892b01d8bc24f16fa58707932ddaa2c22b9e88 /sfx2/source/appl | |
parent | dcee4cfcdc0adab82eec1bd68b68dea7eeee549c (diff) |
CID#1078685 consider if there is < 3 %
Change-Id: I2807a16548af4202d42448c6ef66f240ab4cc920
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r-- | sfx2/source/appl/lnkbase2.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx index c3adc2699523..4614e6523259 100644 --- a/sfx2/source/appl/lnkbase2.cxx +++ b/sfx2/source/appl/lnkbase2.cxx @@ -492,14 +492,16 @@ bool SvBaseLink::ExecuteEdit( const OUString& _rNewName ) { sError = sError.replaceAt( nFndPos, 1, sApp ); nFndPos = nFndPos + sApp.getLength(); + + if( -1 != ( nFndPos = sError.indexOf( '%', nFndPos ))) + { + sError = sError.replaceAt( nFndPos, 1, sTopic ); + nFndPos = nFndPos + sTopic.getLength(); + + if( -1 != ( nFndPos = sError.indexOf( '%', nFndPos ))) + sError = sError.replaceAt( nFndPos, 1, sItem ); + } } - if( -1 != ( nFndPos = sError.indexOf( '%', nFndPos ))) - { - sError = sError.replaceAt( nFndPos, 1, sTopic ); - nFndPos = nFndPos + sTopic.getLength(); - } - if( -1 != ( nFndPos = sError.indexOf( '%', nFndPos ))) - sError = sError.replaceAt( nFndPos, 1, sItem ); } else return false; |