Anonymous avatar Anonymous committed 5f77587

cmcfixes79: #i114551#: add namespaces etc. for windows

Comments (0)

Files changed (18)

filter/inc/filter/msfilter/docinf.hxx

     }
 } } }
 
+namespace msfilter {
 
-struct MSFILTER_DLLPUBLIC VtHyperlink
-{
-    sal_uInt32 dwHash;
-    sal_uInt32 dwApp;
-    sal_uInt32 dwOfficeArt;
-    sal_uInt32 dwInfo;
-    rtl::OUString hlink1;
-    rtl::OUString hlink2;
+    struct MSFILTER_DLLPUBLIC VtHyperlink
+    {
+        sal_uInt32 dwHash;
+        sal_uInt32 dwApp;
+        sal_uInt32 dwOfficeArt;
+        sal_uInt32 dwInfo;
+        rtl::OUString hlink1;
+        rtl::OUString hlink2;
 
-    VtHyperlink() : dwHash(0), dwApp(0), dwOfficeArt(0), dwInfo(0) {}
-    bool hasValidHash() const;
-};
+        VtHyperlink() : dwHash(0), dwApp(0), dwOfficeArt(0), dwInfo(0) {}
+        bool hasValidHash() const;
+    };
 
-const sal_uInt32 VT_EMPTY           = 0;
-const sal_uInt32 VT_NULL            = 1;
-const sal_uInt32 VT_I2              = 2;
-const sal_uInt32 VT_I4              = 3;
-const sal_uInt32 VT_R4              = 4;
-const sal_uInt32 VT_R8              = 5;
-const sal_uInt32 VT_CY              = 6;
-const sal_uInt32 VT_DATE            = 7;
-const sal_uInt32 VT_BSTR            = 8;
-const sal_uInt32 VT_UI4             = 9;
-const sal_uInt32 VT_ERROR           = 10;
-const sal_uInt32 VT_BOOL            = 11;
-const sal_uInt32 VT_VARIANT         = 12;
-const sal_uInt32 VT_DECIMAL         = 14;
-const sal_uInt32 VT_I1              = 16;
-const sal_uInt32 VT_UI1             = 17;
-const sal_uInt32 VT_UI2             = 18;
-const sal_uInt32 VT_I8              = 20;
-const sal_uInt32 VT_UI8             = 21;
-const sal_uInt32 VT_INT             = 22;
-const sal_uInt32 VT_UINT            = 23;
-const sal_uInt32 VT_LPSTR           = 30;
-const sal_uInt32 VT_LPWSTR          = 31;
-const sal_uInt32 VT_FILETIME        = 64;
-const sal_uInt32 VT_BLOB            = 65;
-const sal_uInt32 VT_STREAM          = 66;
-const sal_uInt32 VT_STORAGE         = 67;
-const sal_uInt32 VT_STREAMED_OBJECT = 68;
-const sal_uInt32 VT_STORED_OBJECT   = 69;
-const sal_uInt32 VT_BLOB_OBJECT     = 70;
-const sal_uInt32 VT_CF              = 71;
-const sal_uInt32 VT_CLSID           = 72;
-const sal_uInt32 VT_VECTOR          = 0x1000;
-const sal_uInt32 VT_ARRAY           = 0x2000;
-const sal_uInt32 VT_BYREF           = 0x4000;
-const sal_uInt32 VT_TYPEMASK        = 0x0FFF;
+    enum VARENUM
+    {
+        VT_EMPTY           = 0,
+        VT_NULL            = 1,
+        VT_I2              = 2,
+        VT_I4              = 3,
+        VT_R4              = 4,
+        VT_R8              = 5,
+        VT_CY              = 6,
+        VT_DATE            = 7,
+        VT_BSTR            = 8,
+        VT_DISPATCh        = 9,
+        VT_ERROR           = 10,
+        VT_BOOL            = 11,
+        VT_VARIANT         = 12,
+        VT_UNKNOWN         = 13,
+        VT_DECIMAL         = 14,
+        VT_I1              = 16,
+        VT_UI1             = 17,
+        VT_UI2             = 18,
+        VT_UI4             = 19,
+        VT_I8              = 20,
+        VT_UI8             = 21,
+        VT_INT             = 22,
+        VT_UINT            = 23,
+        VT_VOID            = 24,
+        VT_HRESULT         = 25,
+        VT_PTR             = 26,
+        VT_SAFEARRAY       = 27,
+        VT_CARRAY          = 28,
+        VT_USERDEFINED     = 29,
+        VT_LPSTR           = 30,
+        VT_LPWSTR          = 31,
+        VT_RECORD          = 36,
+        VT_INT_PTR         = 37,
+        VT_UINT_PTR        = 38,
+        VT_FILETIME        = 64,
+        VT_BLOB            = 65,
+        VT_STREAM          = 66,
+        VT_STORAGE         = 67,
+        VT_STREAMED_OBJECT = 68,
+        VT_STORED_OBJECT   = 69,
+        VT_BLOB_OBJECT     = 70,
+        VT_CF              = 71,
+        VT_CLSID           = 72,
+        VT_VERSIONED_STREAM = 73,
+        VT_BSTR_BLOB       = 0x0FFF,
+        VT_VECTOR          = 0x1000,
+        VT_ARRAY           = 0x2000,
+        VT_BYREF           = 0x4000,
+        VT_RESERVED        = 0x8000,
+        VT_ILLEGAL         = 0xFFFF,
+        VT_ILLEGALMASKED   = 0x0FFF,
+        VT_TYPEMASK        = 0x0FFF
+    };
 
-// SummaryInformation
-const sal_uInt32 PID_CODEPAGE     = 1;
-const sal_uInt32 PID_TITLE        = 2;
-const sal_uInt32 PID_SUBJECT      = 3;
-const sal_uInt32 PID_AUTHOR       = 4;
-const sal_uInt32 PID_KEYWORDS     = 5;
-const sal_uInt32 PID_COMMENTS     = 6;
-const sal_uInt32 PID_TEMPLATE     = 7;
-const sal_uInt32 PID_LASTAUTHOR   = 8;
-const sal_uInt32 PID_REVNUMBER    = 9;
-const sal_uInt32 PID_EDITTIME     = 10;
-const sal_uInt32 PID_LASTPRINTED  = 11;
-const sal_uInt32 PID_CREATE_DTM   = 12;
-const sal_uInt32 PID_LASTSAVE_DTM = 13;
-const sal_uInt32 PID_PAGECOUNT    = 14;
-const sal_uInt32 PID_WORDCOUNT    = 15;
-const sal_uInt32 PID_CHARCOUNT    = 16;
-const sal_uInt32 PID_THUMBNAIL    = 17;
-const sal_uInt32 PID_APPNAME      = 18;
-const sal_uInt32 PID_SECURITY     = 19;
+    // SummaryInformation
+    enum PIDSI
+    {
+        PID_CODEPAGE     = 1,
+        PID_TITLE        = 2,
+        PID_SUBJECT      = 3,
+        PID_AUTHOR       = 4,
+        PID_KEYWORDS     = 5,
+        PID_COMMENTS     = 6,
+        PID_TEMPLATE     = 7,
+        PID_LASTAUTHOR   = 8,
+        PID_REVNUMBER    = 9,
+        PID_EDITTIME     = 10,
+        PID_LASTPRINTED  = 11,
+        PID_CREATE_DTM   = 12,
+        PID_LASTSAVE_DTM = 13,
+        PID_PAGECOUNT    = 14,
+        PID_WORDCOUNT    = 15,
+        PID_CHARCOUNT    = 16,
+        PID_THUMBNAIL    = 17,
+        PID_APPNAME      = 18,
+        PID_DOC_SECURITY = 19
+    };
 
-// DocumentSummaryInformation
-const sal_uInt32 PID_CATEGORY     = 2;
-const sal_uInt32 PID_PRESFORMAT   = 3;
-const sal_uInt32 PID_BYTECOUNT    = 4;
-const sal_uInt32 PID_LINECOUNT    = 5;
-const sal_uInt32 PID_PARCOUNT     = 6;
-const sal_uInt32 PID_SLIDECOUNT   = 7;
-const sal_uInt32 PID_NOTECOUNT    = 8;
-const sal_uInt32 PID_HIDDENCOUNT  = 9;
-const sal_uInt32 PID_MMCLIPCOUNT  = 10;
-const sal_uInt32 PID_SCALE        = 11;
-const sal_uInt32 PID_HEADINGPAIR  = 12;
-const sal_uInt32 PID_DOCPARTS     = 13;
-const sal_uInt32 PID_MANAGER      = 14;
-const sal_uInt32 PID_COMPANY      = 15;
-const sal_uInt32 PID_LINKSDIRTY   = 16;
-const sal_uInt32 PID_CHARCOUNT2   = 17;
+    // DocumentSummaryInformation
+    enum PIDDSI
+    {
+        PID_CATEGORY     = 2,
+        PID_PRESFORMAT   = 3,
+        PID_BYTECOUNT    = 4,
+        PID_LINECOUNT    = 5,
+        PID_PARCOUNT     = 6,
+        PID_SLIDECOUNT   = 7,
+        PID_NOTECOUNT    = 8,
+        PID_HIDDENCOUNT  = 9,
+        PID_MMCLIPCOUNT  = 10,
+        PID_SCALE        = 11,
+        PID_HEADINGPAIR  = 12,
+        PID_DOCPARTS     = 13,
+        PID_MANAGER      = 14,
+        PID_COMPANY      = 15,
+        PID_LINKSDIRTY   = 16,
+        PID_CHARCOUNT2   = 17
+    };
 
-/** load document meta-data from OLE stream
+    /** load document meta-data from OLE stream
 
-    @param  i_xDocProps     Document meta-data
-    @param  i_pStorage      OLE Storage
-    @param  o_pHyperlinks   Document _PID_HLINKS
- */
-sal_uInt32 MSFILTER_DLLPUBLIC LoadOlePropertySet(
-    ::com::sun::star::uno::Reference<
-        ::com::sun::star::document::XDocumentProperties> i_xDocProps,
-    SotStorage* i_pStorage,
-    std::vector<VtHyperlink> *o_pHyperlinks = NULL);
+        @param  i_xDocProps     Document meta-data
+        @param  i_pStorage      OLE Storage
+        @param  o_pHyperlinks   Document _PID_HLINKS
+     */
+    sal_uInt32 MSFILTER_DLLPUBLIC LoadOlePropertySet(
+        ::com::sun::star::uno::Reference<
+            ::com::sun::star::document::XDocumentProperties> i_xDocProps,
+        SotStorage* i_pStorage,
+        std::vector<VtHyperlink> *o_pHyperlinks = NULL);
 
-/** save document meta-data to OLE stream
+    /** save document meta-data to OLE stream
 
-    @param  i_xDocProps     Document meta-data
-    @param  i_pStorage      OLE Storage
-    @param  i_pThumb        Thumbnail: preview bitmap
-    @param  i_pGuid         Blob: Guid blob ("_PID_GUID")
-    @param  i_pHyperlinks   Blob: Hyperlink blob ("_PID_HLINKS")
- */
-bool MSFILTER_DLLPUBLIC SaveOlePropertySet(
-    ::com::sun::star::uno::Reference<
-        ::com::sun::star::document::XDocumentProperties> i_xDocProps,
-    SotStorage* i_pStorage,
-    const ::com::sun::star::uno::Sequence<sal_uInt8> * i_pThumb = 0,
-    const ::com::sun::star::uno::Sequence<sal_uInt8> * i_pGuid = 0,
-    const ::com::sun::star::uno::Sequence<sal_uInt8> * i_pHyperlinks = 0);
+        @param  i_xDocProps     Document meta-data
+        @param  i_pStorage      OLE Storage
+        @param  i_pThumb        Thumbnail: preview bitmap
+        @param  i_pGuid         Blob: Guid blob ("_PID_GUID")
+        @param  i_pHyperlinks   Blob: Hyperlink blob ("_PID_HLINKS")
+     */
+    bool MSFILTER_DLLPUBLIC SaveOlePropertySet(
+        ::com::sun::star::uno::Reference<
+            ::com::sun::star::document::XDocumentProperties> i_xDocProps,
+        SotStorage* i_pStorage,
+        const ::com::sun::star::uno::Sequence<sal_uInt8> * i_pThumb = 0,
+        const ::com::sun::star::uno::Sequence<sal_uInt8> * i_pGuid = 0,
+        const ::com::sun::star::uno::Sequence<sal_uInt8> * i_pHyperlinks = 0);
 
 
-::com::sun::star::uno::Sequence<sal_uInt8> MSFILTER_DLLPUBLIC convertMetaFile(
-    GDIMetaFile* i_pThumb);
+    ::com::sun::star::uno::Sequence<sal_uInt8> MSFILTER_DLLPUBLIC convertMetaFile(
+        GDIMetaFile* i_pThumb);
+
+}
 
 #endif

filter/inc/filter/msfilter/svdfppt.hxx

 {
 	sal_uInt32  nIndex;
 
-	VtHyperlink aHyperLink;
+	msfilter::VtHyperlink aHyperLink;
 
 	sal_Int32   nStartPos;
 	sal_Int32   nEndPos;

filter/qa/cppunit/filter/summarystreams/test_summarystreams.cxx

        (rOne.Year == rOther.Year);
 }
 
-bool operator==(const VtHyperlink &rOne, const VtHyperlink &rOther)
+bool operator==(const msfilter::VtHyperlink &rOne, const msfilter::VtHyperlink &rOther)
 {
     return
         (rOne.dwHash == rOther.dwHash) &&
 
     SvMemoryStream aHyperlinksDump;
 
-    VtHyperlink aSaveHyperlink;
+    msfilter::VtHyperlink aSaveHyperlink;
     aSaveHyperlink.hlink1 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http://www.redhat.com/somewhere"));
     aSaveHyperlink.hlink2 = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("#somewhere"));
     aSaveHyperlink.dwHash = 0x4b0018;
 
     {
         SotStorageRef aTempStorageRef = new SotStorage(aMemoryStream);
-        CPPUNIT_ASSERT_MESSAGE("Save failed", SaveOlePropertySet(xSaveDocProps, aTempStorageRef, NULL, NULL, &aSaveHyperLinks) == true);
+        CPPUNIT_ASSERT_MESSAGE("Save failed", msfilter::SaveOlePropertySet(xSaveDocProps, aTempStorageRef, NULL, NULL, &aSaveHyperLinks) == true);
         aTempStorageRef->Commit();
     }
 
         uno::UNO_QUERY_THROW);
     uno::Reference< document::XDocumentProperties > xLoadDocProps(new testDocumentProperties(xLoadPropertyBag));
 
-    std::vector<VtHyperlink> aLoadHyperlinks;
+    std::vector<msfilter::VtHyperlink> aLoadHyperlinks;
     {
         SotStorageRef aTempStorageRef = new SotStorage(aMemoryStream);
         CPPUNIT_ASSERT_MESSAGE("Load failed", LoadOlePropertySet(xLoadDocProps, &aTempStorageRef, &aLoadHyperlinks) == 0);

filter/source/msfilter/docinf.cxx

 // usings
 using namespace ::com::sun::star;
 
-sal_uInt32 LoadOlePropertySet(
-    uno::Reference< document::XDocumentProperties> i_xDocProps,
-    SotStorage* i_pStorage,
-    std::vector<VtHyperlink> *o_pHyperlinks)
-{
-    // *** global properties from stream "005SummaryInformation" ***
-
-    // load the property set
-    SfxOlePropertySet aGlobSet;
-    ErrCode nGlobError = aGlobSet.LoadPropertySet(i_pStorage,
-        rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STREAM_SUMMARYINFO ) ) );
-
-    // global section
-    SfxOleSectionRef xGlobSect = aGlobSet.GetSection( SECTION_GLOBAL );
-    if( xGlobSect.get() )
-    {
-        // set supported properties
-        rtl::OUString aStrValue;
-        util::DateTime aDateTime;
-
-        if( xGlobSect->GetStringValue( aStrValue, PID_TITLE ) )
-            i_xDocProps->setTitle( aStrValue );
-        if( xGlobSect->GetStringValue( aStrValue, PID_SUBJECT ) )
-            i_xDocProps->setSubject( aStrValue );
-        if( xGlobSect->GetStringValue( aStrValue, PID_KEYWORDS ) ) {
-            i_xDocProps->setKeywords(
-                ::comphelper::string::convertCommaSeparated(aStrValue) );
-        }
-        if( xGlobSect->GetStringValue( aStrValue, PID_TEMPLATE ) )
-            i_xDocProps->setTemplateName( aStrValue );
-        if( xGlobSect->GetStringValue( aStrValue, PID_COMMENTS ) )
-            i_xDocProps->setDescription( aStrValue );
-
-		util::DateTime aInvalid;
-        if( xGlobSect->GetStringValue( aStrValue, PID_AUTHOR) )
-			i_xDocProps->setAuthor( aStrValue );
-		else
-			i_xDocProps->setAuthor( ::rtl::OUString() );
-        if( xGlobSect->GetFileTimeValue( aDateTime, PID_CREATE_DTM ) )
-			i_xDocProps->setCreationDate( aDateTime );
-		else
-			i_xDocProps->setCreationDate( aInvalid );
-
-        if( xGlobSect->GetStringValue( aStrValue, PID_LASTAUTHOR) )
-			i_xDocProps->setModifiedBy( aStrValue );
-		else
-			i_xDocProps->setModifiedBy( ::rtl::OUString() );
-        if( xGlobSect->GetFileTimeValue( aDateTime, PID_LASTSAVE_DTM ) )
-			i_xDocProps->setModificationDate( aDateTime );
-		else
-			i_xDocProps->setModificationDate( aInvalid );
-
-		i_xDocProps->setPrintedBy( ::rtl::OUString() );
-        if( xGlobSect->GetFileTimeValue( aDateTime, PID_LASTPRINTED ) )
-			i_xDocProps->setPrintDate( aDateTime );
-		else
-			i_xDocProps->setPrintDate( aInvalid );
-
-        if( xGlobSect->GetStringValue( aStrValue, PID_REVNUMBER ) )
-        {
-            sal_Int16 nRevision = static_cast< sal_Int16 >( aStrValue.toInt32() );
-            if ( nRevision > 0 )
-                i_xDocProps->setEditingCycles( nRevision );
-        }
-
-        if( xGlobSect->GetFileTimeValue( aDateTime, PID_EDITTIME ) )
-        {
-            // subtract offset 1601-01-01
-            aDateTime.Year  -= 1601;
-            aDateTime.Month -= 1;
-            aDateTime.Day   -= 1;
-            try
-            {
-                i_xDocProps->setEditingDuration(
-                    aDateTime.Day     * 60*60*24 +
-                    aDateTime.Hours   * 60*60    +
-                    aDateTime.Minutes * 60       +
-                    aDateTime.Seconds            );
-            }
-            catch (lang::IllegalArgumentException &)
-            {
-                // ignore
-            }
-        }
-    }
-
-    // *** custom properties from stream "005DocumentSummaryInformation" ***
-
-    // load the property set
-    SfxOlePropertySet aDocSet;
-    ErrCode nDocError = aDocSet.LoadPropertySet(i_pStorage,
-        rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STREAM_DOCSUMMARYINFO ) ) );
-
-    // custom properties
-    SfxOleSectionRef xCustomSect = aDocSet.GetSection( SECTION_CUSTOM );
-    if( xCustomSect.get() )
-    {
-        uno::Reference < beans::XPropertyContainer > xUserDefined(
-            i_xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW);
-        ::std::vector< sal_Int32 > aPropIds;
-        xCustomSect->GetPropertyIds( aPropIds );
-        for( ::std::vector< sal_Int32 >::const_iterator aIt = aPropIds.begin(),
-             aEnd = aPropIds.end(); aIt != aEnd; ++aIt )
-        {
-            ::rtl::OUString aPropName = xCustomSect->GetPropertyName( *aIt );
-            uno::Any aPropValue = xCustomSect->GetAnyValue( *aIt );
-            if( (aPropName.getLength() > 0) && aPropValue.hasValue() ) {
-                try {
-                    xUserDefined->addProperty( aPropName,
-                        beans::PropertyAttribute::REMOVEABLE, aPropValue );
-                } catch ( uno::Exception& ) {
-                    //ignore
-                }
-            }
-        }
-        if (o_pHyperlinks)
-            xCustomSect->GetHyperLinks( *o_pHyperlinks );
-    }
-
-    // return code
-    return (nGlobError != ERRCODE_NONE) ? nGlobError : nDocError;
-}
-
-bool SaveOlePropertySet(
-    uno::Reference< document::XDocumentProperties> i_xDocProps,
-    SotStorage* i_pStorage,
-    const uno::Sequence<sal_uInt8> * i_pThumb,
-    const uno::Sequence<sal_uInt8> * i_pGuid,
-    const uno::Sequence<sal_uInt8> * i_pHyperlinks)
-{
-    // *** global properties into stream "005SummaryInformation" ***
-
-    SfxOlePropertySet aGlobSet;
-
-    // set supported properties
-    SfxOleSection& rGlobSect = aGlobSet.AddSection( SECTION_GLOBAL );
-    rGlobSect.SetStringValue( PID_TITLE,    i_xDocProps->getTitle() );
-    rGlobSect.SetStringValue( PID_SUBJECT,  i_xDocProps->getSubject() );
-    rtl::OUString aStr = ::comphelper::string::convertCommaSeparated(
-        i_xDocProps->getKeywords() );
-    rGlobSect.SetStringValue( PID_KEYWORDS, aStr );
-    rGlobSect.SetStringValue( PID_TEMPLATE, i_xDocProps->getTemplateName() );
-    rGlobSect.SetStringValue( PID_COMMENTS, i_xDocProps->getDescription() );
-    rGlobSect.SetStringValue( PID_AUTHOR,   i_xDocProps->getAuthor() );
-    rGlobSect.SetFileTimeValue(PID_CREATE_DTM, i_xDocProps->getCreationDate());
-    rGlobSect.SetStringValue( PID_LASTAUTHOR, i_xDocProps->getModifiedBy() );
-    rGlobSect.SetFileTimeValue(PID_LASTSAVE_DTM,
-                                i_xDocProps->getModificationDate() );
-    // note: apparently PrintedBy is not supported in file format
-    rGlobSect.SetFileTimeValue(PID_LASTPRINTED, i_xDocProps->getPrintDate());
-
-    sal_Int32 dur = i_xDocProps->getEditingDuration();
-    util::DateTime aEditTime;
-    // add offset 1601-01-01
-    aEditTime.Year    = 1601;
-    aEditTime.Month   = 1;
-    aEditTime.Day     = 1;
-    aEditTime.Hours   = static_cast<sal_Int16>(dur / 3600);
-    aEditTime.Minutes = static_cast<sal_Int16>((dur % 3600) / 60);
-    aEditTime.Seconds = static_cast<sal_Int16>(dur % 60);
-    rGlobSect.SetFileTimeValue( PID_EDITTIME, aEditTime );
-
-    rGlobSect.SetStringValue( PID_REVNUMBER,
-                String::CreateFromInt32( i_xDocProps->getEditingCycles() ) );
-    if ( i_pThumb && i_pThumb->getLength() )
-		rGlobSect.SetThumbnailValue( PID_APPNAME, *i_pThumb );
-
-    // save the property set
-    ErrCode nGlobError = aGlobSet.SavePropertySet(i_pStorage,
-        rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STREAM_SUMMARYINFO ) ) );
-
-    // *** custom properties into stream "005DocumentSummaryInformation" ***
-
-    SfxOlePropertySet aDocSet;
-
-    // set builtin properties
-    aDocSet.AddSection( SECTION_BUILTIN );
-
-    // set custom properties
-    SfxOleSection& rCustomSect = aDocSet.AddSection( SECTION_CUSTOM );
-
-    // write GUID
-    if (i_pGuid) {
-        const sal_Int32 nPropId = rCustomSect.GetFreePropertyId();
-        rCustomSect.SetBlobValue( nPropId, *i_pGuid );
-        rCustomSect.SetPropertyName( nPropId,
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_PID_GUID")) );
-    }
-
-    // write hyperlinks
-    if (i_pHyperlinks) {
-        const sal_Int32 nPropId = rCustomSect.GetFreePropertyId();
-        rCustomSect.SetBlobValue( nPropId, *i_pHyperlinks );
-        rCustomSect.SetPropertyName( nPropId,
-            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_PID_HLINKS")) );
-    }
-
-    uno::Reference<beans::XPropertySet> xUserDefinedProps(
-        i_xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW);
-    DBG_ASSERT(xUserDefinedProps.is(), "UserDefinedProperties is null");
-    uno::Reference<beans::XPropertySetInfo> xPropInfo =
-        xUserDefinedProps->getPropertySetInfo();
-    DBG_ASSERT(xPropInfo.is(), "UserDefinedProperties Info is null");
-    uno::Sequence<beans::Property> props = xPropInfo->getProperties();
-    for (sal_Int32 i = 0; i < props.getLength(); ++i) {
-        try {
-            // skip transient properties
-            if (~props[i].Attributes & beans::PropertyAttribute::TRANSIENT)
-            {
-                const ::rtl::OUString name = props[i].Name;
-                const sal_Int32 nPropId = rCustomSect.GetFreePropertyId();
-                if (rCustomSect.SetAnyValue( nPropId,
-                            xUserDefinedProps->getPropertyValue(name))) {
-                    rCustomSect.SetPropertyName( nPropId, name );
-                }
-            }
-        } catch (uno::Exception &) {
-            // may happen with concurrent modification...
-            DBG_WARNING("SavePropertySet: exception");
-        }
-    }
-
-    // save the property set
-    ErrCode nDocError = aDocSet.SavePropertySet(i_pStorage,
-        rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STREAM_DOCSUMMARYINFO ) ) );
-
-    // return code
-    return (nGlobError == ERRCODE_NONE) && (nDocError == ERRCODE_NONE);
-}
-
-uno::Sequence<sal_uInt8> convertMetaFile(GDIMetaFile* i_pThumb)
-{
-    if (i_pThumb) {
-        BitmapEx aBitmap;
-        SvMemoryStream aStream;
-// magic value 160 taken from GraphicHelper::getThumbnailFormatFromGDI_Impl()
-        if( i_pThumb->CreateThumbnail( 160, aBitmap ) ) {
-            aBitmap.GetBitmap().Write( aStream, FALSE, FALSE );
-//            uno::Sequence<sal_uInt8> aSeq(aStream.GetSize()); // WRONG
-            aStream.Seek(STREAM_SEEK_TO_END);
-            uno::Sequence<sal_uInt8> aSeq(aStream.Tell());
-            const sal_uInt8* pBlob(
-                static_cast<const sal_uInt8*>(aStream.GetData()));
-            for (sal_Int32 j = 0; j < aSeq.getLength(); ++j) {
-                aSeq[j] = pBlob[j];
-            }
-            return aSeq;
-        }
-    }
-    return uno::Sequence<sal_uInt8>();
-}
-
 namespace
 {
     //2.4.1 Unicode String to Unsigned Integer Hash
     }
 }
 
-bool VtHyperlink::hasValidHash() const
+namespace msfilter
 {
-    //2.4.2 Hyperlink Hash
-    sal_uInt32 dwHash1 = HashString(hlink1);
-    sal_uInt32 dwHash2 = HashString(hlink2);
-    sal_uInt32 calc_dwHash = dwHash1 ^ dwHash2;
-    return calc_dwHash == dwHash;
+    sal_uInt32 LoadOlePropertySet(
+        uno::Reference< document::XDocumentProperties> i_xDocProps,
+        SotStorage* i_pStorage,
+        std::vector<msfilter::VtHyperlink> *o_pHyperlinks)
+    {
+        // *** global properties from stream "005SummaryInformation" ***
+
+        // load the property set
+        SfxOlePropertySet aGlobSet;
+        ErrCode nGlobError = aGlobSet.LoadPropertySet(i_pStorage,
+            rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STREAM_SUMMARYINFO ) ) );
+
+        // global section
+        SfxOleSectionRef xGlobSect = aGlobSet.GetSection( SECTION_GLOBAL );
+        if( xGlobSect.get() )
+        {
+            // set supported properties
+            rtl::OUString aStrValue;
+            util::DateTime aDateTime;
+
+            if( xGlobSect->GetStringValue( aStrValue, msfilter::PID_TITLE ) )
+                i_xDocProps->setTitle( aStrValue );
+            if( xGlobSect->GetStringValue( aStrValue, msfilter::PID_SUBJECT ) )
+                i_xDocProps->setSubject( aStrValue );
+            if( xGlobSect->GetStringValue( aStrValue, msfilter::PID_KEYWORDS ) ) {
+                i_xDocProps->setKeywords(
+                    ::comphelper::string::convertCommaSeparated(aStrValue) );
+            }
+            if( xGlobSect->GetStringValue( aStrValue, msfilter::PID_TEMPLATE ) )
+                i_xDocProps->setTemplateName( aStrValue );
+            if( xGlobSect->GetStringValue( aStrValue, msfilter::PID_COMMENTS ) )
+                i_xDocProps->setDescription( aStrValue );
+
+            util::DateTime aInvalid;
+            if( xGlobSect->GetStringValue( aStrValue, msfilter::PID_AUTHOR) )
+                i_xDocProps->setAuthor( aStrValue );
+            else
+                i_xDocProps->setAuthor( ::rtl::OUString() );
+            if( xGlobSect->GetFileTimeValue( aDateTime, msfilter::PID_CREATE_DTM ) )
+                i_xDocProps->setCreationDate( aDateTime );
+            else
+                i_xDocProps->setCreationDate( aInvalid );
+
+            if( xGlobSect->GetStringValue( aStrValue, msfilter::PID_LASTAUTHOR) )
+                i_xDocProps->setModifiedBy( aStrValue );
+            else
+                i_xDocProps->setModifiedBy( ::rtl::OUString() );
+            if( xGlobSect->GetFileTimeValue( aDateTime, msfilter::PID_LASTSAVE_DTM ) )
+                i_xDocProps->setModificationDate( aDateTime );
+            else
+                i_xDocProps->setModificationDate( aInvalid );
+
+            i_xDocProps->setPrintedBy( ::rtl::OUString() );
+            if( xGlobSect->GetFileTimeValue( aDateTime, msfilter::PID_LASTPRINTED ) )
+                i_xDocProps->setPrintDate( aDateTime );
+            else
+                i_xDocProps->setPrintDate( aInvalid );
+
+            if( xGlobSect->GetStringValue( aStrValue, msfilter::PID_REVNUMBER ) )
+            {
+                sal_Int16 nRevision = static_cast< sal_Int16 >( aStrValue.toInt32() );
+                if ( nRevision > 0 )
+                    i_xDocProps->setEditingCycles( nRevision );
+            }
+
+            if( xGlobSect->GetFileTimeValue( aDateTime, msfilter::PID_EDITTIME ) )
+            {
+                // subtract offset 1601-01-01
+                aDateTime.Year  -= 1601;
+                aDateTime.Month -= 1;
+                aDateTime.Day   -= 1;
+                try
+                {
+                    i_xDocProps->setEditingDuration(
+                        aDateTime.Day     * 60*60*24 +
+                        aDateTime.Hours   * 60*60    +
+                        aDateTime.Minutes * 60       +
+                        aDateTime.Seconds            );
+                }
+                catch (lang::IllegalArgumentException &)
+                {
+                    // ignore
+                }
+            }
+        }
+
+        // *** custom properties from stream "005DocumentSummaryInformation" ***
+
+        // load the property set
+        SfxOlePropertySet aDocSet;
+        ErrCode nDocError = aDocSet.LoadPropertySet(i_pStorage,
+            rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STREAM_DOCSUMMARYINFO ) ) );
+
+        // custom properties
+        SfxOleSectionRef xCustomSect = aDocSet.GetSection( SECTION_CUSTOM );
+        if( xCustomSect.get() )
+        {
+            uno::Reference < beans::XPropertyContainer > xUserDefined(
+                i_xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW);
+            ::std::vector< sal_Int32 > aPropIds;
+            xCustomSect->GetPropertyIds( aPropIds );
+            for( ::std::vector< sal_Int32 >::const_iterator aIt = aPropIds.begin(),
+                 aEnd = aPropIds.end(); aIt != aEnd; ++aIt )
+            {
+                ::rtl::OUString aPropName = xCustomSect->GetPropertyName( *aIt );
+                uno::Any aPropValue = xCustomSect->GetAnyValue( *aIt );
+                if( (aPropName.getLength() > 0) && aPropValue.hasValue() ) {
+                    try {
+                        xUserDefined->addProperty( aPropName,
+                            beans::PropertyAttribute::REMOVEABLE, aPropValue );
+                    } catch ( uno::Exception& ) {
+                        //ignore
+                    }
+                }
+            }
+            if (o_pHyperlinks)
+                xCustomSect->GetHyperLinks( *o_pHyperlinks );
+        }
+
+        // return code
+        return (nGlobError != ERRCODE_NONE) ? nGlobError : nDocError;
+    }
+
+    bool SaveOlePropertySet(
+        uno::Reference< document::XDocumentProperties> i_xDocProps,
+        SotStorage* i_pStorage,
+        const uno::Sequence<sal_uInt8> * i_pThumb,
+        const uno::Sequence<sal_uInt8> * i_pGuid,
+        const uno::Sequence<sal_uInt8> * i_pHyperlinks)
+    {
+        // *** global properties into stream "005SummaryInformation" ***
+
+        SfxOlePropertySet aGlobSet;
+
+        // set supported properties
+        SfxOleSection& rGlobSect = aGlobSet.AddSection( SECTION_GLOBAL );
+        rGlobSect.SetStringValue( msfilter::PID_TITLE,    i_xDocProps->getTitle() );
+        rGlobSect.SetStringValue( msfilter::PID_SUBJECT,  i_xDocProps->getSubject() );
+        rtl::OUString aStr = ::comphelper::string::convertCommaSeparated(
+            i_xDocProps->getKeywords() );
+        rGlobSect.SetStringValue( msfilter::PID_KEYWORDS, aStr );
+        rGlobSect.SetStringValue( msfilter::PID_TEMPLATE, i_xDocProps->getTemplateName() );
+        rGlobSect.SetStringValue( msfilter::PID_COMMENTS, i_xDocProps->getDescription() );
+        rGlobSect.SetStringValue( msfilter::PID_AUTHOR,   i_xDocProps->getAuthor() );
+        rGlobSect.SetFileTimeValue( msfilter::PID_CREATE_DTM, i_xDocProps->getCreationDate() );
+        rGlobSect.SetStringValue( msfilter::PID_LASTAUTHOR, i_xDocProps->getModifiedBy() );
+        rGlobSect.SetFileTimeValue( msfilter::PID_LASTSAVE_DTM,
+                                    i_xDocProps->getModificationDate() );
+        // note: apparently PrintedBy is not supported in file format
+        rGlobSect.SetFileTimeValue( msfilter::PID_LASTPRINTED, i_xDocProps->getPrintDate() );
+
+        sal_Int32 dur = i_xDocProps->getEditingDuration();
+        util::DateTime aEditTime;
+        // add offset 1601-01-01
+        aEditTime.Year    = 1601;
+        aEditTime.Month   = 1;
+        aEditTime.Day     = 1;
+        aEditTime.Hours   = static_cast<sal_Int16>(dur / 3600);
+        aEditTime.Minutes = static_cast<sal_Int16>((dur % 3600) / 60);
+        aEditTime.Seconds = static_cast<sal_Int16>(dur % 60);
+        rGlobSect.SetFileTimeValue( msfilter::PID_EDITTIME, aEditTime );
+
+        rGlobSect.SetStringValue( msfilter::PID_REVNUMBER,
+                    String::CreateFromInt32( i_xDocProps->getEditingCycles() ) );
+        if ( i_pThumb && i_pThumb->getLength() )
+            rGlobSect.SetThumbnailValue( msfilter::PID_APPNAME, *i_pThumb );
+
+        // save the property set
+        ErrCode nGlobError = aGlobSet.SavePropertySet(i_pStorage,
+            rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STREAM_SUMMARYINFO ) ) );
+
+        // *** custom properties into stream "005DocumentSummaryInformation" ***
+
+        SfxOlePropertySet aDocSet;
+
+        // set builtin properties
+        aDocSet.AddSection( SECTION_BUILTIN );
+
+        // set custom properties
+        SfxOleSection& rCustomSect = aDocSet.AddSection( SECTION_CUSTOM );
+
+        // write GUID
+        if (i_pGuid) {
+            const sal_Int32 nPropId = rCustomSect.GetFreePropertyId();
+            rCustomSect.SetBlobValue( nPropId, *i_pGuid );
+            rCustomSect.SetPropertyName( nPropId,
+                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_PID_GUID")) );
+        }
+
+        // write hyperlinks
+        if (i_pHyperlinks) {
+            const sal_Int32 nPropId = rCustomSect.GetFreePropertyId();
+            rCustomSect.SetBlobValue( nPropId, *i_pHyperlinks );
+            rCustomSect.SetPropertyName( nPropId,
+                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_PID_HLINKS")) );
+        }
+
+        uno::Reference<beans::XPropertySet> xUserDefinedProps(
+            i_xDocProps->getUserDefinedProperties(), uno::UNO_QUERY_THROW);
+        DBG_ASSERT(xUserDefinedProps.is(), "UserDefinedProperties is null");
+        uno::Reference<beans::XPropertySetInfo> xPropInfo =
+            xUserDefinedProps->getPropertySetInfo();
+        DBG_ASSERT(xPropInfo.is(), "UserDefinedProperties Info is null");
+        uno::Sequence<beans::Property> props = xPropInfo->getProperties();
+        for (sal_Int32 i = 0; i < props.getLength(); ++i) {
+            try {
+                // skip transient properties
+                if (~props[i].Attributes & beans::PropertyAttribute::TRANSIENT)
+                {
+                    const ::rtl::OUString name = props[i].Name;
+                    const sal_Int32 nPropId = rCustomSect.GetFreePropertyId();
+                    if (rCustomSect.SetAnyValue( nPropId,
+                                xUserDefinedProps->getPropertyValue(name))) {
+                        rCustomSect.SetPropertyName( nPropId, name );
+                    }
+                }
+            } catch (uno::Exception &) {
+                // may happen with concurrent modification...
+                DBG_WARNING("SavePropertySet: exception");
+            }
+        }
+
+        // save the property set
+        ErrCode nDocError = aDocSet.SavePropertySet(i_pStorage,
+            rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( STREAM_DOCSUMMARYINFO ) ) );
+
+        // return code
+        return (nGlobError == ERRCODE_NONE) && (nDocError == ERRCODE_NONE);
+    }
+
+    uno::Sequence<sal_uInt8> convertMetaFile(GDIMetaFile* i_pThumb)
+    {
+        if (i_pThumb) {
+            BitmapEx aBitmap;
+            SvMemoryStream aStream;
+    // magic value 160 taken from GraphicHelper::getThumbnailFormatFromGDI_Impl()
+            if( i_pThumb->CreateThumbnail( 160, aBitmap ) ) {
+                aBitmap.GetBitmap().Write( aStream, FALSE, FALSE );
+    //            uno::Sequence<sal_uInt8> aSeq(aStream.GetSize()); // WRONG
+                aStream.Seek(STREAM_SEEK_TO_END);
+                uno::Sequence<sal_uInt8> aSeq(aStream.Tell());
+                const sal_uInt8* pBlob(
+                    static_cast<const sal_uInt8*>(aStream.GetData()));
+                for (sal_Int32 j = 0; j < aSeq.getLength(); ++j) {
+                    aSeq[j] = pBlob[j];
+                }
+                return aSeq;
+            }
+        }
+        return uno::Sequence<sal_uInt8>();
+    }
+
+    bool VtHyperlink::hasValidHash() const
+    {
+        //2.4.2 Hyperlink Hash
+        sal_uInt32 dwHash1 = HashString(hlink1);
+        sal_uInt32 dwHash2 = HashString(hlink2);
+        sal_uInt32 calc_dwHash = dwHash1 ^ dwHash2;
+        return calc_dwHash == dwHash;
+    }
 }

filter/source/msfilter/oleprops.cxx

 // ----------------------------------------------------------------------------
 
 SfxOleCodePageProperty::SfxOleCodePageProperty() :
-    SfxOlePropertyBase( PROPID_CODEPAGE, VT_I2 )
+    SfxOlePropertyBase( PROPID_CODEPAGE, msfilter::VT_I2 )
 {
 }
 
 // ----------------------------------------------------------------------------
 
 SfxOleInt32Property::SfxOleInt32Property( sal_Int32 nPropId, sal_Int32 nValue ) :
-    SfxOlePropertyBase( nPropId, VT_I4 ),
+    SfxOlePropertyBase( nPropId, msfilter::VT_I4 ),
     mnValue( nValue )
 {
 }
 // ----------------------------------------------------------------------------
 
 SfxOleDoubleProperty::SfxOleDoubleProperty( sal_Int32 nPropId, double fValue ) :
-    SfxOlePropertyBase( nPropId, VT_R8 ),
+    SfxOlePropertyBase( nPropId, msfilter::VT_R8 ),
     mfValue( fValue )
 {
 }
 // ----------------------------------------------------------------------------
 
 SfxOleBoolProperty::SfxOleBoolProperty( sal_Int32 nPropId, bool bValue ) :
-    SfxOlePropertyBase( nPropId, VT_BOOL ),
+    SfxOlePropertyBase( nPropId, msfilter::VT_BOOL ),
     mbValue( bValue )
 {
 }
 
 SfxOleString8Property::SfxOleString8Property(
         sal_Int32 nPropId, const SfxOleTextEncoding& rTextEnc ) :
-    SfxOleStringPropertyBase( nPropId, VT_LPSTR, rTextEnc )
+    SfxOleStringPropertyBase( nPropId, msfilter::VT_LPSTR, rTextEnc )
 {
 }
 
 SfxOleString8Property::SfxOleString8Property(
         sal_Int32 nPropId, const SfxOleTextEncoding& rTextEnc, const rtl::OUString& rValue ) :
-    SfxOleStringPropertyBase( nPropId, VT_LPSTR, rTextEnc, rValue )
+    SfxOleStringPropertyBase( nPropId, msfilter::VT_LPSTR, rTextEnc, rValue )
 {
 }
 
 // ----------------------------------------------------------------------------
 
 SfxOleString16Property::SfxOleString16Property( sal_Int32 nPropId ) :
-    SfxOleStringPropertyBase( nPropId, VT_LPWSTR, RTL_TEXTENCODING_UCS2 )
+    SfxOleStringPropertyBase( nPropId, msfilter::VT_LPWSTR, RTL_TEXTENCODING_UCS2 )
 {
 }
 
 SfxOleString16Property::SfxOleString16Property( sal_Int32 nPropId, const rtl::OUString& rValue ) :
-    SfxOleStringPropertyBase( nPropId, VT_LPWSTR, RTL_TEXTENCODING_UCS2, rValue )
+    SfxOleStringPropertyBase( nPropId, msfilter::VT_LPWSTR, RTL_TEXTENCODING_UCS2, rValue )
 {
 }
 
 // ----------------------------------------------------------------------------
 
 SfxOleFileTimeProperty::SfxOleFileTimeProperty( sal_Int32 nPropId ) :
-    SfxOlePropertyBase( nPropId, VT_FILETIME )
+    SfxOlePropertyBase( nPropId, msfilter::VT_FILETIME )
 {
 }
 
 SfxOleFileTimeProperty::SfxOleFileTimeProperty( sal_Int32 nPropId, const util::DateTime& rDateTime ) :
-    SfxOlePropertyBase( nPropId, VT_FILETIME ),
+    SfxOlePropertyBase( nPropId, msfilter::VT_FILETIME ),
     maDateTime( rDateTime )
 {
 }
 
 SfxOleThumbnailProperty::SfxOleThumbnailProperty(
         sal_Int32 nPropId, const uno::Sequence<sal_uInt8> & i_rData) :
-    SfxOlePropertyBase( nPropId, VT_CF ),
+    SfxOlePropertyBase( nPropId, msfilter::VT_CF ),
     mData(i_rData)
 {
 }
 
 SfxOleBlobProperty::SfxOleBlobProperty( sal_Int32 nPropId,
         const uno::Sequence<sal_uInt8> & i_rData) :
-    SfxOlePropertyBase( nPropId, VT_BLOB ),
+    SfxOlePropertyBase( nPropId, msfilter::VT_BLOB ),
     mData(i_rData)
 {
 }
         // codepage property must be of type signed int-16
         sal_uInt32 nPropType;
         rStrm >> nPropType;
-        if( nPropType == VT_I2 )
+        if( nPropType == msfilter::VT_I2 )
             LoadObject( rStrm, maCodePageProp );
         // remove property position
         aPropPosMap.erase( aCodePageIt );
     SfxOlePropertyRef xProp;
     switch( nPropType )
     {
-        case VT_I4:
+        case msfilter::VT_I4:
             xProp.reset( new SfxOleInt32Property( nPropId ) );
         break;
-        case VT_R8:
+        case msfilter::VT_R8:
             xProp.reset( new SfxOleDoubleProperty( nPropId ) );
         break;
-        case VT_BOOL:
+        case msfilter::VT_BOOL:
             xProp.reset( new SfxOleBoolProperty( nPropId ) );
         break;
-        case VT_LPSTR:
+        case msfilter::VT_LPSTR:
             xProp.reset( new SfxOleString8Property( nPropId, maCodePageProp ) );
         break;
-        case VT_LPWSTR:
+        case msfilter::VT_LPWSTR:
             xProp.reset( new SfxOleString16Property( nPropId ) );
         break;
-        case VT_FILETIME:
+        case msfilter::VT_FILETIME:
             xProp.reset( new SfxOleFileTimeProperty( nPropId ) );
         break;
     }
     SvStream& rStrm, rtl::OUString &rString)
 {
     bool bRet = false;
-    if (nPropType == VT_LPSTR)
+    if (nPropType == msfilter::VT_LPSTR)
     {
         SfxOleString8Property aString8(0, rCodePageProp);
         if (ERRCODE_NONE == aString8.Load(rStrm))
             bRet = true;
         }
     }
-    else if (nPropType == VT_LPWSTR)
+    else if (nPropType == msfilter::VT_LPWSTR)
     {
         SfxOleString16Property aString16(0);
         if (ERRCODE_NONE == aString16.Load(rStrm))
     sal_uInt32 nPropType;
     rStrm >> nPropType;
 
-    if (nPropType != VT_BLOB)
+    if (nPropType != msfilter::VT_BLOB)
         return;
 
     sal_uInt32 nPropSize, nPropCount;
         return;
     nPropCount /= 6;    // 6 properties per hyperlink
 
-    VtHyperlink aHyperLink;
+    msfilter::VtHyperlink aHyperLink;
 
     for ( sal_uInt32 i = 0; i < nPropCount; ++i )
     {
         rStrm >> nPropType;
-        if ( nPropType != VT_I4 )
+        if ( nPropType != msfilter::VT_I4 )
             break;
         rStrm >> aHyperLink.dwHash >> nPropType;
-        if ( nPropType != VT_I4 )
+        if ( nPropType != msfilter::VT_I4 )
             break;
         rStrm >> aHyperLink.dwApp >> nPropType;
-        if ( nPropType != VT_I4 )
+        if ( nPropType != msfilter::VT_I4 )
             break;
         rStrm >> aHyperLink.dwOfficeArt >> nPropType;
-        if ( nPropType != VT_I4 )
+        if ( nPropType != msfilter::VT_I4 )
             break;
         rStrm >> aHyperLink.dwInfo >> nPropType;
         if ( !ReadString(nPropType, maCodePageProp, rStrm, aHyperLink.hlink1) )

filter/source/msfilter/oleprops.hxx

 {
 private:
     typedef ::std::map< sal_Int32, SfxOlePropertyRef > SfxOlePropMap;
-    typedef std::vector<VtHyperlink> SfxHyperLinkVector;
+    typedef std::vector<msfilter::VtHyperlink> SfxHyperLinkVector;
 
 public:
     explicit            SfxOleSection( bool bSupportsDict );

sc/source/filter/excel/excimp8.cxx

         {
             uno::Reference< document::XDocumentPropertiesSupplier > xDPS( pShell->GetModel(), uno::UNO_QUERY_THROW );
             uno::Reference< document::XDocumentProperties > xDocProps( xDPS->getDocumentProperties(), uno::UNO_SET_THROW );
-            LoadOlePropertySet( xDocProps, xRootStrg );
+            msfilter::LoadOlePropertySet( xDocProps, xRootStrg );
         }
         catch( uno::Exception& )
         {

sc/source/filter/excel/expop2.cxx

 			::boost::shared_ptr<GDIMetaFile> pMetaFile =
 				pDocShell->GetPreviewMetaFile (sal_False);
 			uno::Sequence<sal_uInt8> metaFile(
-				convertMetaFile(pMetaFile.get()));
-			SaveOlePropertySet(xDocProps, xRootStrg, &metaFile);
+				msfilter::convertMetaFile(pMetaFile.get()));
+			msfilter::SaveOlePropertySet(xDocProps, xRootStrg, &metaFile);
 		}
 		else
-			SaveOlePropertySet(xDocProps, xRootStrg );
+			msfilter::SaveOlePropertySet(xDocProps, xRootStrg );
     }
 
     //! TODO: separate warnings for columns and sheets
         ::boost::shared_ptr<GDIMetaFile> pMetaFile =
             pDocShell->GetPreviewMetaFile (sal_False);
         uno::Sequence<sal_uInt8> metaFile(
-            convertMetaFile(pMetaFile.get()));
-        SaveOlePropertySet(xDocProps, xRootStrg, &metaFile);
+            msfilter::convertMetaFile(pMetaFile.get()));
+        msfilter::SaveOlePropertySet(xDocProps, xRootStrg, &metaFile);
     }
 
     //! TODO: separate warnings for columns and sheets

sd/source/filter/eppt/eppt.cxx

 				aThumbSeq =
 					*static_cast<const uno::Sequence<sal_uInt8>*>(mAny.getValue());
 			}
-			SaveOlePropertySet( xDocProps, mrStg,
+			msfilter::SaveOlePropertySet( xDocProps, mrStg,
 					&aThumbSeq, &aGuidSeq, &aHyperSeq);
 		}
 		else
 		{
-			SaveOlePropertySet( xDocProps, mrStg,
+			msfilter::SaveOlePropertySet( xDocProps, mrStg,
 					NULL, &aGuidSeq, &aHyperSeq );
 		}
     }

sd/source/filter/ppt/pptin.cxx

         if ( pSection )
         {
 		    PropItem aPropItem;
-            if ( pSection->GetProperty( PID_COMMENTS, aPropItem ) )
+            if ( pSection->GetProperty( msfilter::PID_COMMENTS, aPropItem ) )
             {
                 String aComment;
                 aPropItem.Read( aComment );
 		Section* pSection = (Section*)pDInfoSec2->GetSection( aPropSetGUID );
 		if ( pSection )
 		{
-			if ( pSection->GetProperty( PID_SLIDECOUNT, aPropItem ) )
+			if ( pSection->GetProperty( msfilter::PID_SLIDECOUNT, aPropItem ) )
 			{
 				aPropItem >> nType;
-				if ( ( nType == VT_I4 ) || ( nType == VT_UI4 ) )
+				if ( ( nType == msfilter::VT_I4 ) || ( nType == msfilter::VT_UI4 ) )
 				{
 					// examine PID_HEADINGPAIR to get the correct entry for PID_DOCPARTS
 					UINT32 nSlideCount, nVecCount;
 					aPropItem >> nSlideCount;
-					if ( nSlideCount && pSection->GetProperty( PID_HEADINGPAIR, aPropItem ) )
+					if ( nSlideCount && pSection->GetProperty( msfilter::PID_HEADINGPAIR, aPropItem ) )
 					{
 						UINT32	nSlideTitleIndex = 0, nSlideTitleCount = 0;
 						UINT32	nFontIndex, nFontCount = 0;
 						aPropItem >> nType
 								  >> nVecCount;
 
-						if ( ( nType == ( VT_VARIANT | VT_VECTOR ) ) && ( nVecCount ^ 1 ) )
+						if ( ( nType == ( msfilter::VT_VARIANT | msfilter::VT_VECTOR ) ) && ( nVecCount ^ 1 ) )
 						{
 							nVecCount >>= 1;
 
 							for ( i = 0; i < nVecCount; i++ )
 							{
-								if ( !aPropItem.Read( aUString, VT_EMPTY, FALSE ) )
+								if ( !aPropItem.Read( aUString, msfilter::VT_EMPTY, FALSE ) )
 									break;
 								aPropItem >> nType;
-								if ( ( nType != VT_I4 ) && ( nType != VT_UI4 ) )
+								if ( ( nType != msfilter::VT_I4 ) && ( nType != msfilter::VT_UI4 ) )
 									break;
 								aPropItem >> nTemp;
 								if ( aUString.EqualsAscii("Slide Titles") || aUString.EqualsAscii("Folientitel") )
 								nEntryCount += nTemp;
 							}
 						}
-						if ( ( nSlideCount == nSlideTitleCount ) && pSection->GetProperty( PID_DOCPARTS, aPropItem ) )
+						if ( ( nSlideCount == nSlideTitleCount ) && pSection->GetProperty( msfilter::PID_DOCPARTS, aPropItem ) )
 						{
 							aPropItem >> nType
 									  >> nVecCount;
 
 							if ( ( nVecCount >= ( nSlideTitleIndex + nSlideTitleCount ) )
-									&& ( nType == ( VT_LPSTR | VT_VECTOR ) ) )
+									&& ( nType == ( msfilter::VT_LPSTR | msfilter::VT_VECTOR ) ) )
 							{
 								for ( i = 0; i != nSlideTitleIndex; i++ )
 								{
         mpDoc->GetObjectShell()->GetModel(), uno::UNO_QUERY_THROW);
     uno::Reference<document::XDocumentProperties> xDocProps
         = xDPS->getDocumentProperties();
-    std::vector<VtHyperlink> aHyperLinks;
+    std::vector<msfilter::VtHyperlink> aHyperLinks;
     LoadOlePropertySet(xDocProps, &mrStorage, &aHyperLinks);
     xDocProps->setTemplateName(::rtl::OUString());
 
-    for (std::vector<VtHyperlink>::const_iterator aI = aHyperLinks.begin(), aEnd = aHyperLinks.end(); aI != aEnd; ++aI)
+    for (std::vector<msfilter::VtHyperlink>::const_iterator aI = aHyperLinks.begin(), aEnd = aHyperLinks.end(); aI != aEnd; ++aI)
     {
         SdHyperlinkEntry *pHyperlink = new SdHyperlinkEntry;
 		pHyperlink->nIndex = 0;

sd/source/filter/ppt/propread.cxx

 
 	nItemPos = Tell();
 
-	if ( nStringType == VT_EMPTY )
+	if ( nStringType == msfilter::VT_EMPTY )
 		*this >> nType;
 	else
-		nType = nStringType & VT_TYPEMASK;
+		nType = nStringType & msfilter::VT_TYPEMASK;
 
 	*this >> nItemSize;
 
 	switch( nType )
 	{
-		case VT_LPSTR :
+		case msfilter::VT_LPSTR :
 		{
 			if ( nItemSize )
 			{
 		}
 		break;
 
-		case VT_LPWSTR :
+		case msfilter::VT_LPWSTR :
 		{
 			if ( nItemSize )
 			{
 
 			nPropSize = 4;
 
-			if ( nPropType & VT_VECTOR )
+			if ( nPropType & msfilter::VT_VECTOR )
 			{
 				*pStrm >> nVectorCount;
-				nPropType &=~VT_VECTOR;
+				nPropType &=~msfilter::VT_VECTOR;
 				nPropSize += 4;
 			}
 			else
 				nVectorCount = 1;
 
 
-			sal_Bool bVariant = ( nPropType == VT_VARIANT );
+			sal_Bool bVariant = ( nPropType == msfilter::VT_VARIANT );
 
 			for ( i = 0; nPropSize && ( i < nVectorCount ); i++ )
 			{
 				}
 				switch( nPropType )
 				{
-					case VT_UI1 :
+					case msfilter::VT_UI1 :
 						nPropSize++;
 					break;
 
-					case VT_I2 :
-					case VT_UI2 :
-					case VT_BOOL :
+					case msfilter::VT_I2 :
+					case msfilter::VT_UI2 :
+					case msfilter::VT_BOOL :
 						nPropSize += 2;
 					break;
 
-					case VT_I4 :
-					case VT_R4 :
-					case VT_UI4 :
-					case VT_ERROR :
+					case msfilter::VT_I4 :
+					case msfilter::VT_R4 :
+					case msfilter::VT_UI4 :
+					case msfilter::VT_ERROR :
 						nPropSize += 4;
 					break;
 
-					case VT_I8 :
-					case VT_R8 :
-					case VT_CY :
-					case VT_UI8 :
-					case VT_DATE :
-					case VT_FILETIME :
+					case msfilter::VT_I8 :
+					case msfilter::VT_R8 :
+					case msfilter::VT_CY :
+					case msfilter::VT_UI8 :
+					case msfilter::VT_DATE :
+					case msfilter::VT_FILETIME :
 						nPropSize += 8;
 					break;
 
-					case VT_BSTR :
+					case msfilter::VT_BSTR :
 						*pStrm >> nTemp;
 						nPropSize += ( nTemp + 4 );
 					break;
 
-					case VT_LPSTR :
+					case msfilter::VT_LPSTR :
 						*pStrm >> nTemp;
 						nPropSize += ( nTemp + 4 );
 					break;
 
-					case VT_LPWSTR :
+					case msfilter::VT_LPWSTR :
 						*pStrm >> nTemp;
 						nPropSize += ( nTemp << 1 ) + 4;
 					break;
 
-					case VT_BLOB_OBJECT :
-					case VT_BLOB :
-					case VT_CF :
+					case msfilter::VT_BLOB_OBJECT :
+					case msfilter::VT_BLOB :
+					case msfilter::VT_CF :
 						*pStrm >> nTemp;
 						nPropSize += ( nTemp + 4 );
 					break;
 
-					case VT_CLSID :
-					case VT_STREAM :
-					case VT_STORAGE :
-					case VT_STREAMED_OBJECT :
-					case VT_STORED_OBJECT :
-					case VT_VARIANT :
-					case VT_VECTOR :
+					case msfilter::VT_CLSID :
+					case msfilter::VT_STREAM :
+					case msfilter::VT_STORAGE :
+					case msfilter::VT_STREAMED_OBJECT :
+					case msfilter::VT_STORED_OBJECT :
+					case msfilter::VT_VARIANT :
+					case msfilter::VT_VECTOR :
 					default :
 						nPropSize = 0;
 				}
 				{
 					sal_uInt16 nCodePage;
 	                aPropItem >> nPropType;
-		            if ( nPropType == VT_I2 )
+		            if ( nPropType == msfilter::VT_I2 )
 					{
 						aPropItem >> nCodePage;
 

sd/source/filter/ppt/propread.hxx

 		void			Clear();
 
 		void			SetTextEncoding( sal_uInt16 nTextEnc ){ mnTextEnc = nTextEnc; };
-		sal_Bool		Read( String& rString, sal_uInt32 nType = VT_EMPTY, sal_Bool bDwordAlign = sal_True );
+		sal_Bool		Read( String& rString, sal_uInt32 nType = msfilter::VT_EMPTY, sal_Bool bDwordAlign = sal_True );
 		PropItem&		operator=( PropItem& rPropItem );
 
 	using SvStream::Read;

File contents unchanged.

sw/source/filter/ww8/wrtww8.cxx

                 ::boost::shared_ptr<GDIMetaFile> pMetaFile =
                     pDocShell->GetPreviewMetaFile (sal_False);
                 uno::Sequence<sal_uInt8> metaFile(
-                    convertMetaFile(pMetaFile.get()));
-                SaveOlePropertySet(xDocProps, &GetWriter().GetStorage(), &metaFile);
+                    msfilter::convertMetaFile(pMetaFile.get()));
+                msfilter::SaveOlePropertySet(xDocProps, &GetWriter().GetStorage(), &metaFile);
             }
             else
-                SaveOlePropertySet( xDocProps, &GetWriter().GetStorage() );
+                msfilter::SaveOlePropertySet( xDocProps, &GetWriter().GetStorage() );
         }
     }
 }

sw/source/filter/ww8/ww8par.hxx

     vector of hyperlinks from the DocumentSummaryInformation that may override
     the HYPERLINK field urls.
     */
-    std::vector<VtHyperlink> aHyperLinks;
+    std::vector<msfilter::VtHyperlink> aHyperLinks;
 
     WW8PostProcessAttrsInfo * mpPostProcessAttrsInfo;
 

sw/source/filter/ww8/ww8scan.cxx

 }
 
 
-void HyperLinkIterator::OverrideLink(const VtHyperlink &rHyperLink)
+void HyperLinkIterator::OverrideLink(const msfilter::VtHyperlink &rHyperLink)
 {
     pFld->OverrideLink(nIndex, rHyperLink);
 }
 
-void WW8ScannerBase::applyDocumentSummaryInformationHyperlinks(const std::vector<VtHyperlink> &rHyperLinks)
+void WW8ScannerBase::applyDocumentSummaryInformationHyperlinks(const std::vector<msfilter::VtHyperlink> &rHyperLinks)
 {
     /*
     2.4.7 Application Data For VtHyperlink The following algorithm specifies how
     if (!getFirstHyperLink(aHyperLinkIter))
         return;
 
-    std::vector<VtHyperlink>::const_iterator aEnd = rHyperLinks.end();
-    for (std::vector<VtHyperlink>::const_iterator aI = rHyperLinks.begin(); aI != aEnd; ++aI)
+    std::vector<msfilter::VtHyperlink>::const_iterator aEnd = rHyperLinks.end();
+    for (std::vector<msfilter::VtHyperlink>::const_iterator aI = rHyperLinks.begin(); aI != aEnd; ++aI)
     {
         if (aI->dwApp == 0xFFFFFFFF)
             continue;
 
     if (bOk)
     {
-        std::map<ULONG, VtHyperlink>::const_iterator aI = maHyperLinks.find(nIdx);
+        std::map<ULONG, msfilter::VtHyperlink>::const_iterator aI = maHyperLinks.find(nIdx);
         if (aI != maHyperLinks.end())
             rF.pHyperLink = &(aI->second);
     }

sw/source/filter/ww8/ww8scan.hxx

 
 struct WW8FieldDesc
 {
-    const VtHyperlink *pHyperLink; ///< Override link from DocumentSummaryInformation
+    const msfilter::VtHyperlink *pHyperLink; ///< Override link from DocumentSummaryInformation
     long nLen;              ///< Gesamtlaenge ( zum Text ueberlesen )
     WW8_CP nSCode;          ///< Anfang Befehlscode
     WW8_CP nLCode;          ///< Laenge
 class WW8PLCFx_FLD : public WW8PLCFx
 {
 private:
-    std::map<ULONG, VtHyperlink> maHyperLinks;
+    std::map<ULONG, msfilter::VtHyperlink> maHyperLinks;
     WW8PLCFspecial* pPLCF;
     const WW8Fib& rFib;
     //No copying
 
     ULONG GetLastHyperlinkIdx() const;
     ULONG GetPrevHyperlinkIdx(ULONG nIndex) const;
-    void OverrideLink(ULONG nIndex, const VtHyperlink &rHyperLink) { maHyperLinks[nIndex] = rHyperLink; }
+    void OverrideLink(ULONG nIndex, const msfilter::VtHyperlink &rHyperLink) { maHyperLinks[nIndex] = rHyperLink; }
 };
 
 enum eBookStatus { BOOK_NORMAL = 0, BOOK_IGNORE = 0x1, BOOK_FIELD = 0x2 };
     WW8PLCFx_FLD *pFld;
     ULONG nIndex;
     ULONG GetDwApp() const { return nIndex; }
-    void OverrideLink(const VtHyperlink &rHyperLink);
+    void OverrideLink(const msfilter::VtHyperlink &rHyperLink);
 };
 
 class WW8ScannerBase
     xub_StrLen WW8ReadString(SvStream& rStrm, String& rStr, WW8_CP nAktStartCp, 
         long nTotalLen, rtl_TextEncoding eEnc ) const;
 
-    void applyDocumentSummaryInformationHyperlinks(const std::vector<VtHyperlink> &rHyperLinks);
+    void applyDocumentSummaryInformationHyperlinks(const std::vector<msfilter::VtHyperlink> &rHyperLinks);
 };
 
 /** FIB - the File Information Block

vcl/inc/vcl/settings.hxx

     BOOL							GetUseFlatMenues() const
                                         { return (BOOL) mpData->mnUseFlatMenues; }
 
-    void							SetUseImagesInMenus( BOOL bUseImagesInMenus )
-                                        { CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus; }
+    void							SetUseImagesInMenus( USHORT nUseImagesInMenus )
+                                        { CopyData(); mpData->mnUseImagesInMenus = nUseImagesInMenus; }
     BOOL							GetUseImagesInMenus() const;
 
     void							SetPreferredUseImagesInMenus( BOOL bPreferredUseImagesInMenus )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.