1*f7cf3d52SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*f7cf3d52SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*f7cf3d52SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*f7cf3d52SAndrew Rist * distributed with this work for additional information 6*f7cf3d52SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*f7cf3d52SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*f7cf3d52SAndrew Rist * "License"); you may not use this file except in compliance 9*f7cf3d52SAndrew Rist * with the License. You may obtain a copy of the License at 10*f7cf3d52SAndrew Rist * 11*f7cf3d52SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*f7cf3d52SAndrew Rist * 13*f7cf3d52SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*f7cf3d52SAndrew Rist * software distributed under the License is distributed on an 15*f7cf3d52SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*f7cf3d52SAndrew Rist * KIND, either express or implied. See the License for the 17*f7cf3d52SAndrew Rist * specific language governing permissions and limitations 18*f7cf3d52SAndrew Rist * under the License. 19*f7cf3d52SAndrew Rist * 20*f7cf3d52SAndrew Rist *************************************************************/ 21*f7cf3d52SAndrew Rist 22*f7cf3d52SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir package complex.dbaccess; 25cdf0e10cSrcweir 26cdf0e10cSrcweir public class FileHelper 27cdf0e10cSrcweir { FileHelper()28cdf0e10cSrcweir private FileHelper(){} getOOoCompatibleFileURL( String _javaFileURL )29cdf0e10cSrcweir static public String getOOoCompatibleFileURL( String _javaFileURL ) 30cdf0e10cSrcweir { 31cdf0e10cSrcweir String returnURL = _javaFileURL; 32cdf0e10cSrcweir if ( ( returnURL.indexOf( "file:/" ) == 0 ) && ( returnURL.indexOf( "file:///" ) == -1 ) ) 33cdf0e10cSrcweir { 34cdf0e10cSrcweir // for some reason, the URLs here in Java start with "file:/" only, instead of "file:///" 35cdf0e10cSrcweir // Some of the office code doesn't like this ... 36cdf0e10cSrcweir returnURL = "file:///" + returnURL.substring( 6 ); 37cdf0e10cSrcweir } 38cdf0e10cSrcweir return returnURL; 39cdf0e10cSrcweir } 40cdf0e10cSrcweir } 41