if (xNameAccess != null){
if (xNameAccess.hasByName(_sImageName)){
// get the Image Url and process the Url by the macroexpander...
sImageUrl = (String) xNameAccess.getByName(_sImageName);
Object oMacroExpander = this.m_xContext.getValueByName("/singletons/com.sun.star.util.theMacroExpander");
XMacroExpander xMacroExpander = (XMacroExpander) UnoRuntime.queryInterface(XMacroExpander.class, oMacroExpander);
sImageUrl = xMacroExpander.expandMacros(sImageUrl);
sImageUrl = sImageUrl.substring(new String("vnd.sun.star.expand:").length(), sImageUrl.length());
sImageUrl = sImageUrl.trim();
sImageUrl += "/" + _sImageName;
}
}