Commit 0485b9ebff809a6a32b494a12d184f79fca91ecb
1 parent
ebfa69d7
Exists in
master
and in
5 other branches
Ajustando configuração de sessão no objeto openoffice
Showing
3 changed files
with
12 additions
and
4 deletions
Show diff stats
src/oxt/actions.cxx
src/oxt/main.cxx
... | ... | @@ -313,10 +313,18 @@ void pw3270::uno_impl::failed(const char *fmt, ...) throw( ::com::sun::star::uno |
313 | 313 | |
314 | 314 | ::sal_Int16 SAL_CALL pw3270::uno_impl::setSession( const ::rtl::OUString& name ) throw (::com::sun::star::uno::RuntimeException) |
315 | 315 | { |
316 | + const char *ptr; | |
317 | + | |
316 | 318 | OString str = rtl::OUStringToOString( name , hSession->get_encoding() ); |
317 | 319 | |
318 | 320 | delete this->hSession; |
319 | - this->hSession = new ipc3270_session(this,str.getStr()); | |
321 | + | |
322 | + ptr = str.getStr(); | |
323 | + | |
324 | + if(ptr && *ptr) | |
325 | + this->hSession = new ipc3270_session(this,str.getStr()); | |
326 | + else | |
327 | + this->hSession = new lib3270_session(this); | |
320 | 328 | |
321 | 329 | return 0; |
322 | 330 | } | ... | ... |
src/oxt/testprogram.cxx