Kaydet (Commit) e0e6bb70 authored tarafından Christian Lippka's avatar Christian Lippka

added xml and api support for player

üst c95a5cc6
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: xmlgrhlp.hxx,v $ * $RCSfile: xmlgrhlp.hxx,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: mh $ * last change: $Author: cl $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -71,6 +71,9 @@ ...@@ -71,6 +71,9 @@
#ifndef _SVSTOR_HXX #ifndef _SVSTOR_HXX
#include <so3/svstor.hxx> #include <so3/svstor.hxx>
#endif #endif
#ifndef _SOT_STORAGE_HXX
#include <sot/storage.hxx>
#endif
#ifndef _GRFMGR_HXX #ifndef _GRFMGR_HXX
#include <goodies/grfmgr.hxx> #include <goodies/grfmgr.hxx>
#endif #endif
...@@ -102,7 +105,7 @@ enum SvXMLGraphicHelperMode ...@@ -102,7 +105,7 @@ enum SvXMLGraphicHelperMode
// - SvXMLGraphicHelper - // - SvXMLGraphicHelper -
// ---------------------- // ----------------------
class SvStorage; class SotStorage;
class SvXMLGraphicHelper : public ::cppu::WeakComponentImplHelper1< ::com::sun::star::document::XGraphicObjectResolver > class SvXMLGraphicHelper : public ::cppu::WeakComponentImplHelper1< ::com::sun::star::document::XGraphicObjectResolver >
{ {
...@@ -114,8 +117,8 @@ private: ...@@ -114,8 +117,8 @@ private:
typedef ::_STL::set< ::rtl::OUString > URLSet; typedef ::_STL::set< ::rtl::OUString > URLSet;
::osl::Mutex maMutex; ::osl::Mutex maMutex;
SvStorage* mpRootStorage; SotStorage* mpRootStorage;
SvStorageRef mxGraphicStorage; SotStorageRef mxGraphicStorage;
::rtl::OUString maCurStorageName; ::rtl::OUString maCurStorageName;
URLPairVector maGrfURLs; URLPairVector maGrfURLs;
GraphicObjectVector maGrfObjs; GraphicObjectVector maGrfObjs;
...@@ -128,8 +131,8 @@ private: ...@@ -128,8 +131,8 @@ private:
sal_Bool ImplGetStreamNames( const ::rtl::OUString& rURLStr, sal_Bool ImplGetStreamNames( const ::rtl::OUString& rURLStr,
::rtl::OUString& rPictureStorageName, ::rtl::OUString& rPictureStorageName,
::rtl::OUString& rPictureStreamName ); ::rtl::OUString& rPictureStreamName );
SvStorageRef ImplGetGraphicStorage( const ::rtl::OUString& rPictureStorageName ); SotStorageRef ImplGetGraphicStorage( const ::rtl::OUString& rPictureStorageName );
SvStorageStreamRef ImplGetGraphicStream( const ::rtl::OUString& rPictureStorageName, SotStorageStreamRef ImplGetGraphicStream( const ::rtl::OUString& rPictureStorageName,
const ::rtl::OUString& rPictureStreamName, const ::rtl::OUString& rPictureStreamName,
BOOL bTruncate ); BOOL bTruncate );
Graphic ImplReadGraphic( const ::rtl::OUString& rPictureStorageName, Graphic ImplReadGraphic( const ::rtl::OUString& rPictureStorageName,
...@@ -144,13 +147,13 @@ protected: ...@@ -144,13 +147,13 @@ protected:
SvXMLGraphicHelper(); SvXMLGraphicHelper();
~SvXMLGraphicHelper(); ~SvXMLGraphicHelper();
void Init( SvStorage& rXMLStorage, void Init( SotStorage& rXMLStorage,
SvXMLGraphicHelperMode eCreateMode, SvXMLGraphicHelperMode eCreateMode,
BOOL bDirect ); BOOL bDirect );
public: public:
static SvXMLGraphicHelper* Create( SvStorage& rXMLStorage, static SvXMLGraphicHelper* Create( SotStorage& rXMLStorage,
SvXMLGraphicHelperMode eCreateMode, SvXMLGraphicHelperMode eCreateMode,
BOOL bDirect = TRUE ); BOOL bDirect = TRUE );
static void Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper ); static void Destroy( SvXMLGraphicHelper* pSvXMLGraphicHelper );
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
# #
# $RCSfile: makefile.mk,v $ # $RCSfile: makefile.mk,v $
# #
# $Revision: 1.7 $ # $Revision: 1.8 $
# #
# last change: $Author: cl $ $Date: 2001-03-04 22:50:23 $ # last change: $Author: cl $ $Date: 2001-03-19 09:13:49 $
# #
# The Contents of this file are made available subject to the terms of # The Contents of this file are made available subject to the terms of
# either of the following licenses # either of the following licenses
...@@ -100,6 +100,31 @@ CXXFILES = \ ...@@ -100,6 +100,31 @@ CXXFILES = \
unodtabl.cxx \ unodtabl.cxx \
gluepts.cxx gluepts.cxx
SVXLIGHTOBJFILES=\
$(OBJ)$/unopool.obj \
$(OBJ)$/XPropertyTable.obj \
$(OBJ)$/UnoNameItemTable.obj \
$(OBJ)$/unoshape.obj \
$(OBJ)$/unoipset.obj \
$(OBJ)$/unoctabl.obj \
$(OBJ)$/unoshap2.obj \
$(OBJ)$/unoshap3.obj \
$(OBJ)$/unopage.obj \
$(OBJ)$/unoshtxt.obj \
$(OBJ)$/unoshcol.obj \
$(OBJ)$/unoprov.obj \
$(OBJ)$/unomod.obj \
$(OBJ)$/unonrule.obj \
$(OBJ)$/unofdesc.obj \
$(OBJ)$/unomlstr.obj \
$(OBJ)$/unogtabl.obj \
$(OBJ)$/unohtabl.obj \
$(OBJ)$/unobtabl.obj \
$(OBJ)$/unottabl.obj \
$(OBJ)$/unomtabl.obj \
$(OBJ)$/unodtabl.obj \
$(OBJ)$/gluepts.obj
SLOFILES = \ SLOFILES = \
$(SLO)$/unopool.obj \ $(SLO)$/unopool.obj \
$(SLO)$/XPropertyTable.obj \ $(SLO)$/XPropertyTable.obj \
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unobtabl.cxx,v $ * $RCSfile: unobtabl.cxx,v $
* *
* $Revision: 1.10 $ * $Revision: 1.11 $
* *
* last change: $Author: cl $ $Date: 2001-01-31 19:35:22 $ * last change: $Author: cl $ $Date: 2001-03-19 09:13:49 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -73,9 +73,11 @@ ...@@ -73,9 +73,11 @@
#ifndef _SVX_XIT_HXX #ifndef _SVX_XIT_HXX
#include <xit.hxx> #include <xit.hxx>
#endif #endif
#ifndef SVX_LIGHT
#ifndef _SFXDOCFILE_HXX #ifndef _SFXDOCFILE_HXX
#include <sfx2/docfile.hxx> #include <sfx2/docfile.hxx>
#endif #endif
#endif
#ifndef _SVX_UNONAMEITEMTABLE_HXX_ #ifndef _SVX_UNONAMEITEMTABLE_HXX_
#include "UnoNameItemTable.hxx" #include "UnoNameItemTable.hxx"
...@@ -151,6 +153,13 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoBitmapTable_createInstance( Sdr ...@@ -151,6 +153,13 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoBitmapTable_createInstance( Sdr
return *new SvxUnoBitmapTable(pModel); return *new SvxUnoBitmapTable(pModel);
} }
#ifndef _STREAM_HXX
#include <tools/stream.hxx>
#endif
#ifndef _UNOTOOLS_LOCALFILEHELPER_HXX
#include <unotools/localfilehelper.hxx>
#endif
/** returns a GraphicObject for this URL */ /** returns a GraphicObject for this URL */
GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw() GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw()
{ {
...@@ -164,12 +173,21 @@ GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw() ...@@ -164,12 +173,21 @@ GraphicObject CreateGraphicObjectFromURL( const ::rtl::OUString &rURL ) throw()
} }
else else
{ {
Graphic aGraphic;
#ifndef SVX_LIGHT
SfxMedium aMedium( aURL, STREAM_READ, TRUE ); SfxMedium aMedium( aURL, STREAM_READ, TRUE );
SvStream* pStream = aMedium.GetInStream(); SvStream* pStream = aMedium.GetInStream();
Graphic aGraphic;
if( pStream ) if( pStream )
GraphicConverter::Import( *pStream, aGraphic ); GraphicConverter::Import( *pStream, aGraphic );
#else
String aSystemPath( rURL );
utl::LocalFileHelper::ConvertURLToSystemPath( aSystemPath, aSystemPath );
SvFileStream aFile( aSystemPath, STREAM_READ );
GraphicConverter::Import( aFile, aGraphic );
#endif
return GraphicObject( aGraphic ); return GraphicObject( aGraphic );
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unopage.cxx,v $ * $RCSfile: unopage.cxx,v $
* *
* $Revision: 1.8 $ * $Revision: 1.9 $
* *
* last change: $Author: aw $ $Date: 2000-12-07 15:22:53 $ * last change: $Author: cl $ $Date: 2001-03-19 09:13:49 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -67,9 +67,11 @@ ...@@ -67,9 +67,11 @@
#ifndef _OSL_MUTEX_HXX_ #ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#endif #endif
#ifndef SVX_LIGHT
#ifndef _SFXDISPATCH_HXX //autogen #ifndef _SFXDISPATCH_HXX //autogen
#include <sfx2/dispatch.hxx> #include <sfx2/dispatch.hxx>
#endif #endif
#endif
/* /*
#ifndef _SFX_BINDINGS_HXX #ifndef _SFX_BINDINGS_HXX
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unoshap2.cxx,v $ * $RCSfile: unoshap2.cxx,v $
* *
* $Revision: 1.20 $ * $Revision: 1.21 $
* *
* last change: $Author: cl $ $Date: 2001-03-08 11:37:51 $ * last change: $Author: cl $ $Date: 2001-03-19 09:13:49 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -1263,9 +1263,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServic ...@@ -1263,9 +1263,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServic
#ifndef _SVDOGRAF_HXX #ifndef _SVDOGRAF_HXX
#include <svdograf.hxx> #include <svdograf.hxx>
#endif #endif
#ifndef _SFX_DOCFILT_HACK_HXX #ifndef SVX_LIGHT
#include <sfx2/docfilt.hxx>
#endif
#ifndef _SFXDOCFILE_HXX #ifndef _SFXDOCFILE_HXX
#include <sfx2/docfile.hxx> #include <sfx2/docfile.hxx>
#endif #endif
...@@ -1275,6 +1273,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServic ...@@ -1275,6 +1273,7 @@ uno::Sequence< OUString > SAL_CALL SvxShapePolyPolygonBezier::getSupportedServic
#ifndef _SFX_FCONTNR_HXX #ifndef _SFX_FCONTNR_HXX
#include <sfx2/fcontnr.hxx> #include <sfx2/fcontnr.hxx>
#endif #endif
#endif
#include "toolkit/unohlp.hxx" #include "toolkit/unohlp.hxx"
...@@ -1345,14 +1344,16 @@ void SAL_CALL SvxGraphicObject::setPropertyValue( const OUString& aPropertyName, ...@@ -1345,14 +1344,16 @@ void SAL_CALL SvxGraphicObject::setPropertyValue( const OUString& aPropertyName,
( aGrafURL.GetToken( 0, ':' ) != String( RTL_CONSTASCII_STRINGPARAM( UNO_NAME_GRAPHOBJ_URLPKGPREFIX ) ).GetToken( 0, ':' ) ) ) ( aGrafURL.GetToken( 0, ':' ) != String( RTL_CONSTASCII_STRINGPARAM( UNO_NAME_GRAPHOBJ_URLPKGPREFIX ) ).GetToken( 0, ':' ) ) )
{ {
// normal link // normal link
String aFilterName;
#ifndef SVX_LIGHT
const SfxFilter* pSfxFilter = NULL; const SfxFilter* pSfxFilter = NULL;
SfxMedium aSfxMedium( aURL, STREAM_READ | STREAM_SHARE_DENYNONE, FALSE ); SfxMedium aSfxMedium( aURL, STREAM_READ | STREAM_SHARE_DENYNONE, FALSE );
String aFilterName;
SFX_APP()->GetFilterMatcher().GuessFilter( aSfxMedium, &pSfxFilter, SFX_FILTER_IMPORT, SFX_FILTER_NOTINSTALLED | SFX_FILTER_EXECUTABLE ); SFX_APP()->GetFilterMatcher().GuessFilter( aSfxMedium, &pSfxFilter, SFX_FILTER_IMPORT, SFX_FILTER_NOTINSTALLED | SFX_FILTER_EXECUTABLE );
if( !pSfxFilter ) if( !pSfxFilter )
{ {
#endif
INetURLObject aURLObj( aURL ); INetURLObject aURLObj( aURL );
if( aURLObj.GetProtocol() == INET_PROT_NOT_VALID ) if( aURLObj.GetProtocol() == INET_PROT_NOT_VALID )
...@@ -1368,9 +1369,11 @@ void SAL_CALL SvxGraphicObject::setPropertyValue( const OUString& aPropertyName, ...@@ -1368,9 +1369,11 @@ void SAL_CALL SvxGraphicObject::setPropertyValue( const OUString& aPropertyName,
GraphicFilter* pGrfFilter = GetGrfFilter(); GraphicFilter* pGrfFilter = GetGrfFilter();
aFilterName = pGrfFilter->GetImportFormatName( pGrfFilter->GetImportFormatNumberForShortName( aURLObj.getExtension() ) ); aFilterName = pGrfFilter->GetImportFormatName( pGrfFilter->GetImportFormatNumberForShortName( aURLObj.getExtension() ) );
} }
#ifndef SVX_LIGHT
} }
else else
aFilterName = pSfxFilter->GetFilterName(); aFilterName = pSfxFilter->GetFilterName();
#endif
((SdrGrafObj*)pObj)->SetGraphicLink( aURL, aFilterName ); ((SdrGrafObj*)pObj)->SetGraphicLink( aURL, aFilterName );
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: unoshape.cxx,v $ * $RCSfile: unoshape.cxx,v $
* *
* $Revision: 1.43 $ * $Revision: 1.44 $
* *
* last change: $Author: cl $ $Date: 2001-03-08 14:44:48 $ * last change: $Author: cl $ $Date: 2001-03-19 09:13:49 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -97,25 +97,26 @@ ...@@ -97,25 +97,26 @@
#ifndef _OSL_MUTEX_HXX_ #ifndef _OSL_MUTEX_HXX_
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#endif #endif
#ifndef SVX_LIGHT
#ifndef _SVSTOR_HXX #ifndef _SVSTOR_HXX
#include <so3/svstor.hxx> #include <so3/svstor.hxx>
#endif #endif
#ifndef _CPPUHELPER_EXTRACT_HXX_
#include <cppuhelper/extract.hxx>
#endif #endif
#include <comphelper/extract.hxx>
#include <toolkit/unohlp.hxx> #include <toolkit/unohlp.hxx>
#include <rtl/uuid.h> #include <rtl/uuid.h>
#include <rtl/memory.h> #include <rtl/memory.h>
#ifndef SVX_LIGHT
#ifndef _IPOBJ_HXX #ifndef _IPOBJ_HXX
#include <so3/ipobj.hxx> #include <so3/ipobj.hxx>
#endif #endif
#ifndef _SFX_OBJSH_HXX #ifndef _SFX_OBJSH_HXX
#include <sfx2/objsh.hxx> #include <sfx2/objsh.hxx>
#endif #endif
#endif
#ifndef _SVX_XFLBSTIT_HXX #ifndef _SVX_XFLBSTIT_HXX
#include "xflbstit.hxx" #include "xflbstit.hxx"
...@@ -1110,6 +1111,7 @@ void SAL_CALL SvxShape::setPropertyValue( const OUString& rPropertyName, const u ...@@ -1110,6 +1111,7 @@ void SAL_CALL SvxShape::setPropertyValue( const OUString& rPropertyName, const u
} }
case OWN_ATTR_CLSID: case OWN_ATTR_CLSID:
{ {
#ifndef SVX_LIGHT
OUString aCLSID; OUString aCLSID;
if( rVal >>= aCLSID ) if( rVal >>= aCLSID )
{ {
...@@ -1185,6 +1187,7 @@ void SAL_CALL SvxShape::setPropertyValue( const OUString& rPropertyName, const u ...@@ -1185,6 +1187,7 @@ void SAL_CALL SvxShape::setPropertyValue( const OUString& rPropertyName, const u
} }
} }
} }
#endif
break; break;
} }
case OWN_ATTR_EDGE_START_OBJ: case OWN_ATTR_EDGE_START_OBJ:
...@@ -1535,6 +1538,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName ) ...@@ -1535,6 +1538,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName )
{ {
case OWN_ATTR_INTERNAL_OLE: case OWN_ATTR_INTERNAL_OLE:
{ {
#ifndef SVX_LIGHT
sal_Bool bInternal = sal_False; sal_Bool bInternal = sal_False;
if( pObj && pObj->ISA(SdrOle2Obj)) if( pObj && pObj->ISA(SdrOle2Obj))
{ {
...@@ -1546,6 +1550,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName ) ...@@ -1546,6 +1550,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName )
} }
} }
aAny = uno::Any( &bInternal, ::getBooleanCppuType() ); aAny = uno::Any( &bInternal, ::getBooleanCppuType() );
#endif
break; break;
} }
case OWN_ATTR_TRANSFORMATION: case OWN_ATTR_TRANSFORMATION:
...@@ -1655,6 +1660,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName ) ...@@ -1655,6 +1660,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName )
case OWN_ATTR_OLESIZE: case OWN_ATTR_OLESIZE:
{ {
awt::Size aSize; awt::Size aSize;
#ifndef SVX_LIGHT
if( pObj->ISA(SdrOle2Obj)) if( pObj->ISA(SdrOle2Obj))
{ {
SdrOle2Obj& aObj = *(SdrOle2Obj*)pObj; SdrOle2Obj& aObj = *(SdrOle2Obj*)pObj;
...@@ -1665,6 +1671,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName ) ...@@ -1665,6 +1671,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName )
aSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() ); aSize = awt::Size( aTmpSize.Width(), aTmpSize.Height() );
} }
} }
#endif
aAny <<= aSize; aAny <<= aSize;
break; break;
} }
...@@ -1690,6 +1697,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName ) ...@@ -1690,6 +1697,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName )
case OWN_ATTR_CLSID: case OWN_ATTR_CLSID:
{ {
OUString aCLSID; OUString aCLSID;
#ifndef SVX_LIGHT
if( pObj && pObj->ISA(SdrOle2Obj)) if( pObj && pObj->ISA(SdrOle2Obj))
{ {
const SvInPlaceObjectRef& rIPRef = ((SdrOle2Obj*)pObj)->GetObjRef(); const SvInPlaceObjectRef& rIPRef = ((SdrOle2Obj*)pObj)->GetObjRef();
...@@ -1699,6 +1707,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName ) ...@@ -1699,6 +1707,7 @@ uno::Any SAL_CALL SvxShape::getPropertyValue( const OUString& PropertyName )
aCLSID = rClassName.GetHexName(); aCLSID = rClassName.GetHexName();
} }
} }
#endif
aAny <<= aCLSID; aAny <<= aCLSID;
break; break;
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
# #
# $RCSfile: makefile.mk,v $ # $RCSfile: makefile.mk,v $
# #
# $Revision: 1.1.1.1 $ # $Revision: 1.2 $
# #
# last change: $Author: hr $ $Date: 2000-09-18 17:01:27 $ # last change: $Author: cl $ $Date: 2001-03-19 09:16:39 $
# #
# The Contents of this file are made available subject to the terms of # The Contents of this file are made available subject to the terms of
# either of the following licenses # either of the following licenses
...@@ -83,6 +83,13 @@ CXXFILES = \ ...@@ -83,6 +83,13 @@ CXXFILES = \
unotext2.cxx \ unotext2.cxx \
unofield.cxx unofield.cxx
SVXLIGHTOBJFILES=\
$(OBJ)$/unoedsrc.obj \
$(OBJ)$/unofored.obj \
$(OBJ)$/unoforou.obj \
$(OBJ)$/unotext.obj \
$(OBJ)$/unotext2.obj \
$(OBJ)$/unofield.obj
SLOFILES = \ SLOFILES = \
$(SLO)$/unoedsrc.obj \ $(SLO)$/unoedsrc.obj \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment