summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2004-04-27 15:08:42 +0000
committerOliver Bolte <obo@openoffice.org>2004-04-27 15:08:42 +0000
commita45763c8d12a937baa658a698847a7eca26ecd63 (patch)
tree2ba5c7a78d3cf7df1cca9ae1b91077325407373a
parentb522b828081dfd8296ecd31084494e11a4fdceae (diff)
INTEGRATION: CWS tl01 (1.19.4); FILE MERGED
2004/01/29 21:29:29 gt 1.19.4.2: RESYNC: (1.19-1.20); FILE MERGED 2003/07/25 13:18:52 tl 1.19.4.1: #110762# API for Hangul/Hanja text conversion user-dictionaries
-rw-r--r--linguistic/source/misc.cxx42
1 files changed, 40 insertions, 2 deletions
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 35052820eaaf..10c8823186bb 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: misc.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: rt $ $Date: 2003-12-01 16:20:44 $
+ * last change: $Author: obo $ $Date: 2004-04-27 16:08:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -77,7 +77,13 @@
#ifndef _SVTOOLS_LNGMISC_HXX_
#include <svtools/lngmisc.hxx>
#endif
+#ifndef _UCBHELPER_CONTENT_HXX
+#include <ucbhelper/content.hxx>
+#endif
+#ifndef _COM_SUN_STAR_UCB_XCOMMANDENVIRONMENT_HPP_
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#endif
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
@@ -413,6 +419,38 @@ uno::Sequence< INT16 >
///////////////////////////////////////////////////////////////////////////
+BOOL IsReadOnly( const String &rURL, BOOL *pbExist )
+{
+ BOOL bRes = FALSE;
+ BOOL bExists = FALSE;
+
+ if (rURL.Len() > 0)
+ {
+ try
+ {
+ Reference< ::com::sun::star::ucb::XCommandEnvironment > xCmdEnv;
+ ::ucb::Content aContent( rURL, xCmdEnv );
+
+ bExists = aContent.isDocument();
+ if (bExists)
+ {
+ Any aAny( aContent.getPropertyValue( A2OU( "IsReadOnly" ) ) );
+ aAny >>= bRes;
+ }
+ }
+ catch (Exception &)
+ {
+ bRes = TRUE;
+ }
+ }
+
+ if (pbExist)
+ *pbExist = bExists;
+ return bRes;
+}
+
+///////////////////////////////////////////////////////////////////////////
+
static BOOL GetAltSpelling( INT16 &rnChgPos, INT16 &rnChgLen, OUString &rRplc,
Reference< XHyphenatedWord > &rxHyphWord )