summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanelBase.cxx4
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx10
-rw-r--r--svx/source/xoutdev/_xoutbmp.cxx25
3 files changed, 20 insertions, 19 deletions
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 90140dfdb894..e82242591617 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -200,13 +200,13 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, ClickImportBitmapHdl, Button*, void)
{
SvxOpenGraphicDialog aDlg( "Import" );
aDlg.EnableLink(false);
- if( aDlg.Execute() == GRFILTER_OK )
+ if( aDlg.Execute() == ERRCODE_NONE )
{
Graphic aGraphic;
EnterWait();
int nError = aDlg.GetGraphic( aGraphic );
LeaveWait();
- if( nError == GRFILTER_OK )
+ if( nError == ERRCODE_NONE )
{
const SvxBitmapListItem aItem( *static_cast<const SvxBitmapListItem*>(SfxObjectShell::Current()->GetItem(SID_BITMAP_LIST)));
XBitmapListRef pList = aItem.GetBitmapList();
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 17eabdd5c360..e4ae5760b944 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -1013,15 +1013,15 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes
// create the output stuff
Graphic aGraphic;
- sal_uInt16 nStatus = GetGraphic( aSettings, aGraphic, bVectorType ) ? GRFILTER_OK : GRFILTER_FILTERERROR;
+ ErrCode nStatus = GetGraphic( aSettings, aGraphic, bVectorType ) ? ERRCODE_NONE : ERRCODE_GRFILTER_FILTERERROR;
- if( nStatus == GRFILTER_OK )
+ if( nStatus == ERRCODE_NONE )
{
// export graphic only if it has a size
const Size aGraphSize( aGraphic.GetPrefSize() );
if ( ( aGraphSize.Width() == 0 ) || ( aGraphSize.Height() == 0 ) )
{
- nStatus = GRFILTER_FILTERERROR;
+ nStatus = ERRCODE_GRFILTER_FILTERERROR;
}
else
{
@@ -1054,7 +1054,7 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes
}
}
- if ( aSettings.mxInteractionHandler.is() && ( nStatus != GRFILTER_OK ) )
+ if ( aSettings.mxInteractionHandler.is() && ( nStatus != ERRCODE_NONE ) )
{
Any aInteraction;
Sequence< css::uno::Reference< css::task::XInteractionContinuation > > lContinuations(1);
@@ -1066,7 +1066,7 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes
aInteraction <<= aErrorCode;
aSettings.mxInteractionHandler->handle( framework::InteractionRequest::CreateRequest( aInteraction, lContinuations ) );
}
- return nStatus == GRFILTER_OK;
+ return nStatus == ERRCODE_NONE;
}
void SAL_CALL GraphicExporter::cancel()
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index fd105064b55c..6205b6533b6a 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -117,7 +117,7 @@ Graphic XOutBitmap::MirrorGraphic( const Graphic& rGraphic, const BmpMirrorFlags
return aRetGraphic;
}
-sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
+ErrCode XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileName,
const OUString& rFilterName, const XOutFlags nFlags,
const Size* pMtfSize_100TH_MM )
{
@@ -127,7 +127,8 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
Graphic aGraphic;
OUString aExt;
GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter();
- sal_uInt16 nErr = GRFILTER_FILTERERROR, nFilter = GRFILTER_FORMAT_NOTFOUND;
+ ErrCode nErr = ERRCODE_GRFILTER_FILTERERROR;
+ sal_uInt16 nFilter = GRFILTER_FORMAT_NOTFOUND;
bool bTransparent = rGraphic.IsTransparent(), bAnimated = rGraphic.IsAnimated();
DBG_ASSERT( aURL.GetProtocol() != INetProtocol::NotValid, "XOutBitmap::WriteGraphic(...): invalid URL" );
@@ -169,7 +170,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
if(!aMedium.GetError())
{
- nErr = GRFILTER_OK;
+ nErr = ERRCODE_NONE;
}
}
}
@@ -188,11 +189,11 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
pOutStream->WriteBytes(aPdfData.getConstArray(), aPdfData.getLength());
aMedium.Commit();
if (!aMedium.GetError())
- nErr = GRFILTER_OK;
+ nErr = ERRCODE_NONE;
}
}
- if( GRFILTER_OK != nErr )
+ if( ERRCODE_NONE != nErr )
{
if( ( nFlags & XOutFlags::UseNativeIfPossible ) &&
!( nFlags & XOutFlags::MirrorHorz ) &&
@@ -231,13 +232,13 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
aMedium.Commit();
if( !aMedium.GetError() )
- nErr = GRFILTER_OK;
+ nErr = ERRCODE_NONE;
}
}
}
}
- if( GRFILTER_OK != nErr )
+ if( ERRCODE_NONE != nErr )
{
OUString aFilter( rFilterName );
bool bWriteTransGrf = ( aFilter.equalsIgnoreAsciiCase( "transgrf" ) ) ||
@@ -344,7 +345,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
}
else
{
- return GRFILTER_OK;
+ return ERRCODE_NONE;
}
}
@@ -406,7 +407,7 @@ bool XOutBitmap::GraphicToBase64(const Graphic& rGraphic, OUString& rOUString)
return true;
}
-sal_uInt16 XOutBitmap::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL,
+ErrCode XOutBitmap::ExportGraphic( const Graphic& rGraphic, const INetURLObject& rURL,
GraphicFilter& rFilter, const sal_uInt16 nFormat,
const css::uno::Sequence< css::beans::PropertyValue >* pFilterData )
{
@@ -414,7 +415,7 @@ sal_uInt16 XOutBitmap::ExportGraphic( const Graphic& rGraphic, const INetURLObje
SfxMedium aMedium( rURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ), StreamMode::WRITE | StreamMode::SHARE_DENYNONE | StreamMode::TRUNC );
SvStream* pOStm = aMedium.GetOutStream();
- sal_uInt16 nRet = GRFILTER_IOERROR;
+ ErrCode nRet = ERRCODE_GRFILTER_IOERROR;
if( pOStm )
{
@@ -425,8 +426,8 @@ sal_uInt16 XOutBitmap::ExportGraphic( const Graphic& rGraphic, const INetURLObje
pGrfFilter = nullptr;
aMedium.Commit();
- if( aMedium.GetError() && ( GRFILTER_OK == nRet ) )
- nRet = GRFILTER_IOERROR;
+ if( aMedium.GetError() && ( ERRCODE_NONE == nRet ) )
+ nRet = ERRCODE_GRFILTER_IOERROR;
}
return nRet;