summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2004-09-08 13:33:28 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2004-09-08 13:33:28 +0000
commitffa6657e0a7d6269afbd74998f1e5a9580fd74cf (patch)
tree8d14a88d6dca727a0da4e97ea3c35bf3563399b2 /shell
parent25a557588308072abea1955590487a984c1bb5df (diff)
INTEGRATION: CWS desktintgr02 (1.1.2); FILE ADDED
2004/08/02 12:43:24 tra 1.1.2.3: #i21110# 2004/07/30 09:56:57 deuce 1.1.2.2: Issue number: i21110 Submitted by: Gorden Lin {gorden.lin@sun.com} Reviewed by: Tino Rachui {tino.rachui@sun.com} 2004/07/29 09:28:30 deuce 1.1.2.1: Issue number: 21110 Submitted by: Gorden Lin {gorden.lin@sun.com} Reviewed by: Tino Rachui {tino.rachui@sun.com}
Diffstat (limited to 'shell')
-rw-r--r--shell/source/win32/shlxthandler/ooofilt/propspec.hxx186
1 files changed, 186 insertions, 0 deletions
diff --git a/shell/source/win32/shlxthandler/ooofilt/propspec.hxx b/shell/source/win32/shlxthandler/ooofilt/propspec.hxx
new file mode 100644
index 000000000000..269c274c94bd
--- /dev/null
+++ b/shell/source/win32/shlxthandler/ooofilt/propspec.hxx
@@ -0,0 +1,186 @@
+/*************************************************************************
+ *
+ * $RCSfile: propspec.hxx,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: hr $ $Date: 2004-09-08 14:33:28 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+//+------------------------------------------------------------------------- //
+// File: propspec.hxx
+//
+// Contents: C++ wrapper(s) for FULLPROPSPEC
+//
+//-------------------------------------------------------------------------
+#pragma once
+#include <windows.h>
+#include <ole2.h>
+#include <ntquery.h>
+//+-------------------------------------------------------------------------
+//
+// Declare: CLSID_SummaryInforation, GUID
+// CLSID_Storage, GUID
+//
+// Contents: Definitions of OpenOffice.org Document properties
+//
+//--------------------------------------------------------------------------
+
+//extern GUID CLSID_Storage;
+//
+//extern GUID CLSID_SummaryInformation;
+//const PID_TITLE = PIDSI_TITLE; // 2;
+//const PID_SUBJECT = PIDSI_SUBJECT; // 3;
+//const PID_AUTHOR = PIDSI_AUTHOR; // 4;
+//const PID_KEYWORDS = PIDSI_KEYWORDS; // 5;
+//const PID_COMMENTS = PIDSI_COMMENTS; //6;
+//const PID_REVNUMBER = PIDSI_REVNUMBER; //9;
+//const PID_WORDCOUNT = PIDSI_WORDCOUNT; //f;
+//+-------------------------------------------------------------------------
+//
+// Class: CFullPropertySpec
+//
+// Purpose: Describes full (PropertySet\Property) name of a property.
+//
+//--------------------------------------------------------------------------
+
+class CFullPropSpec
+{
+public:
+ CFullPropSpec();
+ CFullPropSpec( GUID const & guidPropSet, PROPID pidProperty );
+ CFullPropSpec( GUID const & guidPropSet, WCHAR const * wcsProperty );
+ // Validity check
+ inline BOOL IsValid() const;
+
+ // Copy constructors/assignment/clone
+ CFullPropSpec( CFullPropSpec const & Property );
+ CFullPropSpec & operator=( CFullPropSpec const & Property );
+ ~CFullPropSpec();
+ // Memory allocation
+ void * operator new( size_t size );
+ inline void * operator new( size_t size, void * p );
+ void operator delete( void * p );
+ inline FULLPROPSPEC * CastToStruct();
+ inline FULLPROPSPEC const * CastToStruct() const;
+ // Comparators
+ int operator==( CFullPropSpec const & prop ) const;
+ int operator!=( CFullPropSpec const & prop ) const;
+ // Member variable access
+ inline void SetPropSet( GUID const & guidPropSet );
+ inline GUID const & GetPropSet() const;
+
+ void SetProperty( PROPID pidProperty );
+ BOOL SetProperty( WCHAR const * wcsProperty );
+ inline WCHAR const * GetPropertyName() const;
+ inline PROPID GetPropertyPropid() const;
+ inline PROPSPEC GetPropSpec() const;
+ inline BOOL IsPropertyName() const;
+ inline BOOL IsPropertyPropid() const;
+private:
+ GUID _guidPropSet;
+ PROPSPEC _psProperty;
+};
+// Inline methods for CFullPropSpec
+inline void * CFullPropSpec::operator new( size_t size )
+{
+ void * p = CoTaskMemAlloc( size );
+ return( p );
+}
+inline void * CFullPropSpec::operator new( size_t /*size*/, void * p )
+{
+ return( p );
+}
+inline void CFullPropSpec::operator delete( void * p )
+{
+ if ( p )
+ CoTaskMemFree( p );
+}
+inline BOOL CFullPropSpec::IsValid() const
+{
+ return ( _psProperty.ulKind == PRSPEC_PROPID ||
+ 0 != _psProperty.lpwstr );
+}
+inline void CFullPropSpec::SetPropSet( GUID const & guidPropSet )
+{
+ _guidPropSet = guidPropSet;
+}
+inline GUID const & CFullPropSpec::GetPropSet() const
+{
+ return( _guidPropSet );
+}
+inline PROPSPEC CFullPropSpec::GetPropSpec() const
+{
+ return( _psProperty );
+}
+inline WCHAR const * CFullPropSpec::GetPropertyName() const
+{
+ return( _psProperty.lpwstr );
+}
+inline PROPID CFullPropSpec::GetPropertyPropid() const
+{
+ return( _psProperty.propid );
+}
+inline BOOL CFullPropSpec::IsPropertyName() const
+{
+ return( _psProperty.ulKind == PRSPEC_LPWSTR );
+}
+inline BOOL CFullPropSpec::IsPropertyPropid() const
+{
+ return( _psProperty.ulKind == PRSPEC_PROPID );
+}
+
+
+
+