summaryrefslogtreecommitdiff
path: root/filter/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-12 14:53:28 +0200
committerNoel Grandin <noel@peralex.com>2015-03-18 14:23:50 +0200
commitfb14be5f8f74f83ba89e15f891ddf1f753dcc62f (patch)
treebeaa4af08b0c3d75bf6e40b21b96c55e0ac1c60a /filter/source
parentb8ce52aab9459773544f1696cfe6b7b6f171a389 (diff)
create new 'enum class' SotClipboardFormatId to unify types
of which there are several. There are some issues here I am unsure of - the SW and SC and CHART2 modules essentially ignore the enum values and assign their own ids Perhaps I should change them to use the common values and create new enum values where necessary? - the sc/qa/ and sq/qa/ and starmath/qa/ code was doing some dodgy stuff. I translated the code to pass down the stuff numeric values to the underlying code, but perhaps further fixing is necessary? Change-Id: Ic06d723e404481e3f1bca67c43b70321b764d923
Diffstat (limited to 'filter/source')
-rw-r--r--filter/source/msfilter/msdffimp.cxx10
-rw-r--r--filter/source/msfilter/msoleexp.cxx2
-rw-r--r--filter/source/msfilter/viscache.hxx30
3 files changed, 21 insertions, 21 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 328fe2f9306e..a3e880d8ed53 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -153,7 +153,7 @@ static sal_uInt32 nMSOleObjCntr = 0;
/************************************************************************/
void Impl_OlePres::Write( SvStream & rStm )
{
- WriteClipboardFormat( rStm, FORMAT_GDIMETAFILE );
+ WriteClipboardFormat( rStm, SotClipboardFormatId::GDIMETAFILE );
rStm.WriteInt32( nJobLen + 4 ); // a TargetDevice that's always empty
if( nJobLen )
rStm.Write( pJob, nJobLen );
@@ -166,7 +166,7 @@ void Impl_OlePres::Write( SvStream & rStm )
sal_uLong nPos = rStm.Tell();
rStm.WriteInt32( 0 );
- if( GetFormat() == FORMAT_GDIMETAFILE && pMtf )
+ if( GetFormat() == SotClipboardFormatId::GDIMETAFILE && pMtf )
{
// Always to 1/100 mm, until Mtf-Solution found
// Assumption (no scaling, no origin translation)
@@ -6534,7 +6534,7 @@ bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile &
sal_uInt16 nAspect = ASPECT_CONTENT;
sal_uLong nAdviseModes = 2;
- Impl_OlePres aEle( FORMAT_GDIMETAFILE );
+ Impl_OlePres aEle( SotClipboardFormatId::GDIMETAFILE );
// Convert the size in 1/100 mm
// If a not applicable MapUnit (device dependent) is used,
// SV tries to guess a best match for the right value
@@ -6729,13 +6729,13 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
if( pIds->nId )
{
// found!
- sal_uLong nCbFmt = SotExchange::RegisterFormatName( aSvrName );
+ SotClipboardFormatId nCbFmt = SotExchange::RegisterFormatName( aSvrName );
rDest->SetClass( SvGlobalName( pIds->nId, 0, 0, 0xc0,0,0,0,0,0,0,0x46 ), nCbFmt,
OUString::createFromAscii( pIds->pDspName ) );
}
else
{
- sal_uLong nCbFmt = SotExchange::RegisterFormatName( aSvrName );
+ SotClipboardFormatId nCbFmt = SotExchange::RegisterFormatName( aSvrName );
rDest->SetClass( SvGlobalName(), nCbFmt, aSvrName );
}
}
diff --git a/filter/source/msfilter/msoleexp.cxx b/filter/source/msfilter/msoleexp.cxx
index 374707cd4057..c647141d40ec 100644
--- a/filter/source/msfilter/msoleexp.cxx
+++ b/filter/source/msfilter/msoleexp.cxx
@@ -222,7 +222,7 @@ void SvxMSExportOLEObjects::ExportOLEObject( svt::EmbeddedObjectRef& rObj, SvSto
// this is a SO6 embedded object, save in old binary format
rDestStg.SetVersion( SOFFICE_FILEFORMAT_31 );
rDestStg.SetClass( aEmbName,
- SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE,
+ SotClipboardFormatId::EMBEDDED_OBJ_OLE,
GetStorageType( aEmbName ) );
SotStorageStreamRef xExtStm = rDestStg.OpenSotStream(
OUString( "properties_stream" ),
diff --git a/filter/source/msfilter/viscache.hxx b/filter/source/msfilter/viscache.hxx
index a52ca4a0b2de..84e7c978f3b5 100644
--- a/filter/source/msfilter/viscache.hxx
+++ b/filter/source/msfilter/viscache.hxx
@@ -26,17 +26,17 @@
class Impl_OlePres
{
- sal_uLong nFormat;
- sal_uInt16 nAspect;
+ SotClipboardFormatId nFormat;
+ sal_uInt16 nAspect;
Bitmap * pBmp;
GDIMetaFile * pMtf;
- sal_uInt32 nAdvFlags;
- sal_Int32 nJobLen;
- sal_uInt8* pJob;
- Size aSize; // Groesse in 100TH_MM
+ sal_uInt32 nAdvFlags;
+ sal_Int32 nJobLen;
+ sal_uInt8* pJob;
+ Size aSize; // Groesse in 100TH_MM
public:
- Impl_OlePres( sal_uLong nF )
+ Impl_OlePres( SotClipboardFormatId nF )
: nFormat( nF )
, nAspect( ASPECT_CONTENT )
, pBmp( NULL )
@@ -57,14 +57,14 @@ public:
delete pMtf;
pMtf = new GDIMetaFile( rMtf );
}
- Bitmap *GetBitmap() const { return pBmp; }
- GDIMetaFile *GetMetaFile() const { return pMtf; }
- sal_uLong GetFormat() const { return nFormat; }
- void SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; }
- sal_uLong GetAdviseFlags() const { return nAdvFlags; }
- void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; }
- void SetSize( const Size & rSize ) { aSize = rSize; }
- void Write( SvStream & rStm );
+ Bitmap *GetBitmap() const { return pBmp; }
+ GDIMetaFile *GetMetaFile() const { return pMtf; }
+ SotClipboardFormatId GetFormat() const { return nFormat; }
+ void SetAspect( sal_uInt16 nAsp ) { nAspect = nAsp; }
+ sal_uLong GetAdviseFlags() const { return nAdvFlags; }
+ void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; }
+ void SetSize( const Size & rSize ) { aSize = rSize; }
+ void Write( SvStream & rStm );
};
#endif // INCLUDED_FILTER_SOURCE_MSFILTER_VISCACHE_HXX