22#if !defined WIN32_LEAN_AND_MEAN
23# define WIN32_LEAN_AND_MEAN
29#include <osl/module.hxx>
30#include <rtl/ustring.hxx>
31#include <osl/file.hxx>
55 "/../" LIBO_URE_ETC_FOLDER
59 SAL_INFO(
"jfw.level2",
"Using configuration file " << sIni);
67 static osl::Mutex SINGLETON;
74 static const char EncodingTable[] =
75 {
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F'};
76 sal_Int32 lenRaw = rawData.getLength();
77 std::unique_ptr<char[]> pBuf(
new char[lenRaw * 2]);
78 const sal_Int8* arRaw = rawData.getConstArray();
80 char* pCurBuf = pBuf.get();
81 for (
int i = 0;
i < lenRaw;
i++)
83 unsigned char curChar = arRaw[
i];
86 *pCurBuf = EncodingTable[curChar];
92 *pCurBuf = EncodingTable[curChar];
96 rtl::ByteSequence ret(
reinterpret_cast<sal_Int8*
>(pBuf.get()), lenRaw * 2);
102 static const char decodingTable[] =
103 {
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'A',
'B',
'C',
'D',
'E',
'F'};
104 sal_Int32 lenData = data.getLength();
105 sal_Int32 lenBuf = lenData / 2;
106 std::unique_ptr<unsigned char[]> pBuf(
new unsigned char[lenBuf]);
108 for (sal_Int32
i = 0;
i < lenBuf;
i++)
113 unsigned char nibble = 0;
114 for (
unsigned char j = 0; j < 16; j++)
116 if (curChar == decodingTable[j])
125 for (
unsigned char j = 0; j < 16; j++)
127 if (curChar == decodingTable[j])
135 rtl::ByteSequence ret(
reinterpret_cast<sal_Int8*
>(pBuf.get()), lenBuf );
141 size_t index = usFilePath.rfind(
'/');
142 return OUString(usFilePath.substr(0,
index));
147 OUString libraryFileUrl;
149 if (!osl::Module::getUrlFromAddress(
153 "[Java framework] Error in function getLibraryLocation (fwkutil.cxx).");
162 File::RC rc_item = DirectoryItem::get(sURL, item);
163 if (File::E_None == rc_item)
167 File::RC rc_stat = item.getFileStatus(status);
168 if (File::E_None == rc_stat)
172 else if (File::E_NOENT == rc_stat)
181 else if (File::E_NOENT == rc_item)
#define SAL_CONFIGFILE(name)
#define SAL_INFO(area, stream)
std::unique_ptr< sal_Int32[]> pData
Reference< XComponentContext > SAL_CALL bootstrap()
const rtl::Bootstrap * Bootstrap()
provides a bootstrap class which already knows the values from the jvmfkwrc file.
rtl::ByteSequence encodeBase16(const rtl::ByteSequence &rawData)
OUString getDirFromFile(std::u16string_view usFilePath)
rtl::ByteSequence decodeBase16(const rtl::ByteSequence &data)
jfw::FileStatus checkFileURL(const OUString &sURL)
checks if the URL is a file.
OUString getLibraryLocation()
Returns the file URL of the directory where the framework library (this library) resides.