Avoid potential negative array index access to cached text.
[LibreOffice.git] / include / sfx2 / IDocumentModelAccessor.hxx
blob9980ce09992ecacee8b6fdb41d6291156e591ef7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 */
11 #pragma once
13 #include <sfx2/dllapi.h>
14 #include <i18nlangtag/lang.h>
15 #include <rtl/ustring.hxx>
16 #include <vector>
18 namespace sfx
20 /** Currency ID, to identify the currency in the currency list */
21 struct SFX2_DLLPUBLIC CurrencyID
23 OUString aSymbol;
24 OUString aExtension;
25 LanguageType eLanguage;
28 /** Document model accessor, used to access parts of the document model.
30 * This is useful when some common parts of the model are needed, but can
31 * only access the model indirecly from other modules that can access
32 * SfxObjectShell, but don't have a direct access to the document model
33 * (and access through UNO would be inconvenient).
35 * For example - get information about various parts of the document in
36 * generic dialogs (in CUI).
38 class SFX2_DLLPUBLIC IDocumentModelAccessor
40 public:
41 virtual std::vector<CurrencyID> getDocumentCurrencies() const { return {}; }
42 virtual ~IDocumentModelAccessor() = default;
45 } // end sfx namespace
47 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */