diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-11 11:17:42 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-03-11 13:42:07 +0100 |
commit | 9db5512084bb0df58322d755b7b1770a9779ab57 (patch) | |
tree | 80070277adbe750be5a341b70b9f4e94e3f2cf5b /sc/inc | |
parent | 7f1d68a798fcde681fb01a17f0ff0fd4b2b6fb7f (diff) |
sc: make metadata available in copy result
Calc had the same problem as Writer: metadata is part of the doc shell,
but the clipboard document has no doc shell. So need to store this info
in ScDocument in some way in the clipboard case.
10:45 <@moggi> vmiklos: I would most likely add a ScClipOptions similar to ScDocOptions and only populate it in the clip document
Change-Id: I4ad01faa55cfb6fb58213d67003c8c0f9849800d
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/clipoptions.hxx | 25 | ||||
-rw-r--r-- | sc/inc/document.hxx | 5 |
2 files changed, 30 insertions, 0 deletions
diff --git a/sc/inc/clipoptions.hxx b/sc/inc/clipoptions.hxx new file mode 100644 index 000000000000..d4ccb59b4dee --- /dev/null +++ b/sc/inc/clipoptions.hxx @@ -0,0 +1,25 @@ +/* -*- 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 INCLUDED_SC_INC_CLIPOPTIONS_HXX +#define INCLUDED_SC_INC_CLIPOPTIONS_HXX + +#include <com/sun/star/document/XDocumentProperties.hpp> + +/// Stores options which are only relevant for clipboard documents. +class SC_DLLPUBLIC ScClipOptions +{ +public: + /// Document properties. + css::uno::Reference<css::document::XDocumentProperties> m_xDocumentProperties; +}; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index e486b04e2f21..7da2b4d50849 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -117,6 +117,7 @@ class ScBroadcastAreaSlotMachine; class ScChangeViewSettings; class ScChartCollection; class ScChartListenerCollection; +class ScClipOptions; class ScConditionalFormat; class ScConditionalFormatList; class ScDBCollection; @@ -351,6 +352,7 @@ private: ScViewOptions* pViewOptions; // view options ScDocOptions* pDocOptions; // document options ScExtDocOptions* pExtDocOptions; // for import etc. + std::unique_ptr<ScClipOptions> mpClipOptions; // clipboard options ScConsolidateParam* pConsolidateDlgData; ScRecursionHelper* pRecursionHelper; // information for recursive and iterative cell formulas @@ -506,6 +508,9 @@ public: ScExtDocOptions* GetExtDocOptions() { return pExtDocOptions; } SC_DLLPUBLIC void SetExtDocOptions( ScExtDocOptions* pNewOptions ); + ScClipOptions* GetClipOptions() { return mpClipOptions.get(); } + void SetClipOptions(const ScClipOptions& rClipOptions); + SC_DLLPUBLIC void GetLanguage( LanguageType& rLatin, LanguageType& rCjk, LanguageType& rCtl ) const; void SetLanguage( LanguageType eLatin, LanguageType eCjk, LanguageType eCtl ); |