diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-08-11 16:23:03 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-08-11 16:23:03 +0000 |
commit | fbae0e0ec2927349cd5be9d6bfe3bab6270ac9d9 (patch) | |
tree | 505c0c22974c5254817aaf3f9057830afe69fd9f /framework | |
parent | 55d3068bd1f6c3917f25b7610587265015a8b0ee (diff) |
INTEGRATION: CWS docking3 (1.3.22); FILE MERGED
2004/07/21 07:30:28 cd 1.3.22.1: #i31718# Throw exception when getByName cannot provide an entry
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/uicommanddescription.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 8ef2eaf19f2e..3a394d36ea3c 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -2,9 +2,9 @@ * * $RCSfile: uicommanddescription.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: kz $ $Date: 2004-08-02 13:17:15 $ + * last change: $Author: obo $ $Date: 2004-08-11 17:23:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -379,13 +379,18 @@ throw ( NoSuchElementException, WrappedTargetException, RuntimeException) else if ( rCommandURL.equalsIgnoreAsciiCaseAscii( UICOMMANDDESCRIPTION_NAMEACCESS_COMMANDMIRRORIMAGELIST )) return makeAny( m_aCommandMirrorImageList ); else - return Any(); + throw NoSuchElementException(); } else { // SAFE ++nRequests; - return getInfoFromCommand( rCommandURL ); + Any a = getInfoFromCommand( rCommandURL ); + + if ( !a.hasValue() ) + throw NoSuchElementException(); + + return a; } } |