summaryrefslogtreecommitdiff
path: root/unotools/inc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-08-22 09:11:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-08-22 09:11:23 +0200
commit27c7682e5e5859eb353443d6091143694a56bee8 (patch)
tree1c53739aaf3eec6d658603bd95ee619a5ceeb390 /unotools/inc
parentb6e1a001df60cc3f606d3f7fc361367feb13edaf (diff)
fdo#46249: UCBContentHelper::GetTitle must not fail for void property
This was a regression introduced with 2af9040d38af7c7353855415dbea0134585058f3 "Cleaned up utl::UCBContentHelper." GetSize exhibited the same problem and has also been fixed. IsYounger exhibits a similar problem, but has not been addressed, as it is unclear what to return in case no dates can be compared; it is only used in one place (handling SID_EDITDOC in SfxViewFrame::ExecReload_Impl, sfx2/source/view/viewfrm.cxx) where, it appears, only contents for which DateModified /does/ yield a non-void value are relevant. Change-Id: Iff9f5e1ed6f45eede117713d64a265b98f6862b1
Diffstat (limited to 'unotools/inc')
-rw-r--r--unotools/inc/unotools/ucbhelper.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/unotools/inc/unotools/ucbhelper.hxx b/unotools/inc/unotools/ucbhelper.hxx
index 9bf80c23384a..084db947853f 100644
--- a/unotools/inc/unotools/ucbhelper.hxx
+++ b/unotools/inc/unotools/ucbhelper.hxx
@@ -38,6 +38,10 @@ UNOTOOLS_DLLPUBLIC bool IsDocument(rtl::OUString const & url);
UNOTOOLS_DLLPUBLIC bool IsFolder(rtl::OUString const & url);
+/// @param title must not be null
+/// @return true iff title has been set (i.e., if obtaining the "Title" property
+/// of the given content yields a non-void value without raising a
+/// non-RuntimeException; RuntimeExceptions are passed through)
UNOTOOLS_DLLPUBLIC bool GetTitle(
rtl::OUString const & url, rtl::OUString * title);
@@ -50,6 +54,9 @@ UNOTOOLS_DLLPUBLIC bool MakeFolder(
ucbhelper::Content & parent, rtl::OUString const & title,
ucbhelper::Content & result, bool exclusive = false);
+/// @return the value of the "Size" property of the given content, or zero if
+/// obtaining the property yields a void value or raises a
+/// non-RuntimeException (RuntimeExceptions are passed through)
UNOTOOLS_DLLPUBLIC sal_Int64 GetSize(rtl::OUString const & url);
UNOTOOLS_DLLPUBLIC bool IsYounger(