merge the formfield patch from ooo-build
[ooovba.git] / qadevOOo / runner / convwatch / NameHelper.java
blob311c5bdd417f9f305d69966cdf2fc6e72afca796
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: NameHelper.java,v $
10 * $Revision: 1.5.8.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 package convwatch;
33 /**
34 * This container class should help to handle the name of the current document
37 public class NameHelper
39 /**
42 String m_sOutputPath;
44 /**
47 String m_sRelativeOutputPath;
49 /**
52 String m_sNameNoSuffix;
53 String m_sSuffix;
55 public NameHelper(String _sOutputPath, String _sRelativeOutputPath, String _sBasename)
57 m_sOutputPath = _sOutputPath;
58 m_sRelativeOutputPath = _sRelativeOutputPath;
59 String sNameNoSuffix = FileHelper.getNameNoSuffix(_sBasename);
60 m_sNameNoSuffix = sNameNoSuffix;
61 m_sSuffix = FileHelper.getSuffix(_sBasename);
63 /**
64 * @return the OutputPath
66 public String getOutputPath() {return m_sOutputPath;}
68 /**
69 * @return the relative OutputPath
71 public String getRelativePath() {return m_sRelativeOutputPath;}
73 /**
74 * @return the document name without it's suffix
76 public String getName() {return m_sNameNoSuffix;}
78 /**
79 * @return the document suffix from the original document
81 public String getSuffix() {return m_sSuffix;}
83 public void print()
85 GlobalLogWriter.get().println(" Outputpath: " + m_sOutputPath);
86 GlobalLogWriter.get().println("relative Outputpath: " + m_sRelativeOutputPath);
87 GlobalLogWriter.get().println(" Name: " + m_sNameNoSuffix);
88 GlobalLogWriter.get().println(" Suffix: " + m_sSuffix);