propspec.hxx (ed2f6d3b) propspec.hxx (fff73a02)
1/**************************************************************
1/**************************************************************
2 *
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
19 *
20 *************************************************************/
21
22
20 *************************************************************/
21
22
23
23//+-------------------------------------------------------------------------
24//
25// File: propspec.hxx
26//
27// Contents: C++ wrapper(s) for FULLPROPSPEC
28//
29//-------------------------------------------------------------------------
30#pragma once
31#if defined _MSC_VER
32#pragma warning(push, 1)
33#endif
34#include <windows.h>
35#include <ole2.h>
36#include <ntquery.h>
37#if defined _MSC_VER
38#pragma warning(pop)
24//+-------------------------------------------------------------------------
25//
26// File: propspec.hxx
27//
28// Contents: C++ wrapper(s) for FULLPROPSPEC
29//
30//-------------------------------------------------------------------------
31#pragma once
32#if defined _MSC_VER
33#pragma warning(push, 1)
34#endif
35#include <windows.h>
36#include <ole2.h>
37#include <ntquery.h>
38#if defined _MSC_VER
39#pragma warning(pop)
39#endif
40#endif
40//+-------------------------------------------------------------------------
41//
42// Declare: CLSID_SummaryInforation, GUID
43// CLSID_Storage, GUID
44//
41//+-------------------------------------------------------------------------
42//
43// Declare: CLSID_SummaryInforation, GUID
44// CLSID_Storage, GUID
45//
45// Contents: Definitions of OpenOffice.org Document properties
46// Contents: Definitions of OpenOffice Document properties
46//
47//--------------------------------------------------------------------------
48
49//extern GUID CLSID_Storage;
50//
51//extern GUID CLSID_SummaryInformation;
52//const PID_TITLE = PIDSI_TITLE; // 2;
53//const PID_SUBJECT = PIDSI_SUBJECT; // 3;

--- 7 unchanged lines hidden (view full) ---

61// Class: CFullPropertySpec
62//
63// Purpose: Describes full (PropertySet\Property) name of a property.
64//
65//--------------------------------------------------------------------------
66
67class CFullPropSpec
68{
47//
48//--------------------------------------------------------------------------
49
50//extern GUID CLSID_Storage;
51//
52//extern GUID CLSID_SummaryInformation;
53//const PID_TITLE = PIDSI_TITLE; // 2;
54//const PID_SUBJECT = PIDSI_SUBJECT; // 3;

--- 7 unchanged lines hidden (view full) ---

62// Class: CFullPropertySpec
63//
64// Purpose: Describes full (PropertySet\Property) name of a property.
65//
66//--------------------------------------------------------------------------
67
68class CFullPropSpec
69{
69public:
70public:
70 CFullPropSpec();
71 CFullPropSpec( GUID const & guidPropSet, PROPID pidProperty );
72 CFullPropSpec( GUID const & guidPropSet, WCHAR const * wcsProperty );
73 // Validity check
74 inline BOOL IsValid() const;
71 CFullPropSpec();
72 CFullPropSpec( GUID const & guidPropSet, PROPID pidProperty );
73 CFullPropSpec( GUID const & guidPropSet, WCHAR const * wcsProperty );
74 // Validity check
75 inline BOOL IsValid() const;
75
76
76 // Copy constructors/assignment/clone
77 CFullPropSpec( CFullPropSpec const & Property );
78 CFullPropSpec & operator=( CFullPropSpec const & Property );
79 ~CFullPropSpec();
80 // Memory allocation
81 void * operator new( size_t size );
82 inline void * operator new( size_t size, void * p );
83 void operator delete( void * p );
84 inline FULLPROPSPEC * CastToStruct();
85 inline FULLPROPSPEC const * CastToStruct() const;
86 // Comparators
87 int operator==( CFullPropSpec const & prop ) const;
88 int operator!=( CFullPropSpec const & prop ) const;
89 // Member variable access
90 inline void SetPropSet( GUID const & guidPropSet );
91 inline GUID const & GetPropSet() const;
77 // Copy constructors/assignment/clone
78 CFullPropSpec( CFullPropSpec const & Property );
79 CFullPropSpec & operator=( CFullPropSpec const & Property );
80 ~CFullPropSpec();
81 // Memory allocation
82 void * operator new( size_t size );
83 inline void * operator new( size_t size, void * p );
84 void operator delete( void * p );
85 inline FULLPROPSPEC * CastToStruct();
86 inline FULLPROPSPEC const * CastToStruct() const;
87 // Comparators
88 int operator==( CFullPropSpec const & prop ) const;
89 int operator!=( CFullPropSpec const & prop ) const;
90 // Member variable access
91 inline void SetPropSet( GUID const & guidPropSet );
92 inline GUID const & GetPropSet() const;
92
93
93 void SetProperty( PROPID pidProperty );
94 BOOL SetProperty( WCHAR const * wcsProperty );
95 inline WCHAR const * GetPropertyName() const;
96 inline PROPID GetPropertyPropid() const;
97 inline PROPSPEC GetPropSpec() const;
98 inline BOOL IsPropertyName() const;
99 inline BOOL IsPropertyPropid() const;
100private:

--- 43 unchanged lines hidden (view full) ---

144inline BOOL CFullPropSpec::IsPropertyName() const
145{
146 return( _psProperty.ulKind == PRSPEC_LPWSTR );
147}
148inline BOOL CFullPropSpec::IsPropertyPropid() const
149{
150 return( _psProperty.ulKind == PRSPEC_PROPID );
151}
94 void SetProperty( PROPID pidProperty );
95 BOOL SetProperty( WCHAR const * wcsProperty );
96 inline WCHAR const * GetPropertyName() const;
97 inline PROPID GetPropertyPropid() const;
98 inline PROPSPEC GetPropSpec() const;
99 inline BOOL IsPropertyName() const;
100 inline BOOL IsPropertyPropid() const;
101private:

--- 43 unchanged lines hidden (view full) ---

145inline BOOL CFullPropSpec::IsPropertyName() const
146{
147 return( _psProperty.ulKind == PRSPEC_LPWSTR );
148}
149inline BOOL CFullPropSpec::IsPropertyPropid() const
150{
151 return( _psProperty.ulKind == PRSPEC_PROPID );
152}
152
153
154
155