summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-07 16:57:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-08 10:00:02 +0100
commitcadc3c17cbef5f9fcb5273128bbda57a6afd5cb5 (patch)
treec9892b01d8bc24f16fa58707932ddaa2c22b9e88 /sfx2
parentdcee4cfcdc0adab82eec1bd68b68dea7eeee549c (diff)
CID#1078685 consider if there is < 3 %
Change-Id: I2807a16548af4202d42448c6ef66f240ab4cc920
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/lnkbase2.cxx16
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;