Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/LibreOffice/shell/inc/spsupp/   (Office von Apache Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 4 kB image not shown  

Quelle  COMOpenDocuments.hpp   Sprache: C

 
/* -*- 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_SHELL_INC_SPSUPP_COMOPENDOCUMENTS_HPP
#define INCLUDED_SHELL_INC_SPSUPP_COMOPENDOCUMENTS_HPP

#include <spsupp_h.h>
#include "COMRefCounted.hpp"
#include <Objsafe.h>
#include <assert.h>

class COMOpenDocuments : public COMRefCounted<IOWSNewDocument3, IObjectSafety>
{
public:

    class Error {
    public:
        Error(HRESULT syserr) : m_nErr(syserr) {}
        HRESULT val() const { return m_nErr; }
    private:
        HRESULT m_nErr;
    };

    COMOpenDocuments();
    virtual ~COMOpenDocuments() override;

    // IUnknown methods

    HRESULT STDMETHODCALLTYPE QueryInterface(
        REFIID riid,
        void **ppvObject) override;

    // IDispatch methods

    HRESULT STDMETHODCALLTYPE GetTypeInfoCount(
        UINT *pctinfo) override;

    HRESULT STDMETHODCALLTYPE GetTypeInfo(
        UINT iTInfo,
        LCID lcid,
        ITypeInfo **ppTInfo) override;

    HRESULT STDMETHODCALLTYPE GetIDsOfNames(
        REFIID riid,
        LPOLESTR *rgszNames,
        UINT cNames,
        LCID lcid,
        DISPID *rgDispId) override;

    HRESULT STDMETHODCALLTYPE Invoke(
        DISPID dispIdMember,
        REFIID riid,
        LCID lcid,
        WORD wFlags,
        DISPPARAMS *pDispParams,
        VARIANT *pVarResult,
        EXCEPINFO *pExcepInfo,
        UINT *puArgErr) override;

    // IOWSNewDocument methods https://msdn.microsoft.com/en-us/library/cc264316

    HRESULT STDMETHODCALLTYPE CreateNewDocument(
        BSTR bstrTemplateLocation,
        BSTR bstrDefaultSaveLocation,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE EditDocument(
        BSTR bstrDocumentLocation,
        VARIANT varProgID,
        VARIANT_BOOL *pbResult) override;

    // IOWSNewDocument2 methods

    HRESULT STDMETHODCALLTYPE ViewDocument(
        BSTR bstrDocumentLocation,
        VARIANT varProgID,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE ViewDocument2(
        IDispatch *pdisp,
        BSTR bstrDocumentLocation,
        VARIANT varProgID,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE EditDocument2(
        IDispatch *pdisp,
        BSTR bstrDocumentLocation,
        VARIANT varProgID,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE CreateNewDocument2(
        IDispatch *pdisp,
        BSTR bstrTemplateLocation,
        BSTR bstrDefaultSaveLocation,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE PromptedOnLastOpen(
        VARIANT_BOOL *pbResult) override;

    // IOWSNewDocument3 methods

    HRESULT STDMETHODCALLTYPE ViewDocument3(
        IDispatch *pdisp,
        BSTR bstrDocumentLocation,
        int OpenType,
        VARIANT varProgID,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE CheckinDocument(
        BSTR bstrDocumentLocation,
        int CheckinType,
        BSTR CheckinComment,
        VARIANT_BOOL bKeepCheckout,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE DiscardLocalCheckout(
        BSTR bstrDocumentLocationRaw,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE ViewInExcel(
        BSTR SiteUrl,
        BSTR FileName,
        BSTR SessionId,
        BSTR Cmd,
        BSTR Sheet,
        int Row,
        int Column,
        VARIANT varProgID) override;

    HRESULT STDMETHODCALLTYPE CheckoutDocumentPrompt(
        BSTR bstrDocumentLocationRaw,
        VARIANT_BOOL fEditAfterCheckout,
        VARIANT varProgID,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE EditDocument3(
        IDispatch *pdisp,
        BSTR bstrDocumentLocation,
        VARIANT_BOOL fUseLocalCopy,
        VARIANT varProgID,
        VARIANT_BOOL *pbResult) override;

    HRESULT STDMETHODCALLTYPE NewBlogPost(
        BSTR bstrProviderId,
        BSTR bstrBlogUrl,
        BSTR bstrBlogName) override;

    // IObjectSafety methods

    HRESULT STDMETHODCALLTYPE GetInterfaceSafetyOptions(
        REFIID riid,
        DWORD *pdwSupportedOptions,
        DWORD *pdwEnabledOptions) override;

    HRESULT STDMETHODCALLTYPE SetInterfaceSafetyOptions(
        REFIID riid,
        DWORD dwOptionSetMask,
        DWORD dwEnabledOptions) override;

    // Non-COM methods

    static LONG GetObjectCount();

private:
    static LONG m_nObjCount;
    static ITypeInfo* m_pTypeInfo;
    static constexpr DWORD iSupportedOptionsMask = INTERFACESAFE_FOR_UNTRUSTED_CALLER | INTERFACESAFE_FOR_UNTRUSTED_DATA;
    DWORD m_iEnabledOptions = 0;
};

#endif

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Messung V0.5
C=93 H=93 G=92

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.