2 * This file is part of the LibreOffice project.
4 * This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 * This file incorporates work covered by the following license notice:
10 * Licensed to the Apache Software Foundation (ASF) under one or more
11 * contributor license agreements. See the NOTICE file distributed
12 * with this work for additional information regarding copyright
13 * ownership. The ASF licenses this file to you under the Apache
14 * License, Version 2.0 (the "License"); you may not use this file
15 * except in compliance with the License. You may obtain a copy of
16 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 * This container class should help to handle the name of the current document
25 public class NameHelper
35 String m_sRelativeOutputPath
;
40 String m_sNameNoSuffix
;
43 public NameHelper(String _sOutputPath
, String _sRelativeOutputPath
, String _sBasename
)
45 m_sOutputPath
= _sOutputPath
;
46 m_sRelativeOutputPath
= _sRelativeOutputPath
;
47 String sNameNoSuffix
= FileHelper
.getNameNoSuffix(_sBasename
);
48 m_sNameNoSuffix
= sNameNoSuffix
;
49 m_sSuffix
= FileHelper
.getSuffix(_sBasename
);
52 * @return the OutputPath
54 public String
getOutputPath() {return m_sOutputPath
;}
57 * @return the relative OutputPath
59 public String
getRelativePath() {return m_sRelativeOutputPath
;}
62 * @return the document name without it's suffix
64 public String
getName() {return m_sNameNoSuffix
;}
67 * @return the document suffix from the original document
69 public String
getSuffix() {return m_sSuffix
;}
73 GlobalLogWriter
.get().println(" Outputpath: " + m_sOutputPath
);
74 GlobalLogWriter
.get().println("relative Outputpath: " + m_sRelativeOutputPath
);
75 GlobalLogWriter
.get().println(" Name: " + m_sNameNoSuffix
);
76 GlobalLogWriter
.get().println(" Suffix: " + m_sSuffix
);