summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/app.hrc5
-rw-r--r--sd/inc/sdgrffilter.hxx10
-rw-r--r--sd/sdi/sdraw.sdi25
-rw-r--r--sd/source/filter/grf/sdgrffilter.cxx268
-rw-r--r--sd/source/ui/app/app.src6
-rw-r--r--sd/source/ui/app/toolbox.src8
-rw-r--r--sd/source/ui/dlg/gluectrl.cxx6
-rw-r--r--sd/source/ui/dlg/makefile.mk9
-rw-r--r--sd/source/ui/docshell/docshel3.cxx23
-rw-r--r--sd/source/ui/docshell/docshel4.cxx26
-rw-r--r--sd/source/ui/func/makefile.mk10
-rw-r--r--sd/util/makefile.mk9
12 files changed, 313 insertions, 92 deletions
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 91ae1e0f0f6b..1d6710d35136 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -2,9 +2,9 @@
*
* $RCSfile: app.hrc,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: ka $ $Date: 2002-03-06 16:06:28 $
+ * last change: $Author: ka $ $Date: 2002-04-18 15:40:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -347,7 +347,6 @@
#define SID_UNSELECT (SID_SD_START+280)
#define SID_TEXTATTR_DLG (SID_SD_START+281)
#define SID_ORIGINAL_SIZE (SID_SD_START+282)
-#define SID_PUBLISH (SID_SD_START+283)
#define SID_PAGES_PER_ROW (SID_SD_START+284)
#define SID_TEXT_FITTOSIZE (SID_SD_START+285)
#define SID_TEXT_FITTOSIZE_VERTICAL (SID_SD_START+286)
diff --git a/sd/inc/sdgrffilter.hxx b/sd/inc/sdgrffilter.hxx
index c7ea0d88405f..7bf162047635 100644
--- a/sd/inc/sdgrffilter.hxx
+++ b/sd/inc/sdgrffilter.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sdgrffilter.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: ka $ $Date: 2001-02-13 12:01:15 $
+ * last change: $Author: ka $ $Date: 2002-04-18 15:41:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,12 +71,18 @@
class SdGRFFilter : public SdFilter
{
+private:
+
+ static GDIMetaFile ImplRemoveClipRegionActions( const GDIMetaFile& rMtf );
+ static BitmapEx ImplGetBitmapFromMetaFile( const GDIMetaFile& rMtf, BOOL bTransparent, const Size* pSizePixel = NULL );
+
public:
SdGRFFilter( SfxMedium& rMedium, SdDrawDocShell& rDocShell, sal_Bool bShowProgress );
~SdGRFFilter();
virtual sal_Bool Import();
+ virtual sal_Bool Export();
public:
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index fc39db20bea8..5e22dbefa6a1 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -5976,31 +5976,6 @@ SfxBoolItem PreviewWindow SID_PREVIEW_WIN
]
//--------------------------------------------------------------------------
-SfxVoidItem Publish SID_PUBLISH
-()
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = FALSE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = TRUE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_APPLICATION;
-]
-
-//--------------------------------------------------------------------------
SfxBoolItem QuickEdit SID_QUICKEDIT
[
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index b2ecfd3b3496..594a48dd229b 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sdgrffilter.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: ka $ $Date: 2001-07-30 15:30:55 $
+ * last change: $Author: ka $ $Date: 2002-04-18 15:43:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,23 +59,37 @@
*
************************************************************************/
+#include <unotools/localfilehelper.hxx>
#include <tools/errinf.hxx>
#include <tools/urlobj.hxx>
#include <vcl/msgbox.hxx>
+#include <vcl/metaact.hxx>
+#include <vcl/virdev.hxx>
+#include <svtools/FilterConfigItem.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <svx/impgrf.hxx>
#include <svx/svdograf.hxx>
+#include <svx/svdpagv.hxx>
+#include <svx/xoutbmp.hxx>
#ifndef MAC
#ifndef SVX_LIGHT
#include "../../ui/inc/strings.hrc"
#include "../../ui/inc/graphpro.hxx"
+#include "../../ui/inc/drviewsh.hxx"
+#include "../../ui/inc/docshell.hxx"
+#include "../../ui/inc/clview.hxx"
+#include "../../ui/inc/frmview.hxx"
#endif //!SVX_LIGHT
#else //MAC
#ifndef SVX_LIGHT
#include "strings.hrc"
#include "graphpro.hxx"
+#include "drviewsh.hxx"
+#include "docshell.hxx"
+#include "clview.hxx"
+#include "frmview.hxx"
#endif //!SVX_LIGHT
#endif //!MAC
@@ -102,6 +116,63 @@ SdGRFFilter::~SdGRFFilter()
// -----------------------------------------------------------------------------
+GDIMetaFile SdGRFFilter::ImplRemoveClipRegionActions( const GDIMetaFile& rMtf )
+{
+ GDIMetaFile aMtf;
+ const ULONG nActionCount = rMtf.GetActionCount();
+
+ aMtf.SetPrefSize( rMtf.GetPrefSize() );
+ aMtf.SetPrefMapMode( rMtf.GetPrefMapMode() );
+
+ // Actions untersuchen und ClipRegion-Action herausnehmen
+ for ( ULONG nAction = 0; nAction < nActionCount; nAction++ )
+ {
+ MetaAction* pCopyAction = ( (GDIMetaFile&) rMtf ).CopyAction( nAction );
+
+ if( pCopyAction )
+ {
+ switch( pCopyAction->GetType() )
+ {
+ case( META_CLIPREGION_ACTION ) :
+ delete pCopyAction;
+ break;
+
+ default:
+ aMtf.AddAction( pCopyAction );
+ break;
+ }
+ }
+ }
+
+ return aMtf;
+}
+
+// -----------------------------------------------------------------------------
+
+BitmapEx SdGRFFilter::ImplGetBitmapFromMetaFile( const GDIMetaFile& rMtf, BOOL bTransparent, const Size* pSizePixel )
+{
+ Graphic aGraphic( rMtf );
+ BitmapEx aBmpEx;
+
+ if( bTransparent )
+ {
+ Graphic aMaskGraphic( rMtf.GetMonochromeMtf( COL_BLACK ) );
+ Bitmap aMaskBmp( aMaskGraphic.GetBitmap( pSizePixel) );
+
+ aMaskBmp.Convert( BMP_CONVERSION_1BIT_THRESHOLD );
+ aBmpEx = BitmapEx( aGraphic.GetBitmap( pSizePixel ), aMaskBmp );
+ }
+ else
+ aBmpEx = BitmapEx( aGraphic.GetBitmap( pSizePixel ) );
+
+ aBmpEx.SetPrefMapMode( rMtf.GetPrefMapMode() );
+ aBmpEx.SetPrefSize( rMtf.GetPrefSize() );
+
+ return aBmpEx;
+}
+
+// -----------------------------------------------------------------------------
+
void SdGRFFilter::HandleGraphicFilterError( USHORT nFilterError, ULONG nStreamError )
{
USHORT nId;
@@ -147,10 +218,9 @@ void SdGRFFilter::HandleGraphicFilterError( USHORT nFilterError, ULONG nStreamEr
sal_Bool SdGRFFilter::Import()
{
Graphic aGraphic;
- const String aName( mrMedium.GetFilter()->GetName() );
const String aFileName( mrMedium.GetURLObject().GetMainURL( INetURLObject::NO_DECODE ) );
GraphicFilter* pGraphicFilter = GetGrfFilter();
- const USHORT nFilter = pGraphicFilter->GetImportFormatNumber( aName );
+ const USHORT nFilter = pGraphicFilter->GetImportFormatNumberForTypeName( mrMedium.GetFilter()->GetTypeName() );
sal_Bool bRet = sal_False;
// ggf. Filterdialog ausfuehren
@@ -209,3 +279,193 @@ sal_Bool SdGRFFilter::Import()
return bRet;
}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool SdGRFFilter::Export()
+{
+ const String aTypeName( mrMedium.GetFilter()->GetTypeName() );
+ SfxItemSet* pSet = mrMedium.GetItemSet();
+ VirtualDevice aVDev;
+ Graphic aGraphic;
+ SdDrawViewShell* pDrawViewShell = static_cast< SdDrawViewShell* >( ( ( mrDocShell.GetViewShell() && mrDocShell.GetViewShell()->ISA( SdDrawViewShell ) ) ? mrDocShell.GetViewShell() : NULL ) );
+ const Fraction aFrac( mrDocument.GetScaleFraction() );
+ const MapMode aMap( mrDocument.GetScaleUnit(), Point(), aFrac, aFrac );
+ GraphicFilter* pGraphicFilter = GetGrfFilter();
+ SdPage* pPage = NULL;
+ const USHORT nFilter = pGraphicFilter->GetExportFormatNumberForTypeName( aTypeName );
+ USHORT nPage;
+ PageKind ePageKind = PK_STANDARD;
+ BOOL bVectorType = !pGraphicFilter->IsExportPixelFormat( nFilter );
+ BOOL bTranslucent = pGraphicFilter->GetExportFormatShortName( nFilter ).ToLowerAscii().EqualsAscii( "gif" );
+ BOOL bSelection = FALSE;
+ sal_Bool bRet = sal_False;
+
+ if( pSet && ( SFX_ITEM_SET == pSet->GetItemState( SID_SELECTION ) ) && static_cast< const SfxBoolItem& >( pSet->Get( SID_SELECTION ) ).GetValue() )
+ bSelection = TRUE;
+
+ if( pDrawViewShell )
+ {
+ ePageKind = pDrawViewShell->GetPageKind();
+
+ if( PK_HANDOUT == ePageKind )
+ pPage = mrDocument.GetSdPage( 0, PK_HANDOUT );
+ else
+ pPage = pDrawViewShell->GetActualPage();
+ }
+ else
+ pPage = mrDocument.GetSdPage( 0, PK_STANDARD );
+
+ if( pPage )
+ {
+ FilterProgress* pFilterProgress = mbShowProgress ? new FilterProgress( pGraphicFilter, &(SfxObjectShell&) mrDocShell ) : NULL;
+
+ if( pFilterProgress )
+ pFilterProgress->SetState( 10 );
+
+ // translucent speichern?
+ if( bTranslucent )
+ {
+ FilterConfigItem aConfigItem( String( RTL_CONSTASCII_USTRINGPARAM( "Office.Common/Filter/Graphic/Export/GIF" ) ) );
+ bTranslucent = aConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "Translucent" ) ), 1 ) != 0;
+ }
+ else
+ bTranslucent = FALSE;
+
+ // 'richtige' Zeichenseitennummer ermitteln
+ if( pPage->GetPageNum() )
+ nPage = ( pPage->GetPageNum() - 1 ) >> 1;
+ else
+ nPage = 0;
+
+ // 'richtige' Seite besorgen
+ pPage = mrDocument.GetSdPage( nPage, ePageKind );
+
+ if( !bSelection || !pDrawViewShell )
+ {
+ // export the whole page
+ const Size aSize( pPage->GetSize() );
+
+ if ( !bVectorType && !bTranslucent )
+ {
+ const Size aSizePix( aVDev.LogicToPixel( aSize, aMap ) );
+ const long nWidthPix = ( aSizePix.Width() > 2048 || aSizePix.Height() > 2048 ) ? 2048 : 0;
+ SdView* pView = new SdView( &mrDocument, &aVDev );
+ VirtualDevice* pVDev = pView->CreatePageVDev( nPage, ePageKind, nWidthPix );
+
+ if( pVDev )
+ {
+ aGraphic = pVDev->GetBitmap( Point(), pVDev->GetOutputSize() );
+ aGraphic.SetPrefMapMode( aMap );
+ aGraphic.SetPrefSize( aSize );
+ delete pVDev;
+ }
+
+ delete pView;
+ }
+ else
+ {
+ GDIMetaFile aMtf;
+
+ aVDev.SetMapMode( aMap );
+ aVDev.EnableOutput( FALSE );
+ aMtf.Record( &aVDev );
+
+ SdClientView* pView = new SdClientView( &mrDocShell, &aVDev, NULL );
+
+ pView->SetBordVisible( FALSE );
+ pView->SetPageVisible( FALSE );
+ pView->ShowPage( pPage, Point() );
+
+ const Point aNewOrg( pPage->GetLftBorder(), pPage->GetUppBorder() );
+ const Size aNewSize( aSize.Width() - pPage->GetLftBorder() - pPage->GetRgtBorder(),
+ aSize.Height() - pPage->GetUppBorder() - pPage->GetLwrBorder() );
+ const Rectangle aClipRect( aNewOrg, aNewSize );
+ MapMode aVMap( aMap );
+
+ SdrPageView* pPageView = pView->GetPageView( pPage );
+ FrameView* pFrameView = mrDocShell.GetFrameView();
+
+ pPageView->SetVisibleLayers( pFrameView->GetVisibleLayers() );
+ pPageView->SetLockedLayers( pFrameView->GetLockedLayers() );
+ pPageView->SetPrintableLayers( pFrameView->GetPrintableLayers() );
+
+ aVDev.Push();
+ aVMap.SetOrigin( Point( -aNewOrg.X(), -aNewOrg.Y() ) );
+ aVDev.SetRelativeMapMode( aVMap );
+ aVDev.IntersectClipRegion( aClipRect );
+ pView->InitRedraw( &aVDev, Region( Rectangle( Point(), aNewSize ) ) );
+ aVDev.Pop();
+
+ aMtf.Stop();
+ aMtf.WindStart();
+ aMtf.SetPrefMapMode( aMap );
+ aMtf.SetPrefSize( aNewSize );
+
+ aGraphic = Graphic( ImplRemoveClipRegionActions( aMtf ) );
+
+ if( bTranslucent )
+ aGraphic = ImplGetBitmapFromMetaFile( aGraphic.GetGDIMetaFile(), TRUE );
+
+ delete pView;
+ }
+ }
+ else
+ {
+ // export selected objects
+ SdView* pView = pDrawViewShell->GetView();
+
+ if( pView )
+ {
+ if( !bVectorType )
+ {
+ const SdrMarkList& rMarkList = pView->GetMarkList();
+ BOOL bGraf = FALSE;
+
+ if( rMarkList.GetMarkCount() == 1 )
+ {
+ SdrObject* pObj = rMarkList.GetMark( 0 )->GetObj();
+
+ if( pObj && pObj->ISA( SdrGrafObj ) && !( (SdrGrafObj*) pObj )->HasText() )
+ {
+ aGraphic = ( (SdrGrafObj*) pObj )->GetTransformedGraphic();
+ bGraf = TRUE;
+ }
+ }
+
+ if( !bGraf )
+ aGraphic = ImplGetBitmapFromMetaFile( pView->GetAllMarkedMetaFile(), bTranslucent );
+ }
+ else
+ aGraphic = pView->GetAllMarkedMetaFile();
+ }
+ }
+
+ const Size aGraphSize( aGraphic.GetPrefSize() );
+
+ if ( ( aGraphSize.Width() > 1 ) && ( aGraphSize.Height() > 1 ) )
+ {
+ String aTmp;
+ ::utl::LocalFileHelper::ConvertPhysicalNameToURL( mrMedium.GetPhysicalName(), aTmp );
+ const INetURLObject aURL( aTmp );
+
+ mrMedium.Close();
+
+ const USHORT nRet = pGraphicFilter->ExportGraphic( aGraphic, aURL, nFilter, sal_False );
+
+ if( nRet )
+ SdGRFFilter::HandleGraphicFilterError( nRet, pGraphicFilter->GetLastError().nStreamError );
+ else
+ bRet = sal_True;
+ }
+ else
+ {
+ ErrorBox aErrBox( NULL, WB_OK, String( SdResId( STR_EXPORT_EMPTYGRAPHIC ) ) );
+ aErrBox.Execute();
+ }
+
+ delete pFilterProgress;
+ }
+
+ return bRet;
+}
diff --git a/sd/source/ui/app/app.src b/sd/source/ui/app/app.src
index cb32fb0daf6e..65e04a009be8 100644
--- a/sd/source/ui/app/app.src
+++ b/sd/source/ui/app/app.src
@@ -2,9 +2,9 @@
*
* $RCSfile: app.src,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: os $ $Date: 2002-04-05 08:42:44 $
+ * last change: $Author: ka $ $Date: 2002-04-18 15:43:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -236,7 +236,7 @@
SID_WIN_FULLSCREEN;\
SID_COLORVIEW;\
SID_ATTR_LINEEND_STYLE;\
- SID_PUBLISH;\
+ SID_EXPORTDOC;\
SID_MAIL_SENDDOC;\
SID_SAVEASDOC;\
SID_BEZIER_ELIMINATE_POINTS;\
diff --git a/sd/source/ui/app/toolbox.src b/sd/source/ui/app/toolbox.src
index 41b73378f6c7..cad6164d6d87 100644
--- a/sd/source/ui/app/toolbox.src
+++ b/sd/source/ui/app/toolbox.src
@@ -2,9 +2,9 @@
*
* $RCSfile: toolbox.src,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: dl $ $Date: 2001-05-30 15:03:59 $
+ * last change: $Author: ka $ $Date: 2002-04-18 15:44:54 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,8 +94,8 @@ ToolBox RID_PLUGINTOOLBOX
};
ToolBoxItem
{
- Identifier = SID_PUBLISH ;
- HelpID = SID_PUBLISH ;
+ Identifier = SID_EXPORTDOC ;
+ HelpID = SID_EXPORTDOC ;
};
ToolBoxItem
{
diff --git a/sd/source/ui/dlg/gluectrl.cxx b/sd/source/ui/dlg/gluectrl.cxx
index 298608570985..64ff61ca79ac 100644
--- a/sd/source/ui/dlg/gluectrl.cxx
+++ b/sd/source/ui/dlg/gluectrl.cxx
@@ -1,10 +1,10 @@
-/*************************************************************************
+#/*************************************************************************
*
* $RCSfile: gluectrl.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: ka $ $Date: 2001-10-22 13:36:42 $
+ * last change: $Author: ka $ $Date: 2002-04-18 15:45:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
diff --git a/sd/source/ui/dlg/makefile.mk b/sd/source/ui/dlg/makefile.mk
index 88089684eb52..84a11f288db0 100644
--- a/sd/source/ui/dlg/makefile.mk
+++ b/sd/source/ui/dlg/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.9 $
+# $Revision: 1.10 $
#
-# last change: $Author: cl $ $Date: 2001-11-27 16:01:14 $
+# last change: $Author: ka $ $Date: 2002-04-18 15:45:43 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -104,7 +104,6 @@ CXXFILES = $(PRJ)$/util$/sd.cxx \
dlgass.cxx \
assclass.cxx \
graphpro.cxx \
- pubdlg.cxx \
navigatr.cxx \
sdpreslt.cxx \
preview.cxx \
@@ -120,7 +119,6 @@ CXXFILES = $(PRJ)$/util$/sd.cxx \
dlgfield.cxx \
custsdlg.cxx \
brkdlg.cxx \
- htmlattr.cxx \
vectdlg.cxx \
docprev.cxx \
TemplateThread.cxx
@@ -142,7 +140,6 @@ SRCFILES =\
copydlg.src\
tpoption.src\
dlgass.src\
- pubdlg.src\
navigatr.src\
sdpreslt.src\
preview.src\
@@ -184,7 +181,6 @@ SLOFILES = \
$(SLO)$/dlgass.obj \
$(SLO)$/assclass.obj \
$(SLO)$/graphpro.obj \
- $(SLO)$/pubdlg.obj \
$(SLO)$/navigatr.obj \
$(SLO)$/preview.obj \
$(SLO)$/effect.obj \
@@ -200,7 +196,6 @@ SLOFILES = \
$(SLO)$/dlgfield.obj \
$(SLO)$/custsdlg.obj \
$(SLO)$/brkdlg.obj \
- $(SLO)$/htmlattr.obj \
$(SLO)$/vectdlg.obj \
$(SLO)$/docprev.obj \
$(SLO)$/TemplateThread.obj
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx
index 2f2b6416a88e..4d5811f7437b 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docshel3.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: cl $ $Date: 2001-11-27 16:05:18 $
+ * last change: $Author: ka $ $Date: 2002-04-18 15:46:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -127,7 +127,6 @@
#include "fusearch.hxx"
#include "viewshel.hxx"
#include "sdview.hxx"
-#include "fuexport.hxx"
#include "fuslshow.hxx"
#define POOL_BUFFER_SIZE (USHORT)32768
@@ -280,24 +279,6 @@ void SdDrawDocShell::Execute( SfxRequest& rReq )
}
break;
- case SID_PUBLISH:
- {
- if ( pViewShell )
- {
- pFuActual = new FuExport( pViewShell, pViewShell->GetActiveWindow(),
- pViewShell->GetView(), pDoc, rReq );
-
- pFuActual->Activate();
- pFuActual->Deactivate();
-
- delete pFuActual;
- pFuActual = NULL;
-
- rReq.Done();
- }
- }
- break;
-
case SID_GET_COLORTABLE:
{
// passende ColorTable ist per PutItem gesetzt worden
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 92521c68136f..445e8ef23abf 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docshel4.cxx,v $
*
- * $Revision: 1.43 $
+ * $Revision: 1.44 $
*
- * last change: $Author: ka $ $Date: 2002-03-06 16:25:29 $
+ * last change: $Author: ka $ $Date: 2002-04-18 15:47:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -160,6 +160,7 @@
#include "sdcgmfilter.hxx"
#include "sdgrffilter.hxx"
#include "sdbinfilter.hxx"
+#include "sdhtmlfilter.hxx"
/*************************************************************************
|*
@@ -691,10 +692,15 @@ BOOL SdDrawDocShell::ConvertTo( SfxMedium& rMedium )
if( pDoc->GetPageCount() )
{
- String aFilterName( rMedium.GetFilter()->GetFilterName() );
- SdFilter* pFilter = NULL;
+ const SfxFilter* pMediumFilter = rMedium.GetFilter();
+ const String aTypeName( pMediumFilter->GetTypeName() );
+ SdFilter* pFilter = NULL;
- if( aFilterName.SearchAscii( "MS PowerPoint 97" ) != STRING_NOTFOUND )
+ if( aTypeName.SearchAscii( "graphic_HTML" ) != STRING_NOTFOUND )
+ {
+ pFilter = new SdHTMLFilter( rMedium, *this, sal_True );
+ }
+ else if( aTypeName.SearchAscii( "MS_PowerPoint_97" ) != STRING_NOTFOUND )
{
pFilter = new SdPPTFilter( rMedium, *this, sal_True );
((SdPPTFilter*)pFilter)->PreSaveBasic();
@@ -706,16 +712,20 @@ BOOL SdDrawDocShell::ConvertTo( SfxMedium& rMedium )
if ( bInPlaceObjects )
((SdPPTFilter*)pFilter)->SetOleSource( xOleSource );
}
- else if ( aFilterName.SearchAscii( "CGM - Computer Graphics Metafile" ) != STRING_NOTFOUND )
+ else if ( aTypeName.SearchAscii( "CGM_Computer_Graphics_Metafile" ) != STRING_NOTFOUND )
{
pFilter = new SdCGMFilter( rMedium, *this, sal_True );
}
- else if( ( aFilterName.SearchAscii("StarOffice XML (Draw)" ) != STRING_NOTFOUND ) ||
- ( aFilterName.SearchAscii("StarOffice XML (Impress)") != STRING_NOTFOUND ) )
+ else if( ( aTypeName.SearchAscii( "StarOffice_XML_Impress " ) != STRING_NOTFOUND ) ||
+ ( aTypeName.SearchAscii( "StarOffice_XML_Draw" ) != STRING_NOTFOUND ) )
{
pFilter = new SdXMLFilter( rMedium, *this, sal_True );
UpdateDocInfoForSave();
}
+ else
+ {
+ pFilter = new SdGRFFilter( rMedium, *this, sal_True );
+ }
if( pFilter )
{
diff --git a/sd/source/ui/func/makefile.mk b/sd/source/ui/func/makefile.mk
index 38e9f53d72a7..68f41feb2639 100644
--- a/sd/source/ui/func/makefile.mk
+++ b/sd/source/ui/func/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.6 $
+# $Revision: 1.7 $
#
-# last change: $Author: cl $ $Date: 2001-11-27 16:02:49 $
+# last change: $Author: ka $ $Date: 2002-04-18 15:47:30 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -80,7 +80,6 @@ AUTOSEG=true
# --- Files --------------------------------------------------------
CXXFILES = $(PRJ)$/util$/sd.cxx \
- fuhtmlex.cxx \
fupoor.cxx \
fudraw.cxx \
fusel.cxx \
@@ -143,8 +142,6 @@ CXXFILES = $(PRJ)$/util$/sd.cxx \
fudspord.cxx \
unmovss.cxx \
fucon3d.cxx \
- fuexp1.cxx \
- fuexp2.cxx \
fumorph.cxx \
fuexpand.cxx \
fusumry.cxx \
@@ -162,7 +159,6 @@ EXCEPTIONSFILES= \
$(SLO)$/fuinsert.obj
SLOFILES = \
- $(SLO)$/fuhtmlex.obj \
$(SLO)$/fupoor.obj \
$(SLO)$/fudraw.obj \
$(SLO)$/fuzoom.obj \
@@ -225,8 +221,6 @@ SLOFILES = \
$(SLO)$/fudspord.obj \
$(SLO)$/unmovss.obj \
$(SLO)$/fucon3d.obj \
- $(SLO)$/fuexp1.obj \
- $(SLO)$/fuexp2.obj \
$(SLO)$/fumorph.obj \
$(SLO)$/fuexpand.obj \
$(SLO)$/fusumry.obj \
diff --git a/sd/util/makefile.mk b/sd/util/makefile.mk
index 8f700e934f27..cc15f9a051db 100644
--- a/sd/util/makefile.mk
+++ b/sd/util/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.15 $
+# $Revision: 1.16 $
#
-# last change: $Author: af $ $Date: 2002-02-05 14:39:38 $
+# last change: $Author: ka $ $Date: 2002-04-18 15:48:12 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -88,12 +88,12 @@ LINKFLAGS+=/SEGMENTS:512 /PACKD:32768
.IF "$(GUI)"=="WIN"
RESLIBSPLIT1NAME=sd
RESLIBSPLIT1SRSFILES= \
- $(SRS)$/app.srs $(SRS)$/dlg.srs $(SRS)$/core.srs $(SRS)$/sdslots.srs \
+ $(SRS)$/app.srs $(SRS)$/dlg.srs $(SRS)$/core.srs $(SRS)$/html.srs $(SRS)$/sdslots.srs \
$(SOLARRESDIR)$/sfx.srs
.ELSE
RESLIB1NAME=sd
RESLIB1SRSFILES=\
- $(SRS)$/app.srs $(SRS)$/dlg.srs $(SRS)$/core.srs $(SRS)$/sdslots.srs \
+ $(SRS)$/app.srs $(SRS)$/dlg.srs $(SRS)$/core.srs $(SRS)$/html.srs $(SRS)$/sdslots.srs \
$(SOLARRESDIR)$/sfx.srs
.ENDIF
@@ -182,6 +182,7 @@ LIB3FILES= \
$(SLB)$/cgm.lib \
$(SLB)$/grf.lib \
$(SLB)$/bin.lib \
+ $(SLB)$/html.lib \
$(SLB)$/filter.lib \
$(SLB)$/unoidl.lib \
$(SLB)$/accessibility.lib