2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 22:04:38 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2006-09-17 01:50:39 +00:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
#include "java/lang/String.hxx"
|
|
|
|
#include "java/tools.hxx"
|
|
|
|
using namespace connectivity;
|
2014-02-25 17:59:09 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
//************ Class: java.lang.String
|
2014-02-25 17:59:09 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2015-11-10 10:12:07 +01:00
|
|
|
jclass java_lang_String::theClass = nullptr;
|
2000-09-18 15:18:56 +00:00
|
|
|
|
|
|
|
java_lang_String::~java_lang_String()
|
|
|
|
{}
|
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
jclass java_lang_String::getMyClass() const
|
|
|
|
{
|
|
|
|
return st_getMyClass();
|
|
|
|
}
|
|
|
|
jclass java_lang_String::st_getMyClass()
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
2011-03-23 23:16:24 +01:00
|
|
|
// the class needs to be fetched only once, that is why it is static
|
2009-04-23 10:42:05 +00:00
|
|
|
if( !theClass )
|
|
|
|
theClass = findMyClass("java/lang/String");
|
2000-09-18 15:18:56 +00:00
|
|
|
return theClass;
|
|
|
|
}
|
2003-04-24 12:22:38 +00:00
|
|
|
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
java_lang_String::operator OUString()
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
|
|
|
SDBThreadAttach t;
|
|
|
|
if(!t.pEnv)
|
2013-04-07 12:06:47 +02:00
|
|
|
return OUString();
|
2014-10-02 08:40:50 +02:00
|
|
|
return JavaString2String(t.pEnv, static_cast<jstring>(object));
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
|
|
|
|
2010-10-12 15:53:47 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|