diff options
Diffstat (limited to 'linguistic/source/misc2.cxx')
-rw-r--r-- | linguistic/source/misc2.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/linguistic/source/misc2.cxx b/linguistic/source/misc2.cxx index 297366322f..ffd54b78f8 100644 --- a/linguistic/source/misc2.cxx +++ b/linguistic/source/misc2.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2008 by Sun Microsystems, Inc. * * OpenOffice.org - a multi-platform office productivity suite @@ -35,7 +35,7 @@ #include <tools/urlobj.hxx> #include <ucbhelper/content.hxx> #include <tools/debug.hxx> -#include <svtools/pathoptions.hxx> +#include <unotools/pathoptions.hxx> #include <unotools/processfactory.hxx> #include <unotools/localfilehelper.hxx> #include <unotools/localedatawrapper.hxx> @@ -63,7 +63,7 @@ BOOL FileExists( const String &rMainURL ) { try { - ::ucbhelper::Content aContent( rMainURL, + ::ucbhelper::Content aContent( rMainURL, uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >()); bExists = aContent.isDocument(); } @@ -99,7 +99,7 @@ String GetFileURL( SvtPathOptions::Pathes ePath, const String &rFileName ) String GetModulePath( SvtPathOptions::Pathes ePath, BOOL bAddAccessDelim ) { String aRes; - + SvtPathOptions aPathOpt; switch (ePath) { @@ -131,7 +131,7 @@ String GetModulePath( SvtPathOptions::Pathes ePath, BOOL bAddAccessDelim ) aRes += '/'; #endif } - + return aRes; } @@ -146,7 +146,7 @@ rtl::OUString StripTrailingChars( rtl::OUString &rTxt, sal_Unicode cChar ) sal_Int32 nIdx = nTxtLen - 1; while (nIdx >= 0 && rTxt[ nIdx-- ] == cChar) ++nTrailing; - + rtl::OUString aRes( rTxt.copy( nTxtLen - nTrailing ) ); rTxt = rTxt.copy( 0, nTxtLen - nTrailing ); return aRes; @@ -154,7 +154,7 @@ rtl::OUString StripTrailingChars( rtl::OUString &rTxt, sal_Unicode cChar ) /////////////////////////////////////////////////////////////////////////// -static uno::Sequence< rtl::OUString > GetMultiPaths_Impl( +static uno::Sequence< rtl::OUString > GetMultiPaths_Impl( const rtl::OUString &rPathPrefix, sal_Int16 nPathFlags ) { @@ -162,7 +162,7 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl( uno::Sequence< rtl::OUString > aInternalPaths; uno::Sequence< rtl::OUString > aUserPaths; rtl::OUString aWritablePath; - + bool bSuccess = true; uno::Reference< lang::XMultiServiceFactory > xMgr( utl::getProcessServiceFactory() ); if (xMgr.is()) @@ -176,7 +176,7 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl( aUser .AppendAscii( "_user" ); aWriteable.AppendAscii( "_writable" ); - uno::Reference< beans::XPropertySet > xPathSettings( xMgr->createInstance( + uno::Reference< beans::XPropertySet > xPathSettings( xMgr->createInstance( A2OU( "com.sun.star.util.PathSettings" ) ), uno::UNO_QUERY_THROW ); xPathSettings->getPropertyValue( aInternal ) >>= aInternalPaths; xPathSettings->getPropertyValue( aUser ) >>= aUserPaths; @@ -185,7 +185,7 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl( catch (uno::Exception &) { bSuccess = false; - } + } } if (bSuccess) { @@ -211,10 +211,10 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl( const bool bAddInternal = &rPathSeq == &aInternalPaths && (nPathFlags & PATH_FLAG_INTERNAL); if ((bAddUser || bAddInternal) && pPathSeq[k].getLength() > 0) pRes[ nCount++ ] = pPathSeq[k]; - } - } + } + } aRes.realloc( nCount ); - } + } return aRes; } @@ -227,17 +227,17 @@ rtl::OUString GetDictionaryWriteablePath() if (aPaths.getLength() > 0) aRes = aPaths[0]; return aRes; -} +} uno::Sequence< rtl::OUString > GetDictionaryPaths( sal_Int16 nPathFlags ) { return GetMultiPaths_Impl( A2OU("Dictionary"), nPathFlags ); } - + uno::Sequence< rtl::OUString > GetLinguisticPaths( sal_Int16 nPathFlags ) { return GetMultiPaths_Impl( A2OU("Linguistic"), nPathFlags ); -} +} String GetWritableDictionaryURL( const String &rDicName ) { @@ -256,12 +256,12 @@ String GetWritableDictionaryURL( const String &rDicName ) } -String SearchFileInPaths( - const String &rFile, +String SearchFileInPaths( + const String &rFile, const uno::Sequence< rtl::OUString > &rPaths ) { //!! see also SvtPathOptions::SearchFile for the riginal code - + String aRes; // check in all paths... @@ -295,7 +295,7 @@ String SearchFileInPaths( } return aRes; -} +} } // namespace linguistic |