diff options
author | ka <kai.ahrens@oracle.com> | 2011-02-17 21:55:54 +0100 |
---|---|---|
committer | ka <kai.ahrens@oracle.com> | 2011-02-17 21:55:54 +0100 |
commit | f5aba9c0bac074d291ddbb7ce75e427c11ae7c39 (patch) | |
tree | 7e00fbff348e512d99db5810897a013f9823ddfb /svx/source/xml | |
parent | 591982d2f398724a74383338dd2268d05423130c (diff) | |
parent | cd0d6a5a6775f197fdb7e78b54c8133074a7a236 (diff) |
ka102: rebased to DEV300_m100
Diffstat (limited to 'svx/source/xml')
-rw-r--r-- | svx/source/xml/makefile.mk | 49 | ||||
-rw-r--r-- | svx/source/xml/xmlgrhlp.cxx | 24 | ||||
-rw-r--r-- | svx/source/xml/xmlxtexp.cxx | 6 | ||||
-rw-r--r-- | svx/source/xml/xmlxtimp.cxx | 34 |
4 files changed, 32 insertions, 81 deletions
diff --git a/svx/source/xml/makefile.mk b/svx/source/xml/makefile.mk deleted file mode 100644 index 02e6f3ae1f23..000000000000 --- a/svx/source/xml/makefile.mk +++ /dev/null @@ -1,49 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org 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 version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -PRJ=..$/.. -PRJNAME=svx -TARGET=xml - -ENABLE_EXCEPTIONS=TRUE - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk -.INCLUDE : $(PRJ)$/util$/makefile.pmk - -# --- Files -------------------------------------------------------- -SLOFILES = \ - $(SLO)$/xmlexport.obj \ - $(SLO)$/xmlxtimp.obj \ - $(SLO)$/xmlxtexp.obj \ - $(SLO)$/xmlgrhlp.obj \ - $(SLO)$/xmleohlp.obj - -# --- Targets -------------------------------------------------------------- - -.INCLUDE : target.mk diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx index 548224991b19..5284e32f810e 100644 --- a/svx/source/xml/xmlgrhlp.cxx +++ b/svx/source/xml/xmlgrhlp.cxx @@ -329,8 +329,8 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() Graphic aGraphic; mpOStm->Seek( 0 ); - USHORT nFormat = GRFILTER_FORMAT_DONTKNOW; - USHORT pDeterminedFormat = GRFILTER_FORMAT_DONTKNOW; + sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW; + sal_uInt16 pDeterminedFormat = GRFILTER_FORMAT_DONTKNOW; GraphicFilter::GetGraphicFilter()->ImportGraphic( aGraphic, String(), *mpOStm ,nFormat,&pDeterminedFormat ); if (pDeterminedFormat == GRFILTER_FORMAT_DONTKNOW) @@ -338,17 +338,17 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() //Read the first two byte to check whether it is a gzipped stream, is so it may be in wmz or emz format //unzip them and try again - BYTE sFirstBytes[ 2 ]; + sal_uInt8 sFirstBytes[ 2 ]; mpOStm->Seek( STREAM_SEEK_TO_END ); - ULONG nStreamLen = mpOStm->Tell(); + sal_uIntPtr nStreamLen = mpOStm->Tell(); mpOStm->Seek( 0 ); if ( !nStreamLen ) { SvLockBytes* pLockBytes = mpOStm->GetLockBytes(); if ( pLockBytes ) - pLockBytes->SetSynchronMode( TRUE ); + pLockBytes->SetSynchronMode( sal_True ); mpOStm->Seek( STREAM_SEEK_TO_END ); nStreamLen = mpOStm->Tell(); @@ -370,7 +370,7 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject() if (aZCodec.EndCompression() && pDest ) { pDest->Seek( STREAM_SEEK_TO_END ); - ULONG nStreamLen_ = pDest->Tell(); + sal_uIntPtr nStreamLen_ = pDest->Tell(); if (nStreamLen_) { pDest->Seek(0L); @@ -500,7 +500,7 @@ uno::Reference < embed::XStorage > SvXMLGraphicHelper::ImplGetGraphicStorage( co SvxGraphicHelperStream_Impl SvXMLGraphicHelper::ImplGetGraphicStream( const ::rtl::OUString& rPictureStorageName, const ::rtl::OUString& rPictureStreamName, - BOOL bTruncate ) + sal_Bool bTruncate ) { SvxGraphicHelperStream_Impl aRet; aRet.xStorage = ImplGetGraphicStorage( rPictureStorageName ); @@ -567,7 +567,7 @@ Graphic SvXMLGraphicHelper::ImplReadGraphic( const ::rtl::OUString& rPictureStor const ::rtl::OUString& rPictureStreamName ) { Graphic aGraphic; - SvxGraphicHelperStream_Impl aStream( ImplGetGraphicStream( rPictureStorageName, rPictureStreamName, FALSE ) ); + SvxGraphicHelperStream_Impl aStream( ImplGetGraphicStream( rPictureStorageName, rPictureStreamName, sal_False ) ); if( aStream.xStream.is() ) { SvStream* pStream = utl::UcbStreamHelper::CreateStream( aStream.xStream ); @@ -590,7 +590,7 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt if( aGrfObject.GetType() != GRAPHIC_NONE ) { - SvxGraphicHelperStream_Impl aStream( ImplGetGraphicStream( rPictureStorageName, rPictureStreamName, FALSE ) ); + SvxGraphicHelperStream_Impl aStream( ImplGetGraphicStream( rPictureStorageName, rPictureStreamName, sal_False ) ); if( aStream.xStream.is() ) { Graphic aGraphic( (Graphic&) aGrfObject.GetGraphic() ); @@ -639,7 +639,7 @@ sal_Bool SvXMLGraphicHelper::ImplWriteGraphic( const ::rtl::OUString& rPictureSt if ( pComment ) { sal_uInt32 nSize = pComment->GetDataSize(); - const BYTE* pData = pComment->GetData(); + const sal_uInt8* pData = pComment->GetData(); if ( nSize && pData ) pStream->Write( pData, nSize ); @@ -803,7 +803,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const ::rtl::OUString& rURLStr, s void SvXMLGraphicHelper::Init( const uno::Reference < embed::XStorage >& rXMLStorage, SvXMLGraphicHelperMode eCreateMode, - BOOL bDirect ) + sal_Bool bDirect ) { mxRootStorage = rXMLStorage; meCreateMode = eCreateMode; @@ -814,7 +814,7 @@ void SvXMLGraphicHelper::Init( const uno::Reference < embed::XStorage >& rXMLSto SvXMLGraphicHelper* SvXMLGraphicHelper::Create( const uno::Reference < embed::XStorage >& rXMLStorage, SvXMLGraphicHelperMode eCreateMode, - BOOL bDirect ) + sal_Bool bDirect ) { SvXMLGraphicHelper* pThis = new SvXMLGraphicHelper; diff --git a/svx/source/xml/xmlxtexp.cxx b/svx/source/xml/xmlxtexp.cxx index b04b083f486b..4441e22dbcc0 100644 --- a/svx/source/xml/xmlxtexp.cxx +++ b/svx/source/xml/xmlxtexp.cxx @@ -200,14 +200,14 @@ sal_Bool SvxXMLXTableExportComponent::save( const OUString& rURL, const uno::Ref if( !xServiceFactory.is() ) { DBG_ERROR( "got no service manager" ); - return FALSE; + return sal_False; } uno::Reference< uno::XInterface > xWriter( xServiceFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" ) ) ) ); if( !xWriter.is() ) { DBG_ERROR( "com.sun.star.xml.sax.Writer service missing" ); - return FALSE; + return sal_False; } uno::Reference<xml::sax::XDocumentHandler> xHandler( xWriter, uno::UNO_QUERY ); @@ -231,7 +231,7 @@ sal_Bool SvxXMLXTableExportComponent::save( const OUString& rURL, const uno::Ref } else { - pMedium = new SfxMedium( rURL, STREAM_WRITE | STREAM_TRUNC, TRUE ); + pMedium = new SfxMedium( rURL, STREAM_WRITE | STREAM_TRUNC, sal_True ); pMedium->IsRemote(); SvStream* pStream = pMedium->GetOutStream(); diff --git a/svx/source/xml/xmlxtimp.cxx b/svx/source/xml/xmlxtimp.cxx index c2071d4bd252..b9cd5443f259 100644 --- a/svx/source/xml/xmlxtimp.cxx +++ b/svx/source/xml/xmlxtimp.cxx @@ -92,21 +92,21 @@ enum SvxXMLTableImportContextEnum { stice_unknown, stice_color, stice_marker, st class SvxXMLTableImportContext : public SvXMLImportContext { public: - SvxXMLTableImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >& xAttrList, SvxXMLTableImportContextEnum eContext, const uno::Reference< XNameContainer >& xTable, + SvxXMLTableImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >& xAttrList, SvxXMLTableImportContextEnum eContext, const uno::Reference< XNameContainer >& xTable, sal_Bool bOOoFormat ); virtual ~SvxXMLTableImportContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList ); SvxXMLXTableImport& getImport() const { return *(SvxXMLXTableImport*)&GetImport(); } protected: - void importColor( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); - void importMarker( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); - void importDash( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); - void importHatch( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); - void importGradient( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); - void importBitmap( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); + void importColor( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); + void importMarker( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); + void importDash( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); + void importHatch( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); + void importGradient( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); + void importBitmap( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ); private: uno::Reference< XNameContainer > mxTable; @@ -116,7 +116,7 @@ private: /////////////////////////////////////////////////////////////////////// -SvxXMLTableImportContext::SvxXMLTableImportContext( SvXMLImport& rImport, USHORT nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, SvxXMLTableImportContextEnum eContext, const uno::Reference< XNameContainer >& xTable, sal_Bool bOOoFormat ) +SvxXMLTableImportContext::SvxXMLTableImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< XAttributeList >&, SvxXMLTableImportContextEnum eContext, const uno::Reference< XNameContainer >& xTable, sal_Bool bOOoFormat ) : SvXMLImportContext( rImport, nPrfx, rLName ), mxTable( xTable ), meContext( eContext ), mbOOoFormat( bOOoFormat ) { @@ -126,7 +126,7 @@ SvxXMLTableImportContext::~SvxXMLTableImportContext() { } -SvXMLImportContext *SvxXMLTableImportContext::CreateChildContext( USHORT nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& rAttrList ) +SvXMLImportContext *SvxXMLTableImportContext::CreateChildContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< XAttributeList >& rAttrList ) { if( XML_NAMESPACE_DRAW == nPrefix ) { @@ -223,7 +223,7 @@ SvXMLImportContext *SvxXMLTableImportContext::CreateChildContext( USHORT nPrefix return new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); } -void SvxXMLTableImportContext::importColor( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) +void SvxXMLTableImportContext::importColor( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) { (void)nPrfx; (void)rLocalName; @@ -252,7 +252,7 @@ void SvxXMLTableImportContext::importColor( USHORT nPrfx, const OUString& rLocal } } -void SvxXMLTableImportContext::importMarker( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) +void SvxXMLTableImportContext::importMarker( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) { (void)nPrfx; (void)rLocalName; @@ -268,7 +268,7 @@ void SvxXMLTableImportContext::importMarker( USHORT nPrfx, const OUString& rLoca } } -void SvxXMLTableImportContext::importDash( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) +void SvxXMLTableImportContext::importDash( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) { (void)nPrfx; (void)rLocalName; @@ -284,7 +284,7 @@ void SvxXMLTableImportContext::importDash( USHORT nPrfx, const OUString& rLocalN } } -void SvxXMLTableImportContext::importHatch( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) +void SvxXMLTableImportContext::importHatch( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) { (void)nPrfx; (void)rLocalName; @@ -300,7 +300,7 @@ void SvxXMLTableImportContext::importHatch( USHORT nPrfx, const OUString& rLocal } } -void SvxXMLTableImportContext::importGradient( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) +void SvxXMLTableImportContext::importGradient( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) { (void)nPrfx; (void)rLocalName; @@ -316,7 +316,7 @@ void SvxXMLTableImportContext::importGradient( USHORT nPrfx, const OUString& rLo } } -void SvxXMLTableImportContext::importBitmap( USHORT nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) +void SvxXMLTableImportContext::importBitmap( sal_uInt16 nPrfx, const OUString& rLocalName, const uno::Reference< XAttributeList >& xAttrList, Any& rAny, OUString& rName ) { (void)nPrfx; (void)rLocalName; @@ -373,7 +373,7 @@ sal_Bool SvxXMLXTableImport::load( const OUString& rUrl, const uno::Reference< X { do { - SfxMedium aMedium( rUrl, STREAM_READ | STREAM_NOCREATE, TRUE ); + SfxMedium aMedium( rUrl, STREAM_READ | STREAM_NOCREATE, sal_True ); uno::Reference<lang::XMultiServiceFactory> xServiceFactory( ::comphelper::getProcessServiceFactory() ); if( !xServiceFactory.is() ) |