fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / shell / inc / internal / propertyhdl.hxx
blob0985b411ca6997a77b60f42da7741b8eb119c890
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 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SHELL_INC_INTERNAL_PROPERTYHDL_HXX
21 #define INCLUDED_SHELL_INC_INTERNAL_PROPERTYHDL_HXX
23 #if defined _MSC_VER
24 #pragma warning(push, 1)
25 #pragma warning(disable:4917)
26 #endif
27 #include <shlobj.h>
28 #if defined _MSC_VER
29 #pragma warning(pop)
30 #endif
32 // {AE424E85-F6DF-4910-A6A9-438797986431}
33 const CLSID CLSID_PROPERTY_HANDLER =
34 { 0xae424e85, 0xf6df, 0x4910, { 0xa6, 0xa9, 0x43, 0x87, 0x97, 0x98, 0x64, 0x31 } };
36 class CMetaInfoReader;
38 class CPropertyHdl : public IPropertyStore,
39 public IPropertyStoreCapabilities,
40 public IInitializeWithStream
42 public:
43 CPropertyHdl(long RefCnt = 1);
44 virtual ~CPropertyHdl();
47 // IUnknown methods
49 virtual HRESULT STDMETHODCALLTYPE QueryInterface(
50 REFIID riid,
51 void __RPC_FAR *__RPC_FAR *ppvObject );
52 virtual ULONG STDMETHODCALLTYPE AddRef();
53 virtual ULONG STDMETHODCALLTYPE Release();
56 // IPropertyStore
58 virtual HRESULT STDMETHODCALLTYPE GetCount( DWORD *pcProps );
59 virtual HRESULT STDMETHODCALLTYPE GetAt( DWORD iProp, PROPERTYKEY *pkey );
60 virtual HRESULT STDMETHODCALLTYPE GetValue( REFPROPERTYKEY key, PROPVARIANT *pPropVar );
61 virtual HRESULT STDMETHODCALLTYPE SetValue( REFPROPERTYKEY key, REFPROPVARIANT propVar );
62 virtual HRESULT STDMETHODCALLTYPE Commit();
65 // IPropertyStoreCapabilities
67 virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable( REFPROPERTYKEY key );
70 // IInitializeWithStream
72 virtual HRESULT STDMETHODCALLTYPE Initialize(IStream *pStream, DWORD grfMode);
74 private:
75 void LoadProperties( CMetaInfoReader *pMetaInfoReader );
76 HRESULT GetItemData( CMetaInfoReader *pMetaInfoReader, UINT nIndex, PROPVARIANT *pVarData );
78 private:
79 long m_RefCnt;
80 IPropertyStoreCache* m_pCache;
83 class CClassFactory : public IClassFactory
85 public:
86 CClassFactory( const CLSID& clsid );
87 virtual ~CClassFactory();
90 // IUnknown methods
92 virtual HRESULT STDMETHODCALLTYPE QueryInterface(
93 REFIID riid,
94 void __RPC_FAR *__RPC_FAR *ppvObject);
95 virtual ULONG STDMETHODCALLTYPE AddRef();
96 virtual ULONG STDMETHODCALLTYPE Release();
99 // IClassFactory methods
101 virtual HRESULT STDMETHODCALLTYPE CreateInstance(
102 IUnknown __RPC_FAR *pUnkOuter,
103 REFIID riid,
104 void __RPC_FAR *__RPC_FAR *ppvObject);
106 virtual HRESULT STDMETHODCALLTYPE LockServer( BOOL fLock );
107 static bool IsLocked();
109 private:
110 long m_RefCnt;
111 CLSID m_Clsid;
112 static long s_ServerLocks;
115 #endif
117 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */