diff options
author | Vishv Brahmbhatt <vishvbrahmbhatt19@gmail.com> | 2013-08-28 01:52:17 +0530 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-09-10 13:14:30 +0200 |
commit | d50bd55c5d78dc10d40be502f8d6638bcc0ce890 (patch) | |
tree | e65f13d467edd623699ebcbb3c6ae30f98eeae7b /include | |
parent | b1e464999e387e44f0e021d52f2673c2fe7822a0 (diff) |
Parsing master presentation objects from 'objectlist.xml'
Parsing the property values of master presentation objects.
Also new functions added to comphelper module for expanding
filepaths macro to appropriate system file paths(for
configuration files present at 'Impress.xcs')
Change-Id: If0381a12155673e85103ddb5d51c34ae53fe2ecb
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/expandmacro.hxx | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/include/comphelper/expandmacro.hxx b/include/comphelper/expandmacro.hxx new file mode 100644 index 000000000000..efd255249aa2 --- /dev/null +++ b/include/comphelper/expandmacro.hxx @@ -0,0 +1,57 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * 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/. + */ + +#ifndef COMPHELPER_EXPANDMACRO_HXX_INCLUDED +#define COMPHELPER_EXPANDMACRO_HXX_INCLUDED + +#include "rtl/ustring.hxx" +#include "comphelper/comphelperdllapi.h" +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/XComponentContext.hpp> + +namespace comphelper +{ + /** + A helper function to get expanded version of macro for filepaths. + + If the given path is prefixed by "vnd.sun.star.expand:", this + function substitutes contained macro references. It then always + returns a system file path, if necessary converting file + URIs. Example: + vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR gets + converted to e.g. /usr/lib64/libreoffice/share. + + @param path to operate on. Both system file path and file URIs are accepted. + + @return macro-expanded system file path. + */ + COMPHELPER_DLLPUBLIC rtl::OUString getExpandedFilePath(const rtl::OUString& filepath); + + /** + A helper function to get expanded version of macro for filepaths. + + If the given path is prefixed by "vnd.sun.star.expand:", this + function substitutes contained macro references. It then always + returns a system file path, if necessary converting file + URIs. Example: + vnd.sun.star.expand:$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR gets + converted to e.g. /usr/lib64/libreoffice/share. + + Use this version if you have a local reference of a component + context at hand, saves us the extra lookup. + + @param path to operate on. Both system file path and file URIs are accepted. + @param xContext refers to the component context of the process. + + @return macro-expanded system file path. + */ + COMPHELPER_DLLPUBLIC rtl::OUString getExpandedFilePath(const rtl::OUString& filepath, + const ::com::sun::star::uno::Reference<css::uno::XComponentContext>& xContext); +} +#endif |