LibreOffice Module sfx2 (master) 1
objshimp.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#ifndef INCLUDED_SFX2_SOURCE_INC_OBJSHIMP_HXX
20#define INCLUDED_SFX2_SOURCE_INC_OBJSHIMP_HXX
21
22#include <com/sun/star/uno/Sequence.hxx>
23#include <rtl/ustring.hxx>
24#include <rtl/ref.hxx>
25#include <tools/datetime.hxx>
26
27#include <sfx2/objsh.hxx>
28#include <sfx2/docmacromode.hxx>
29#include <sfx2/namedcolor.hxx>
30#include <bitset.hxx>
31#include <vcl/timer.hxx>
32
33#include "appbaslib.hxx"
34
35namespace svtools { class AsynchronLink; }
36
37class SfxViewFrame;
38
40
41class AutoReloadTimer_Impl final : public Timer
42{
43 OUString aUrl;
45
46public:
47 AutoReloadTimer_Impl( OUString aURL, sal_uInt32 nTime,
48 SfxObjectShell* pSh );
49 virtual void Invoke() override;
50};
51
53{
54 std::unique_ptr<::comphelper::EmbeddedObjectContainer> mxObjectContainer;
57 css::uno::Reference< css::script::XLibraryContainer >
59 css::uno::Reference< css::script::XLibraryContainer >
64 OUString aTitle;
65 OUString aTempName;
70 bool bClosing:1, // sal_True while Close(), to prevent recurrences Notification
73 bIsAbortingImport:1, // Import operation should be canceled.
78 bIsPrintJobCancelable :1, // Stampit disable/enable cancel button for print jobs ... default = true = enable!
81 bModelInitialized:1, // whether the related model is initialized
83 m_bMacroSignBroken:1, // whether the macro signature was explicitly broken
91 m_bSharedXMLFlag:1, // whether the document should be edited in shared mode
92 m_bAllowShareControlFileClean:1, // whether the flag should be stored in xml file
93 m_bConfigOptionsChecked:1, // whether or not the user options are checked after the Options dialog is closed.
94 m_bMacroCallsSeenWhileLoading:1; // whether or not the user options are checked after the Options dialog is closed.
95
98 SfxEventHintId nEventId; // If Open/Create as to be sent
99 // before Activate
100 std::unique_ptr<AutoReloadTimer_Impl> pReloadTimer;
109 sal_uInt16 nStyleFilter;
110
113
116
118 css::uno::Reference< css::embed::XStorage > m_xDocStorage;
119
121
123
125
126 // TODO/LATER: m_aModifyPasswordInfo should completely replace m_nModifyPasswordHash in future
128 css::uno::Sequence< css::beans::PropertyValue > m_aModifyPasswordInfo;
133
135 std::vector<InfobarData> m_aPendingInfobars;
136
137 // Recent colors used by toolbar buttons
138 std::unordered_map<sal_uInt16, NamedColor> m_aRecentColors;
139
140 SfxObjectShell_Impl( SfxObjectShell& _rDocShell );
141 virtual ~SfxObjectShell_Impl();
142
143 // IMacroDocumentAccess overridables
144 virtual sal_Int16 getCurrentMacroExecMode() const override;
145 virtual void setCurrentMacroExecMode( sal_uInt16 nMacroMode ) override;
146 virtual OUString getDocumentLocation() const override;
147 virtual bool documentStorageHasMacros() const override;
148 virtual bool macroCallsSeenWhileLoading() const override;
149 virtual css::uno::Reference< css::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const override;
151
152 virtual bool hasTrustedScriptingSignature( bool bAllowUIToAddAuthor ) override;
153};
154
155#endif
156
157/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AutoReloadTimer_Impl(OUString aURL, sal_uInt32 nTime, SfxObjectShell *pSh)
Definition: objmisc.cxx:1280
SfxObjectShell * pObjSh
Definition: objshimp.hxx:44
virtual void Invoke() override
Definition: objmisc.cxx:1288
helper class which holds and manipulates a BasicManager
Definition: appbaslib.hxx:35
encapsulates handling the macro mode of a document
provides access to several settings of a document, which are needed by ->DocumentMacroMode to properl...
SfxEventHintId
Definition: event.hxx:116
MapUnit
SfxLoadedFlags
Definition: objsh.hxx:123
SignatureState
bool m_bIncomplEncrWarnShown
Definition: objshimp.hxx:124
virtual sal_Int16 getCurrentMacroExecMode() const override
retrieves the current MacroExecutionMode.
Definition: objmisc.cxx:1724
virtual OUString getDocumentLocation() const override
returns the origin of the document
Definition: objmisc.cxx:1749
virtual bool macroCallsSeenWhileLoading() const override
checks whether the document's contained calls to macros or scripts after loading
Definition: objmisc.cxx:1777
bool m_bMacroCallsSeenWhileLoading
Definition: objshimp.hxx:94
bool bIsPrintJobCancelable
Definition: objshimp.hxx:78
bool m_bSavingForSigning
If true, then this is not a real save, just the signatures change.
Definition: objshimp.hxx:131
OUString m_aSharedFileURL
Definition: objshimp.hxx:122
SignatureState nScriptingSignatureState
Definition: objshimp.hxx:69
::sfx2::DocumentMacroMode aMacroMode
Definition: objshimp.hxx:62
std::unique_ptr<::comphelper::EmbeddedObjectContainer > mxObjectContainer
Definition: objshimp.hxx:54
SfxLoadedFlags nFlagsInProgress
Definition: objshimp.hxx:102
std::unique_ptr< AutoReloadTimer_Impl > pReloadTimer
Definition: objshimp.hxx:100
virtual css::uno::Reference< css::document::XEmbeddedScripts > getEmbeddedDocumentScripts() const override
provides access to the XEmbeddedScripts interface of the document
Definition: objmisc.cxx:1782
OUString aTempName
Definition: objshimp.hxx:65
tools::Rectangle m_aVisArea
Definition: objshimp.hxx:114
virtual ~SfxObjectShell_Impl()
Definition: objxtor.cxx:238
bool m_bModifyPasswordEntered
Definition: objshimp.hxx:129
SfxObjectShell & rDocShell
Definition: objshimp.hxx:56
sal_uInt16 nStyleFilter
Definition: objshimp.hxx:109
virtual void setCurrentMacroExecMode(sal_uInt16 nMacroMode) override
sets the MacroExecutionMode of the document, as calculated by the DocumentMacroMode class.
Definition: objmisc.cxx:1739
SfxProgress * pProgress
Definition: objshimp.hxx:63
SfxObjectShell_Impl(SfxObjectShell &_rDocShell)
Definition: objxtor.cxx:180
sal_uInt16 nVisualDocumentNumber
Definition: objshimp.hxx:67
css::uno::Reference< css::script::XLibraryContainer > xDialogLibraries
Definition: objshimp.hxx:60
css::uno::Reference< css::embed::XStorage > m_xDocStorage
Definition: objshimp.hxx:118
sal_uInt32 m_nModifyPasswordHash
Definition: objshimp.hxx:127
IndexBitSet aBitSet
Definition: objshimp.hxx:96
bool m_bAllowShareControlFileClean
Definition: objshimp.hxx:92
SignatureState nDocumentSignatureState
Definition: objshimp.hxx:68
virtual bool documentStorageHasMacros() const override
checks whether the document's storage contains sub storages with macros or scripts
Definition: objmisc.cxx:1772
bool m_bConfigOptionsChecked
Definition: objshimp.hxx:93
virtual bool hasTrustedScriptingSignature(bool bAllowUIToAddAuthor) override
allows to detect whether there is a trusted scripting signature
Definition: objmisc.cxx:1800
css::uno::Sequence< css::beans::PropertyValue > m_aModifyPasswordInfo
Definition: objshimp.hxx:128
bool m_bDocRecoverySupport
Definition: objshimp.hxx:85
SfxBasicManagerHolder aBasicManager
Definition: objshimp.hxx:55
bool m_bNoBasicCapabilities
Definition: objshimp.hxx:84
bool m_bAllowModifiedBackAfterSigning
Definition: objshimp.hxx:132
::rtl::Reference< SfxBaseModel > pBaseModel
Definition: objshimp.hxx:108
tools::SvRef< SvRefBase > xHeaderAttributes
Definition: objshimp.hxx:106
SfxEventHintId nEventId
Definition: objshimp.hxx:98
virtual SignatureState getScriptingSignatureState() override
returns the state of the signatures for the scripts embedded in the document
Definition: objmisc.cxx:1787
SfxLoadedFlags nLoadedFlags
Definition: objshimp.hxx:101
css::uno::Reference< css::script::XLibraryContainer > xBasicLibraries
Definition: objshimp.hxx:58
std::vector< InfobarData > m_aPendingInfobars
Holds Infobars until View is fully loaded.
Definition: objshimp.hxx:135
std::unordered_map< sal_uInt16, NamedColor > m_aRecentColors
Definition: objshimp.hxx:138