diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-02-04 17:59:58 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-02-04 17:59:58 +0100 |
commit | 888dedef71375dbd02a66e8606d7b55300cf76b0 (patch) | |
tree | 1a83d1f0d971576a461d17f6f6baf41219379d2a /desktop | |
parent | 3eab2443ad2d4ebb53af8ee6a27987564c631690 (diff) | |
parent | 3c550e9f7bdd8c9f1f75f4148f516ddc94290f92 (diff) |
CWS svxsplit: merge with m71
Diffstat (limited to 'desktop')
3 files changed, 57 insertions, 49 deletions
diff --git a/desktop/source/deployment/misc/dp_ucb.cxx b/desktop/source/deployment/misc/dp_ucb.cxx index 8a4f55caae1a..013ba0e2ce23 100644 --- a/desktop/source/deployment/misc/dp_ucb.cxx +++ b/desktop/source/deployment/misc/dp_ucb.cxx @@ -40,7 +40,6 @@ #include "xmlscript/xml_helper.hxx" #include "com/sun/star/io/XInputStream.hpp" #include "com/sun/star/ucb/CommandFailedException.hpp" -#include "com/sun/star/ucb/XContentCreator.hpp" #include "com/sun/star/ucb/ContentInfo.hpp" #include "com/sun/star/ucb/ContentInfoAttribute.hpp" @@ -130,50 +129,46 @@ bool create_folder( if (! create_folder( &parentContent, url.copy( 0, slash ), xCmdEnv, throw_exc )) return false; - Reference<XContentCreator> xCreator( parentContent.get(), UNO_QUERY ); - if (xCreator.is()) + const Any title( ::rtl::Uri::decode( url.copy( slash + 1 ), + rtl_UriDecodeWithCharset, + RTL_TEXTENCODING_UTF8 ) ); + const Sequence<ContentInfo> infos( + parentContent.queryCreatableContentsInfo() ); + for ( sal_Int32 pos = 0; pos < infos.getLength(); ++pos ) { - const Any title( ::rtl::Uri::decode( url.copy( slash + 1 ), - rtl_UriDecodeWithCharset, - RTL_TEXTENCODING_UTF8 ) ); - const Sequence<ContentInfo> infos( - xCreator->queryCreatableContentsInfo() ); - for ( sal_Int32 pos = 0; pos < infos.getLength(); ++pos ) + // look KIND_FOLDER: + ContentInfo const & info = infos[ pos ]; + if ((info.Attributes & ContentInfoAttribute::KIND_FOLDER) != 0) { - // look KIND_FOLDER: - ContentInfo const & info = infos[ pos ]; - if ((info.Attributes & ContentInfoAttribute::KIND_FOLDER) != 0) - { - // make sure the only required bootstrap property is "Title": - Sequence<beans::Property> const & rProps = info.Properties; - if (rProps.getLength() != 1 || - !rProps[ 0 ].Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("Title") )) - continue; + // make sure the only required bootstrap property is "Title": + Sequence<beans::Property> const & rProps = info.Properties; + if (rProps.getLength() != 1 || + !rProps[ 0 ].Name.equalsAsciiL( + RTL_CONSTASCII_STRINGPARAM("Title") )) + continue; - try { - if (parentContent.insertNewContent( - info.Type, - Sequence<OUString>( &StrTitle::get(), 1 ), - Sequence<Any>( &title, 1 ), - ucb_content )) { - if (ret_ucb_content != 0) - *ret_ucb_content = ucb_content; - return true; - } + try { + if (parentContent.insertNewContent( + info.Type, + Sequence<OUString>( &StrTitle::get(), 1 ), + Sequence<Any>( &title, 1 ), + ucb_content )) { + if (ret_ucb_content != 0) + *ret_ucb_content = ucb_content; + return true; } - catch (RuntimeException &) { + } + catch (RuntimeException &) { + throw; + } + catch (CommandFailedException &) { + // Interaction Handler already handled the error + // that has occured... + } + catch (Exception &) { + if (throw_exc) throw; - } - catch (CommandFailedException &) { - // Interaction Handler already handled the error - // that has occured... - } - catch (Exception &) { - if (throw_exc) - throw; - return false; - } + return false; } } } diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 7daa9adb277e..4477d9ba101d 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -41,7 +41,7 @@ #include "svl/inettype.hxx" #include "unotools/pathoptions.hxx" -#include <transex3/compilehelp.hxx> +#include <l10ntools/compilehelp.hxx> #include <com/sun/star/ucb/XSimpleFileAccess.hpp> #include <com/sun/star/util/XMacroExpander.hpp> #include <com/sun/star/uri/XUriReferenceFactory.hpp> diff --git a/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java b/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java index 4628034723e1..e920bc098219 100644 --- a/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java +++ b/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java @@ -95,12 +95,12 @@ public class SystemEnvironment { this.systemManufacturer = ""; this.cpuManufacturer = ""; this.serialNumber = ""; - this.physmem = ""; - this.sockets = ""; - this.cores = ""; - this.virtcpus = ""; + this.physmem = "0"; + this.sockets = "0"; + this.cores = "0"; + this.virtcpus = "0"; this.cpuname = ""; - this.clockrate = ""; + this.clockrate = "0"; } @@ -173,6 +173,8 @@ public class SystemEnvironment { * @param physmem The physmem to set. */ public void setPhysMem(String physmem) { + if (physmem.length() == 0) + physmem = "0"; this.physmem = physmem; } @@ -181,6 +183,8 @@ public class SystemEnvironment { * @param sockets The sockets to set. */ public void setSockets(String sockets) { + if (sockets.length() == 0) + sockets = "0"; this.sockets = sockets; } @@ -189,6 +193,8 @@ public class SystemEnvironment { * @param cores The cores to set. */ public void setCores(String cores) { + if (cores.length() == 0) + cores ="0"; this.cores = cores; } @@ -197,6 +203,8 @@ public class SystemEnvironment { * @param virtcpus The virtcpus to set. */ public void setVirtCpus(String virtcpus) { + if (virtcpus.length() == 0) + virtcpus = "0"; this.virtcpus = virtcpus; } @@ -213,9 +221,14 @@ public class SystemEnvironment { * @param clockrate The clockrate to set. */ public void setClockRate(String clockrate) { - Float f = Float.parseFloat(clockrate); - Integer nClockrate = f.intValue(); - this.clockrate = nClockrate.toString(); + if (clockrate.length() == 0) + this.clockrate = "0"; + else + { + Float f = Float.parseFloat(clockrate); + Integer nClockrate = f.intValue(); + this.clockrate = nClockrate.toString(); + } } /** |