summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-01 16:47:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-02 09:00:13 +0200
commit0265bdb92e5dbb5ba851a3d89eb8722bdaf081be (patch)
tree46c8f87d626cb6c74e211f4dce2721ab5c9b9e14 /sd
parentcf0651fe736c1f411651ee2691ab009fe271be2f (diff)
convert GRFILTER constants to ERRCODE_GRFILTER_
since various code mixes these constants in with ErrCode values from other code, let us just make it into real ErrCode values. Change-Id: Ifa3d0f7526172609a44e6749bed9f730ab6b1a95 Reviewed-on: https://gerrit.libreoffice.org/38313 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/sdgrffilter.hxx2
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx16
-rw-r--r--sd/source/ui/func/fuinsert.cxx8
-rw-r--r--sd/source/ui/func/fupage.cxx4
4 files changed, 15 insertions, 15 deletions
diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx
index fdd2bc04f6cd..a64896d4d4b2 100644
--- a/sd/inc/sdgrffilter.hxx
+++ b/sd/inc/sdgrffilter.hxx
@@ -36,7 +36,7 @@ public:
bool Import();
bool Export() override;
- static void HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong nStreamError );
+ static void HandleGraphicFilterError( ErrCode nFilterError, sal_uLong nStreamError );
};
#endif // INCLUDED_SD_INC_SDGRFFILTER_HXX
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index 7e668a0ab53f..93c80c101803 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -92,7 +92,7 @@ class SdGRFFilter_ImplInteractionHdl : public ::cppu::WeakImplHelper< css::task:
explicit SdGRFFilter_ImplInteractionHdl( css::uno::Reference< css::task::XInteractionHandler > const & xInteraction ) :
m_xInter( xInteraction ),
- nFilterError( GRFILTER_OK )
+ nFilterError( ERRCODE_NONE )
{}
sal_uInt16 GetErrorCode() const { return nFilterError; };
@@ -122,25 +122,25 @@ SdGRFFilter::~SdGRFFilter()
{
}
-void SdGRFFilter::HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong nStreamError )
+void SdGRFFilter::HandleGraphicFilterError( ErrCode nFilterError, sal_uLong nStreamError )
{
sal_uInt16 nId;
switch( nFilterError )
{
- case GRFILTER_OPENERROR:
+ case ERRCODE_GRFILTER_OPENERROR:
nId = STR_IMPORT_GRFILTER_OPENERROR;
break;
- case GRFILTER_IOERROR:
+ case ERRCODE_GRFILTER_IOERROR:
nId = STR_IMPORT_GRFILTER_IOERROR;
break;
- case GRFILTER_FORMATERROR:
+ case ERRCODE_GRFILTER_FORMATERROR:
nId = STR_IMPORT_GRFILTER_FORMATERROR;
break;
- case GRFILTER_VERSIONERROR:
+ case ERRCODE_GRFILTER_VERSIONERROR:
nId = STR_IMPORT_GRFILTER_VERSIONERROR;
break;
- case GRFILTER_TOOBIG:
+ case ERRCODE_GRFILTER_TOOBIG:
nId = STR_IMPORT_GRFILTER_TOOBIG;
break;
case 0 :
@@ -148,7 +148,7 @@ void SdGRFFilter::HandleGraphicFilterError( sal_uInt16 nFilterError, sal_uLong n
break;
default:
- case GRFILTER_FILTERERROR:
+ case ERRCODE_GRFILTER_FILTERERROR:
nId = STR_IMPORT_GRFILTER_FILTERERROR;
break;
}
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index d8f9d04a7fb6..d7077b57ed8c 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -121,7 +121,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
Graphic aGraphic;
bool bAsLink = false;
- int nError = GRFILTER_OPENERROR;
+ ErrCode nError = ERRCODE_GRFILTER_OPENERROR;
const SfxItemSet* pArgs = rReq.GetArgs();
const SfxPoolItem* pItem;
@@ -143,7 +143,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
{
SvxOpenGraphicDialog aDlg(SdResId(STR_INSERTGRAPHIC));
- if( aDlg.Execute() != GRFILTER_OK )
+ if( aDlg.Execute() != ERRCODE_NONE )
return; // cancel dialog
nError = aDlg.GetGraphic(aGraphic);
@@ -152,7 +152,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
aFilterName = aDlg.GetCurrentFilter();
}
- if( nError == GRFILTER_OK )
+ if( nError == ERRCODE_NONE )
{
if( mpViewShell && dynamic_cast< DrawViewShell *>( mpViewShell ) != nullptr)
{
@@ -213,7 +213,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
}
else
{
- SdGRFFilter::HandleGraphicFilterError( (sal_uInt16)nError, GraphicFilter::GetGraphicFilter().GetLastError().nStreamError );
+ SdGRFFilter::HandleGraphicFilterError( nError, GraphicFilter::GetGraphicFilter().GetLastError().nStreamError );
}
}
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index 40095175025e..77ad9e4a990c 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -310,11 +310,11 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
{
SvxOpenGraphicDialog aDlg(SdResId(STR_SET_BACKGROUND_PICTURE));
- if( aDlg.Execute() == GRFILTER_OK )
+ if( aDlg.Execute() == ERRCODE_NONE )
{
Graphic aGraphic;
int nError = aDlg.GetGraphic(aGraphic);
- if( nError == GRFILTER_OK )
+ if( nError == ERRCODE_NONE )
{
pTempSet.reset( new SfxItemSet( mpDoc->GetPool(), XATTR_FILL_FIRST, XATTR_FILL_LAST, 0) );