2010-10-14 08:27:31 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-07-11 09:51:50 +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 .
|
|
|
|
*/
|
2013-10-23 19:16:30 +02:00
|
|
|
#ifndef INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
|
|
|
|
#define INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
|
2007-04-11 18:31:39 +00:00
|
|
|
|
2017-05-18 17:44:09 +02:00
|
|
|
#include <rtl/ustring.hxx>
|
2013-11-09 15:34:19 -06:00
|
|
|
#include <unotools/unotoolsdllapi.h>
|
2009-10-06 07:38:24 +02:00
|
|
|
#include <unotools/options.hxx>
|
2007-04-11 18:31:39 +00:00
|
|
|
|
|
|
|
#define SVT_SEARCHPATH_DELIMITER ';'
|
|
|
|
|
|
|
|
class SvtPathOptions_Impl;
|
2016-01-25 17:48:15 +01:00
|
|
|
|
|
|
|
/*! Handle various defined paths
|
|
|
|
|
|
|
|
All path functions return URLs!
|
|
|
|
*/
|
2015-12-10 13:30:01 +01:00
|
|
|
class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtPathOptions : public utl::detail::Options
|
2007-04-11 18:31:39 +00:00
|
|
|
{
|
|
|
|
private:
|
2016-05-29 20:52:09 +02:00
|
|
|
std::shared_ptr<SvtPathOptions_Impl> pImpl;
|
2007-04-11 18:31:39 +00:00
|
|
|
|
|
|
|
public:
|
2012-04-09 13:53:34 +03:00
|
|
|
enum Paths
|
2007-04-11 18:31:39 +00:00
|
|
|
{
|
|
|
|
PATH_ADDIN,
|
|
|
|
PATH_AUTOCORRECT,
|
|
|
|
PATH_AUTOTEXT,
|
|
|
|
PATH_BACKUP,
|
|
|
|
PATH_BASIC,
|
|
|
|
PATH_BITMAP,
|
|
|
|
PATH_CONFIG,
|
|
|
|
PATH_DICTIONARY,
|
|
|
|
PATH_FAVORITES,
|
|
|
|
PATH_FILTER,
|
|
|
|
PATH_GALLERY,
|
|
|
|
PATH_GRAPHIC,
|
|
|
|
PATH_HELP,
|
2017-10-12 14:48:56 +01:00
|
|
|
PATH_ICONSET,
|
2007-04-11 18:31:39 +00:00
|
|
|
PATH_LINGUISTIC,
|
|
|
|
PATH_MODULE,
|
|
|
|
PATH_PALETTE,
|
|
|
|
PATH_PLUGIN,
|
2017-10-06 12:04:39 +02:00
|
|
|
PATH_STORAGE,
|
2007-04-11 18:31:39 +00:00
|
|
|
PATH_TEMP,
|
|
|
|
PATH_TEMPLATE,
|
|
|
|
PATH_USERCONFIG,
|
|
|
|
PATH_WORK,
|
2016-03-02 12:26:06 +01:00
|
|
|
PATH_CLASSIFICATION,
|
2007-04-11 18:31:39 +00:00
|
|
|
PATH_UICONFIG,
|
2007-06-19 14:59:17 +00:00
|
|
|
PATH_FINGERPRINT,
|
2007-04-11 18:31:39 +00:00
|
|
|
PATH_COUNT // should always be the last element
|
|
|
|
};
|
|
|
|
|
|
|
|
SvtPathOptions();
|
2016-09-13 13:09:01 +02:00
|
|
|
virtual ~SvtPathOptions() override;
|
2007-04-11 18:31:39 +00:00
|
|
|
|
2012-02-01 14:42:58 +01:00
|
|
|
// get the paths, not const because of using a mutex
|
2013-07-01 10:33:48 -05:00
|
|
|
const OUString& GetAddinPath() const;
|
|
|
|
const OUString& GetAutoCorrectPath() const;
|
|
|
|
const OUString& GetAutoTextPath() const;
|
|
|
|
const OUString& GetBackupPath() const;
|
|
|
|
const OUString& GetBasicPath() const;
|
|
|
|
const OUString& GetBitmapPath() const;
|
|
|
|
const OUString& GetConfigPath() const;
|
|
|
|
const OUString& GetDictionaryPath() const;
|
|
|
|
const OUString& GetFavoritesPath() const;
|
|
|
|
const OUString& GetFilterPath() const;
|
|
|
|
const OUString& GetGalleryPath() const;
|
|
|
|
const OUString& GetGraphicPath() const;
|
|
|
|
const OUString& GetHelpPath() const;
|
|
|
|
const OUString& GetLinguisticPath() const;
|
|
|
|
const OUString& GetModulePath() const;
|
2017-10-12 14:48:56 +01:00
|
|
|
const OUString& GetIconsetPath() const;
|
2013-07-01 10:33:48 -05:00
|
|
|
const OUString& GetPalettePath() const;
|
|
|
|
const OUString& GetPluginPath() const;
|
2017-10-06 12:04:39 +02:00
|
|
|
const OUString& GetStoragePath() const;
|
2013-07-01 10:33:48 -05:00
|
|
|
const OUString& GetTempPath() const;
|
|
|
|
const OUString& GetTemplatePath() const;
|
|
|
|
const OUString& GetUserConfigPath() const;
|
|
|
|
const OUString& GetWorkPath() const;
|
|
|
|
const OUString& GetFingerprintPath() const;
|
2016-03-02 11:45:45 +01:00
|
|
|
const OUString& GetClassificationPath() const;
|
2007-04-11 18:31:39 +00:00
|
|
|
|
2012-02-01 14:42:58 +01:00
|
|
|
// set the paths
|
2013-07-01 10:33:48 -05:00
|
|
|
void SetAddinPath( const OUString& rPath );
|
|
|
|
void SetAutoCorrectPath( const OUString& rPath );
|
|
|
|
void SetAutoTextPath( const OUString& rPath );
|
|
|
|
void SetBackupPath( const OUString& rPath );
|
|
|
|
void SetBasicPath( const OUString& rPath );
|
|
|
|
void SetBitmapPath( const OUString& rPath );
|
|
|
|
void SetConfigPath( const OUString& rPath );
|
|
|
|
void SetDictionaryPath( const OUString& rPath );
|
|
|
|
void SetFavoritesPath( const OUString& rPath );
|
|
|
|
void SetFilterPath( const OUString& rPath );
|
|
|
|
void SetGalleryPath( const OUString& rPath );
|
|
|
|
void SetGraphicPath( const OUString& rPath );
|
|
|
|
void SetHelpPath( const OUString& rPath );
|
|
|
|
void SetLinguisticPath( const OUString& rPath );
|
|
|
|
void SetModulePath( const OUString& rPath );
|
|
|
|
void SetPalettePath( const OUString& rPath );
|
|
|
|
void SetPluginPath( const OUString& rPath );
|
2017-10-06 12:04:39 +02:00
|
|
|
void SetStoragePath( const OUString& rPath );
|
2013-07-01 10:33:48 -05:00
|
|
|
void SetTempPath( const OUString& rPath );
|
|
|
|
void SetTemplatePath( const OUString& rPath );
|
|
|
|
void SetUserConfigPath( const OUString& rPath );
|
|
|
|
void SetWorkPath( const OUString& rPath );
|
2007-04-11 18:31:39 +00:00
|
|
|
|
2013-06-05 17:12:39 +02:00
|
|
|
OUString SubstituteVariable( const OUString& rVar ) const;
|
|
|
|
OUString ExpandMacros( const OUString& rPath ) const;
|
|
|
|
OUString UseVariable( const OUString& rVar ) const;
|
2013-07-01 10:33:48 -05:00
|
|
|
bool SearchFile( OUString& rIniFile, Paths ePath = PATH_USERCONFIG );
|
2007-04-11 18:31:39 +00:00
|
|
|
};
|
|
|
|
|
2013-10-23 19:16:30 +02:00
|
|
|
#endif // INCLUDED_UNOTOOLS_PATHOPTIONS_HXX
|
2007-04-11 18:31:39 +00:00
|
|
|
|
2010-10-14 08:27:31 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|