summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfx2/inc/sfx2/dllapi.h2
-rw-r--r--sfx2/inc/sfx2/linkmgr.hxx59
-rw-r--r--sfx2/inc/sfx2/lnkbase.hxx10
-rw-r--r--sfx2/inc/sfx2/opengrf.hxx (renamed from svx/inc/opengrf.hxx)13
-rw-r--r--sfx2/inc/sfx2/sfxdlg.hxx4
-rw-r--r--sfx2/prj/d.lst97
-rw-r--r--sfx2/source/appl/app.hrc12
-rw-r--r--sfx2/source/appl/app.src39
-rw-r--r--sfx2/source/appl/fileobj.cxx (renamed from svx/source/svxlink/fileobj.cxx)32
-rw-r--r--sfx2/source/appl/fileobj.hxx (renamed from svx/source/svxlink/fileobj.hxx)4
-rw-r--r--sfx2/source/appl/linkmgr2.cxx400
-rw-r--r--sfx2/source/appl/lnkbase2.cxx15
-rw-r--r--sfx2/source/appl/makefile.mk4
-rw-r--r--sfx2/source/appl/opengrf.cxx (renamed from svx/source/dialog/opengrf.cxx)19
-rw-r--r--svx/inc/linkmgr.hxx101
-rw-r--r--svx/inc/optextbr.hrc59
-rw-r--r--svx/inc/svx/dialogs.hrc15
-rw-r--r--svx/inc/svx/svdmodel.hxx12
-rw-r--r--svx/prj/build.lst4
-rw-r--r--svx/source/dialog/hyprdlg.hxx2
-rw-r--r--svx/source/dialog/makefile.mk8
-rw-r--r--svx/source/dialog/optgrid.cxx (renamed from svx/source/options/optgrid.cxx)0
-rw-r--r--svx/source/dialog/optgrid.hrc (renamed from svx/source/options/optgrid.hrc)0
-rw-r--r--svx/source/dialog/optgrid.src (renamed from svx/source/options/optgrid.src)0
-rw-r--r--svx/source/dialog/sdstring.src26
-rw-r--r--svx/source/dialog/svxbmpnumvalueset.cxx2
-rw-r--r--svx/source/dialog/txencbox.cxx2
-rw-r--r--svx/source/options/makefile.mk57
-rw-r--r--svx/source/svdraw/svdmodel.cxx2
-rw-r--r--svx/source/svdraw/svdograf.cxx13
-rw-r--r--svx/source/svdraw/svdogrp.cxx2
-rw-r--r--svx/source/svdraw/svdoole2.cxx8
-rw-r--r--svx/source/svdraw/svdotxln.cxx20
-rw-r--r--svx/source/svxlink/linkmgr.cxx390
-rw-r--r--svx/source/svxlink/linkmgr.src86
-rw-r--r--svx/source/svxlink/makefile.mk65
-rw-r--r--svx/util/makefile.mk5
37 files changed, 540 insertions, 1049 deletions
diff --git a/sfx2/inc/sfx2/dllapi.h b/sfx2/inc/sfx2/dllapi.h
index 3d8cd8621985..966f6b7f29f7 100644
--- a/sfx2/inc/sfx2/dllapi.h
+++ b/sfx2/inc/sfx2/dllapi.h
@@ -40,4 +40,6 @@
#define SFX2_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
#endif
+#define SFX2_DLLPRIVATE SAL_DLLPRIVATE
+
#endif
diff --git a/sfx2/inc/sfx2/linkmgr.hxx b/sfx2/inc/sfx2/linkmgr.hxx
index 960faed33473..4d37dd0a1670 100644
--- a/sfx2/inc/sfx2/linkmgr.hxx
+++ b/sfx2/inc/sfx2/linkmgr.hxx
@@ -37,9 +37,15 @@
#include <svl/svarray.hxx>
class SfxObjectShell;
+class Graphic;
+class Size;
namespace sfx2
{
+ // Damit der Link ueber den Status der zu ladenen Grafik informierten werden
+ // verschickt das FileObject ein SvData, mit der FormatId
+ // "RegisterStatusInfoId" und ein einem String als Datentraeger. Dieser
+ // enthaelt den folgenden enum.
class SvBaseLink;
class SvBaseLinkRef;
@@ -50,7 +56,7 @@ SV_DECL_PTRARR( SvBaseLinks, SvBaseLinkRefPtr, 1, 1 )
typedef SvLinkSource* SvLinkSourcePtr;
SV_DECL_PTRARR( SvLinkSources, SvLinkSourcePtr, 1, 1 )
-class SFX2_DLLPUBLIC SvLinkManager
+class SFX2_DLLPUBLIC LinkManager
{
SvBaseLinks aLinkTbl;
SvLinkSources aServerTbl;
@@ -60,8 +66,17 @@ protected:
BOOL InsertLink( SvBaseLink* pLink, USHORT nObjType, USHORT nUpdateType,
const String* pName = 0 );
public:
- SvLinkManager();
- virtual ~SvLinkManager();
+
+ enum LinkState
+ {
+ STATE_LOAD_OK,
+ STATE_LOAD_ERROR,
+ STATE_LOAD_ABORT
+ };
+
+ LinkManager( SfxObjectShell * pCacheCont );
+ ~LinkManager();
+
SfxObjectShell* GetPersist() const { return pPersist; }
void SetPersist( SfxObjectShell * p ) { pPersist = p; }
@@ -78,14 +93,24 @@ public:
// falls am Link schon alles eingestellt ist !
BOOL InsertDDELink( SvBaseLink* );
+ // den Link mit einem PseudoObject verbinden und in die Liste eintragen
+ BOOL InsertFileLink( sfx2::SvBaseLink&,
+ USHORT nFileType,
+ const String& rTxt,
+ const String* pFilterNm = 0,
+ const String* pRange = 0 );
+
+ // falls am Link schon alles eingestellt ist !
+ BOOL InsertFileLink( sfx2::SvBaseLink& );
+
// erfrage die Strings fuer den Dialog
- virtual BOOL GetDisplayNames( const SvBaseLink *,
+ BOOL GetDisplayNames( const SvBaseLink *,
String* pType,
String* pFile = 0,
String* pLink = 0,
String* pFilter = 0 ) const;
- virtual SvLinkSourceRef CreateObj( SvBaseLink* );
+ SvLinkSourceRef CreateObj( SvBaseLink* );
void UpdateAllLinks( BOOL bAskUpdate = TRUE,
BOOL bCallErrHdl = TRUE,
@@ -105,10 +130,28 @@ public:
void RemoveServer( USHORT nPos, USHORT nCnt = 1 )
{ aServerTbl.Remove( nPos, nCnt ); }
+ // eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
+ // (ist zur Zeit nur fuer die FileLinks interressant!)
+ void CancelTransfers();
+
+ static void SetTransferPriority( sfx2::SvBaseLink& rLink, USHORT nPrio );
+
+ // um Status Informationen aus dem FileObject an den BaseLink zu
+ // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
+ // dann die entsprechenden Informationen als String.
+ // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
+ // - das braucht Informationen ueber Load/Abort/Error
+ static ULONG RegisterStatusInfoId();
+
+ // if the mimetype says graphic/bitmap/gdimetafile then get the
+ // graphic from the Any. Return says no errors
+ static BOOL GetGraphicFromAny( const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue,
+ Graphic& rGrf );
+
private:
- // diese Methoden gibts nicht!
- SvLinkManager( const SvLinkManager& );
- SvLinkManager& operator=( const SvLinkManager& );
+ LinkManager( const LinkManager& );
+ LinkManager& operator=( const LinkManager& );
};
// Trenner im LinkName fuer die DDE-/File-/Grafik- Links
diff --git a/sfx2/inc/sfx2/lnkbase.hxx b/sfx2/inc/sfx2/lnkbase.hxx
index 1cec933bbcaa..19a6d6c33bc5 100644
--- a/sfx2/inc/sfx2/lnkbase.hxx
+++ b/sfx2/inc/sfx2/lnkbase.hxx
@@ -51,7 +51,7 @@ namespace sfx2
{
struct ImplBaseLinkData;
-class SvLinkManager;
+class LinkManager;
class SvLinkSource;
class FileDialogHelper;
@@ -82,7 +82,7 @@ struct BaseLink_Impl;
class SFX2_DLLPUBLIC SvBaseLink : public SvRefBase
{
private:
- friend class SvLinkManager;
+ friend class LinkManager;
friend class SvLinkSource;
SvLinkSourceRef xObj;
@@ -148,9 +148,9 @@ public:
ULONG GetContentType() const;
BOOL SetContentType( ULONG nType );
- SvLinkManager* GetLinkManager();
- const SvLinkManager* GetLinkManager() const;
- void SetLinkManager( SvLinkManager* _pMgr );
+ LinkManager* GetLinkManager();
+ const LinkManager* GetLinkManager() const;
+ void SetLinkManager( LinkManager* _pMgr );
BOOL Update();
void Disconnect();
diff --git a/svx/inc/opengrf.hxx b/sfx2/inc/sfx2/opengrf.hxx
index e32ce7d1b243..0972859b6680 100644
--- a/svx/inc/opengrf.hxx
+++ b/sfx2/inc/sfx2/opengrf.hxx
@@ -27,17 +27,16 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-#ifndef _SVX_OPENGRF_HXX
-#define _SVX_OPENGRF_HXX
+#ifndef _SFX2_OPENGRF_HXX
+#define _SFX2_OPENGRF_HXX
#include <memory> // auto_ptr
#include <svtools/filter.hxx>
-#include "svx/svxdllapi.h"
-
+#include <sfx2/dllapi.h>
struct SvxOpenGrf_Impl;
-class SVX_DLLPUBLIC SvxOpenGraphicDialog
+class SFX2_DLLPUBLIC SvxOpenGraphicDialog
{
public:
SvxOpenGraphicDialog ( const String& rTitle );
@@ -64,8 +63,8 @@ public:
void SetDialogHelpId( const INT32 _nHelpId );
private:
// disable copy and assignment
- SVX_DLLPRIVATE SvxOpenGraphicDialog (const SvxOpenGraphicDialog&);
- SVX_DLLPRIVATE SvxOpenGraphicDialog& operator = ( const SvxOpenGraphicDialog & );
+ SFX2_DLLPRIVATE SvxOpenGraphicDialog (const SvxOpenGraphicDialog&);
+ SFX2_DLLPRIVATE SvxOpenGraphicDialog& operator = ( const SvxOpenGraphicDialog & );
const std::auto_ptr< SvxOpenGrf_Impl > mpImpl;
};
diff --git a/sfx2/inc/sfx2/sfxdlg.hxx b/sfx2/inc/sfx2/sfxdlg.hxx
index 47ee31c66575..9aae89cc3964 100644
--- a/sfx2/inc/sfx2/sfxdlg.hxx
+++ b/sfx2/inc/sfx2/sfxdlg.hxx
@@ -61,7 +61,7 @@ struct TransferableObjectDescriptor;
namespace sfx2
{
- class SvLinkManager;
+ class LinkManager;
}
namespace com { namespace sun { namespace star { namespace frame {
@@ -141,7 +141,7 @@ public:
virtual VclAbstractDialog* CreateEditObjectDialog( Window* pParent, USHORT nSlotId,
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject >& xObj )=0;
virtual SfxAbstractPasteDialog* CreatePasteDialog( Window* pParent )=0;
- virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::SvLinkManager* pMgr, BOOL bHTML=FALSE, sfx2::SvBaseLink* p=0 )=0;
+ virtual SfxAbstractLinksDialog* CreateLinksDialog( Window* pParent, sfx2::LinkManager* pMgr, BOOL bHTML=FALSE, sfx2::SvBaseLink* p=0 )=0;
virtual VclAbstractDialog * CreateSvxScriptOrgDialog( Window* pParent, const String& rLanguage ) = 0;
virtual AbstractScriptSelectorDialog*
diff --git a/sfx2/prj/d.lst b/sfx2/prj/d.lst
index fe71b1715769..0748aa19cd65 100644
--- a/sfx2/prj/d.lst
+++ b/sfx2/prj/d.lst
@@ -22,112 +22,25 @@ mkdir: %_DEST%\inc%_EXT%\sfx2
..\%COMMON_OUTDIR%\srs\sfxslots_srs.hid %COMMON_DEST%\res%_EXT%\sfxslots_srs.hid
..\util\sfx.xml %_DEST%\xml%_EXT%\sfx.xml
..\%__SRC%\misc\sfx2.csv %_DEST%\inc%_EXT%\sfx2.csv
-..\inc\sfx2\dllapi.h %_DEST%\inc%_EXT%\sfx2\dllapi.h
+
+..\inc\sfx2\*.h %_DEST%\inc%_EXT%\sfx2\*.h
+..\inc\sfx2\*.hxx %_DEST%\inc%_EXT%\sfx2\*.hxx
+..\inc\sfx2\*.hrc %_DEST%\inc%_EXT%\sfx2\*.hrc
..\sdi\sfx.sdi %_DEST%\inc%_EXT%\sfx2\sfx.sdi
..\sdi\sfxitems.sdi %_DEST%\inc%_EXT%\sfx2\sfxitems.sdi
-..\inc\sfx2\app.hxx %_DEST%\inc%_EXT%\sfx2\app.hxx
-..\inc\sfx2\basedlgs.hxx %_DEST%\inc%_EXT%\sfx2\basedlgs.hxx
-..\inc\sfx2\bindings.hxx %_DEST%\inc%_EXT%\sfx2\bindings.hxx
..\inc\brokenpackageint.hxx %_DEST%\inc%_EXT%\sfx2\brokenpackageint.hxx
-..\inc\sfx2\chalign.hxx %_DEST%\inc%_EXT%\sfx2\chalign.hxx
-..\inc\sfx2\childwin.hxx %_DEST%\inc%_EXT%\sfx2\childwin.hxx
-..\inc\sfx2\ctrlitem.hxx %_DEST%\inc%_EXT%\sfx2\ctrlitem.hxx
-..\inc\sfx2\dispatch.hxx %_DEST%\inc%_EXT%\sfx2\dispatch.hxx
-..\inc\sfx2\dinfdlg.hxx %_DEST%\inc%_EXT%\sfx2\dinfdlg.hxx
..\inc\dinfedt.hxx %_DEST%\inc%_EXT%\sfx2\dinfedt.hxx
-..\inc\sfx2\docinf.hxx %_DEST%\inc%_EXT%\sfx2\docinf.hxx
-..\inc\sfx2\docfac.hxx %_DEST%\inc%_EXT%\sfx2\docfac.hxx
-..\inc\sfx2\docfile.hxx %_DEST%\inc%_EXT%\sfx2\docfile.hxx
-..\inc\sfx2\docfilt.hxx %_DEST%\inc%_EXT%\sfx2\docfilt.hxx
-..\inc\sfx2\dockwin.hxx %_DEST%\inc%_EXT%\sfx2\dockwin.hxx
-..\inc\sfx2\doctempl.hxx %_DEST%\inc%_EXT%\sfx2\doctempl.hxx
-..\inc\sfx2\doctdlg.hxx %_DEST%\inc%_EXT%\sfx2\doctdlg.hxx
-..\inc\sfx2\event.hxx %_DEST%\inc%_EXT%\sfx2\event.hxx
-..\inc\sfx2\evntconf.hxx %_DEST%\inc%_EXT%\sfx2\evntconf.hxx
-..\inc\sfx2\filedlghelper.hxx %_DEST%\inc%_EXT%\sfx2\filedlghelper.hxx
-..\inc\sfx2\fcontnr.hxx %_DEST%\inc%_EXT%\sfx2\fcontnr.hxx
-..\inc\sfx2\frame.hxx %_DEST%\inc%_EXT%\sfx2\frame.hxx
-..\inc\sfx2\frmdescr.hxx %_DEST%\inc%_EXT%\sfx2\frmdescr.hxx
-..\inc\sfx2\frmhtml.hxx %_DEST%\inc%_EXT%\sfx2\frmhtml.hxx
-..\inc\sfx2\frmhtmlw.hxx %_DEST%\inc%_EXT%\sfx2\frmhtmlw.hxx
-..\inc\sfx2\genlink.hxx %_DEST%\inc%_EXT%\sfx2\genlink.hxx
-..\inc\sfx2\hintpost.hxx %_DEST%\inc%_EXT%\sfx2\hintpost.hxx
..\inc\imgmgr.hxx %_DEST%\inc%_EXT%\sfx2\imgmgr.hxx
-..\inc\sfx2\imgdef.hxx %_DEST%\inc%_EXT%\sfx2\imgdef.hxx
-..\inc\sfx2\ipclient.hxx %_DEST%\inc%_EXT%\sfx2\ipclient.hxx
-..\inc\sfx2\macrconf.hxx %_DEST%\inc%_EXT%\sfx2\macrconf.hxx
-..\inc\sfx2\topfrm.hxx %_DEST%\inc%_EXT%\sfx2\topfrm.hxx
-..\inc\sfx2\mgetempl.hxx %_DEST%\inc%_EXT%\sfx2\mgetempl.hxx
..\inc\mieclip.hxx %_DEST%\inc%_EXT%\sfx2\mieclip.hxx
-..\inc\sfx2\minarray.hxx %_DEST%\inc%_EXT%\sfx2\minarray.hxx
..\inc\minfitem.hxx %_DEST%\inc%_EXT%\sfx2\minfitem.hxx
-..\inc\sfx2\minstack.hxx %_DEST%\inc%_EXT%\sfx2\minstack.hxx
-..\inc\sfx2\mnuitem.hxx %_DEST%\inc%_EXT%\sfx2\mnuitem.hxx
-..\inc\sfx2\module.hxx %_DEST%\inc%_EXT%\sfx2\module.hxx
-..\inc\sfx2\msg.hxx %_DEST%\inc%_EXT%\sfx2\msg.hxx
-..\inc\sfx2\mnumgr.hxx %_DEST%\inc%_EXT%\sfx2\mnumgr.hxx
-..\inc\sfx2\newstyle.hxx %_DEST%\inc%_EXT%\sfx2\newstyle.hxx
-..\inc\sfx2\new.hxx %_DEST%\inc%_EXT%\sfx2\new.hxx
-..\inc\sfx2\navigat.hxx %_DEST%\inc%_EXT%\sfx2\navigat.hxx
-..\inc\sfx2\msgpool.hxx %_DEST%\inc%_EXT%\sfx2\msgpool.hxx
-..\inc\sfx2\passwd.hxx %_DEST%\inc%_EXT%\sfx2\passwd.hxx
-..\inc\sfx2\prnmon.hxx %_DEST%\inc%_EXT%\sfx2\prnmon.hxx
-..\inc\sfx2\objface.hxx %_DEST%\inc%_EXT%\sfx2\objface.hxx
-..\inc\sfx2\objitem.hxx %_DEST%\inc%_EXT%\sfx2\objitem.hxx
-..\inc\sfx2\signaturestate.hxx %_DEST%\inc%_EXT%\sfx2\signaturestate.hxx
-..\inc\sfx2\docmacromode.hxx %_DEST%\inc%_EXT%\sfx2\docmacromode.hxx
-..\inc\sfx2\userinputinterception.hxx %_DEST%\inc%_EXT%\sfx2\userinputinterception.hxx
-..\inc\sfx2\docstoragemodifylistener.hxx %_DEST%\inc%_EXT%\sfx2\docstoragemodifylistener.hxx
-..\inc\sfx2\sfxmodelfactory.hxx %_DEST%\inc%_EXT%\sfx2\sfxmodelfactory.hxx
-..\inc\sfx2\objsh.hxx %_DEST%\inc%_EXT%\sfx2\objsh.hxx
-..\inc\sfx2\printer.hxx %_DEST%\inc%_EXT%\sfx2\printer.hxx
-..\inc\sfx2\printopt.hxx %_DEST%\inc%_EXT%\sfx2\printopt.hxx
-..\inc\sfx2\progress.hxx %_DEST%\inc%_EXT%\sfx2\progress.hxx
-..\inc\sfx2\request.hxx %_DEST%\inc%_EXT%\sfx2\request.hxx
-..\inc\sfx2\sfx.hrc %_DEST%\inc%_EXT%\sfx2\sfx.hrc
-..\inc\sfx2\sfxdefs.hxx %_DEST%\inc%_EXT%\sfx2\sfxdefs.hxx
..\inc\sfxhelp.hxx %_DEST%\inc%_EXT%\sfx2\sfxhelp.hxx
-..\inc\sfx2\sfxhtml.hxx %_DEST%\inc%_EXT%\sfx2\sfxhtml.hxx
-..\inc\sfx2\sfxsids.hrc %_DEST%\inc%_EXT%\sfx2\sfxsids.hrc
-..\inc\sfx2\shell.hxx %_DEST%\inc%_EXT%\sfx2\shell.hxx
..\inc\stbitem.hxx %_DEST%\inc%_EXT%\sfx2\stbitem.hxx
-..\inc\sfx2\styfitem.hxx %_DEST%\inc%_EXT%\sfx2\styfitem.hxx
-..\inc\sfx2\styledlg.hxx %_DEST%\inc%_EXT%\sfx2\styledlg.hxx
-..\inc\sfx2\tabdlg.hxx %_DEST%\inc%_EXT%\sfx2\tabdlg.hxx
-..\inc\sfx2\tbxctrl.hxx %_DEST%\inc%_EXT%\sfx2\tbxctrl.hxx
-..\inc\sfx2\templdlg.hxx %_DEST%\inc%_EXT%\sfx2\templdlg.hxx
..\inc\tplpitem.hxx %_DEST%\inc%_EXT%\sfx2\tplpitem.hxx
-..\inc\sfx2\viewfrm.hxx %_DEST%\inc%_EXT%\sfx2\viewfrm.hxx
-..\inc\sfx2\viewsh.hxx %_DEST%\inc%_EXT%\sfx2\viewsh.hxx
..\inc\viewfac.hxx %_DEST%\inc%_EXT%\sfx2\viewfac.hxx
-..\inc\sfx2\appuno.hxx %_DEST%\inc%_EXT%\sfx2\appuno.hxx
-..\inc\sfx2\sfxuno.hxx %_DEST%\inc%_EXT%\sfx2\sfxuno.hxx
-..\inc\sfx2\sfxbasemodel.hxx %_DEST%\inc%_EXT%\sfx2\sfxbasemodel.hxx
-..\inc\sfx2\sfxbasecontroller.hxx %_DEST%\inc%_EXT%\sfx2\sfxbasecontroller.hxx
-..\inc\sfx2\unoctitm.hxx %_DEST%\inc%_EXT%\sfx2\unoctitm.hxx
-..\inc\sfx2\srchitem.hxx %_DEST%\inc%_EXT%\sfx2\srchitem.hxx
-..\inc\sfx2\srchdefs.hxx %_DEST%\inc%_EXT%\sfx2\srchdefs.hxx
-..\inc\sfx2\cntids.hrc %_DEST%\inc%_EXT%\sfx2\cntids.hrc
..\inc\basmgr.hxx %_DEST%\inc%_EXT%\sfx2\basmgr.hxx
..\inc\imagemgr.hxx %_DEST%\inc%_EXT%\sfx2\imagemgr.hxx
-..\inc\sfx2\sfxdlg.hxx %_DEST%\inc%_EXT%\sfx2\sfxdlg.hxx
-..\inc\sfx2\dialogs.hrc %_DEST%\inc%_EXT%\sfx2\dialogs.hrc
-..\inc\sfx2\itemwrapper.hxx %_DEST%\inc%_EXT%\sfx2\itemwrapper.hxx
-..\inc\sfx2\controlwrapper.hxx %_DEST%\inc%_EXT%\sfx2\controlwrapper.hxx
-..\inc\sfx2\itemconnect.hxx %_DEST%\inc%_EXT%\sfx2\itemconnect.hxx
-..\inc\sfx2\lnkbase.hxx %_DEST%\inc%_EXT%\sfx2\lnkbase.hxx
-..\inc\sfx2\linkmgr.hxx %_DEST%\inc%_EXT%\sfx2\linkmgr.hxx
-..\inc\sfx2\linksrc.hxx %_DEST%\inc%_EXT%\sfx2\linksrc.hxx
-..\inc\sfx2\querystatus.hxx %_DEST%\inc%_EXT%\sfx2\querystatus.hxx
-..\inc\sfx2\sfxstatuslistener.hxx %_DEST%\inc%_EXT%\sfx2\sfxstatuslistener.hxx
..\inc\QuerySaveDocument.hxx %_DEST%\inc%_EXT%\sfx2\QuerySaveDocument.hxx
..\inc\mailmodelapi.hxx %_DEST%\inc%_EXT%\sfx2\mailmodelapi.hxx
..\inc\docinsert.hxx %_DEST%\inc%_EXT%\sfx2\docinsert.hxx
-..\inc\sfx2\layout.hxx %_DEST%\inc%_EXT%\sfx2\layout.hxx
-..\inc\sfx2\layout-tabdlg.hxx %_DEST%\inc%_EXT%\sfx2\layout-tabdlg.hxx
-..\inc\sfx2\layout-post.hxx %_DEST%\inc%_EXT%\sfx2\layout-post.hxx
-..\inc\sfx2\layout-pre.hxx %_DEST%\inc%_EXT%\sfx2\layout-pre.hxx
-..\inc\sfx2\XmlIdRegistry.hxx %_DEST%\inc%_EXT%\sfx2\XmlIdRegistry.hxx
-..\inc\sfx2\DocumentMetadataAccess.hxx %_DEST%\inc%_EXT%\sfx2\DocumentMetadataAccess.hxx
-..\inc\sfx2\Metadatable.hxx %_DEST%\inc%_EXT%\sfx2\Metadatable.hxx
+
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index c08f46effc81..70dca1cf1d6b 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -258,6 +258,18 @@
#define STR_DDE_ERROR (RID_SFX_APP_START + 193)
#define RID_SECURITY_WARNING_NO_HYPERLINKS (RID_SFX_APP_START + 194)
+#define RID_SVXSTR_FILELINK (RID_SFX_APP_START + 195)
+#define RID_SVXSTR_GRAFIKLINK (RID_SFX_APP_START + 196)
+#define RID_SVXSTR_EDITGRFLINK (RID_SFX_APP_START + 197)
+
+// strings for error messsages of OpenGraphics dialog
+#define RID_SVXSTR_GRFILTER_OPENERROR (RID_SFX_APP_START + 198)
+#define RID_SVXSTR_GRFILTER_IOERROR (RID_SFX_APP_START + 199)
+#define RID_SVXSTR_GRFILTER_FORMATERROR (RID_SFX_APP_START + 200)
+#define RID_SVXSTR_GRFILTER_VERSIONERROR (RID_SFX_APP_START + 201)
+#define RID_SVXSTR_GRFILTER_FILTERERROR (RID_SFX_APP_START + 202)
+#define RID_SVXSTR_GRFILTER_TOOBIG (RID_SFX_APP_START + 203)
+
#define MD_DDE_LINKEDIT (RID_SFX_APP_START + 1)
#endif // #ifndef _SFX_APP_HRC
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index 463788d2d6d0..0530b5aeb9db 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -1061,3 +1061,42 @@ Image IMG_MISSING_4
{
ImageBitmap = Bitmap { File = "sn064.bmp" ; };
};
+
+String RID_SVXSTR_FILELINK
+{
+ Text [ en-US ] = "Document" ;
+};
+String RID_SVXSTR_GRAFIKLINK
+{
+ Text [ en-US ] = "Graphic" ;
+};
+String RID_SVXSTR_EDITGRFLINK
+{
+ Text [ en-US ] = "Link graphics" ;
+};
+
+String RID_SVXSTR_GRFILTER_OPENERROR
+{
+ Text [ en-US ] = "Graphics file cannot be opened" ;
+};
+String RID_SVXSTR_GRFILTER_IOERROR
+{
+ Text [ en-US ] = "Graphics file cannot be read" ;
+};
+String RID_SVXSTR_GRFILTER_FORMATERROR
+{
+ Text [ en-US ] = "Unknown graphics format" ;
+};
+String RID_SVXSTR_GRFILTER_VERSIONERROR
+{
+ Text [ en-US ] = "This version of the graphics file is not supported" ;
+};
+String RID_SVXSTR_GRFILTER_FILTERERROR
+{
+ Text [ en-US ] = "Graphics filter not found" ;
+};
+String RID_SVXSTR_GRFILTER_TOOBIG
+{
+ Text [ en-US ] = "Not enough memory to insert graphic" ;
+};
+
diff --git a/svx/source/svxlink/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index a1b24e5440e5..a414ccc8b07c 100644
--- a/svx/source/svxlink/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -29,7 +29,8 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
+#include "precompiled_sfx2.hxx"
+
#include <vcl/wrkwin.hxx>
#include <vcl/msgbox.hxx>
#include <tools/urlobj.hxx>
@@ -39,9 +40,6 @@
#include <sfx2/lnkbase.hxx>
#include <sfx2/app.hxx>
#include <sfx2/progress.hxx>
-#ifndef _SFX_INTERNO_HXX
-//#include <sfx2/interno.hxx>
-#endif
#include <sfx2/docfilt.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sot/exchange.hxx>
@@ -51,13 +49,11 @@
#include <com/sun/star/document/XTypeDetection.hpp>
#include <comphelper/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx>
-
+#include <sfx2/linkmgr.hxx>
+#include <sfx2/opengrf.hxx>
+#include "sfxresid.hxx"
#include "fileobj.hxx"
-#include "linkmgr.hxx"
-#include <svx/dialmgr.hxx>
-#include <svx/dialogs.hrc>
-#include "xoutbmp.hxx"
-#include "opengrf.hxx"
+#include "app.hrc"
namespace css = ::com::sun::star;
@@ -328,8 +324,7 @@ BOOL SvFileObject::LoadFile_Impl()
// Grafik ist fertig, also DataChanged von der Statusaederung schicken:
SendStateChg_Impl( xMed->GetInStream() && xMed->GetInStream()->GetError()
- ? STATE_LOAD_ERROR : STATE_LOAD_OK );
-
+ ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
return TRUE;
}
@@ -471,7 +466,7 @@ void SvFileObject::Edit( Window* pParent, sfx2::SvBaseLink* pLink, const Link& r
{
nType = FILETYPE_GRF; // falls noch nicht gesetzt
- SvxOpenGraphicDialog aDlg(ResId(RID_SVXSTR_EDITGRFLINK, DIALOG_MGR()));
+ SvxOpenGraphicDialog aDlg(SfxResId(RID_SVXSTR_EDITGRFLINK));
aDlg.EnableLink(sal_False);
aDlg.SetPath( sFile, sal_True );
aDlg.SetCurrentFilter( sTmpFilter );
@@ -538,7 +533,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void*, EMPTYARG )
// Grafik ist fertig, also DataChanged von der Status-
// aederung schicken:
pThis->bDataReady = TRUE;
- pThis->SendStateChg_Impl( STATE_LOAD_OK );
+ pThis->SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_OK );
// und dann nochmal die Daten senden
pThis->NotifyDataChanged();
@@ -617,8 +612,7 @@ IMPL_STATIC_LINK( SvFileObject, LoadGrfNewData_Impl, void*, EMPTYARG )
{
// Grafik ist fertig, also DataChanged von der Status-
// aederung schicken:
- pThis->SendStateChg_Impl( pStrm->GetError() ? STATE_LOAD_ERROR
- : STATE_LOAD_OK );
+ pThis->SendStateChg_Impl( pStrm->GetError() ? sfx2::LinkManager::STATE_LOAD_ERROR : sfx2::LinkManager::STATE_LOAD_OK );
}
pThis->bInNewData = FALSE;
@@ -700,7 +694,7 @@ void SvFileObject::CancelTransfers()
// nicht noch mal aufsetzen
bLoadAgain = FALSE;
bDataReady = bLoadError = bWaitForData = TRUE;
- SendStateChg_Impl( STATE_LOAD_ABORT );
+ SendStateChg_Impl( sfx2::LinkManager::STATE_LOAD_ABORT );
}
}
@@ -710,14 +704,14 @@ void SvFileObject::SetTransferPriority( USHORT )
}
-void SvFileObject::SendStateChg_Impl( LinkState nState )
+void SvFileObject::SendStateChg_Impl( sfx2::LinkManager::LinkState nState )
{
if( !bStateChangeCalled && HasDataLinks() )
{
css::uno::Any aAny;
aAny <<= rtl::OUString::valueOf( (sal_Int32)nState );
DataChanged( SotExchange::GetFormatName(
- SvxLinkManager::RegisterStatusInfoId()), aAny );
+ sfx2::LinkManager::RegisterStatusInfoId()), aAny );
bStateChangeCalled = TRUE;
}
}
diff --git a/svx/source/svxlink/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 78dbe84dfdc3..a769ed9e2843 100644
--- a/svx/source/svxlink/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -33,7 +33,7 @@
#include <tools/string.hxx>
#include <sfx2/linksrc.hxx>
#include <sfx2/docfile.hxx>
-#include "linkmgr.hxx"
+#include <sfx2/linkmgr.hxx>
class Graphic;
struct Impl_DownLoadData;
@@ -65,7 +65,7 @@ class SvFileObject : public sfx2::SvLinkSource
BOOL GetGraphic_Impl( Graphic&, SvStream* pStream = 0 );
BOOL LoadFile_Impl();
- void SendStateChg_Impl( LinkState nState );
+ void SendStateChg_Impl( sfx2::LinkManager::LinkState nState );
DECL_STATIC_LINK( SvFileObject, DelMedium_Impl, SfxMediumRef* );
DECL_STATIC_LINK( SvFileObject, LoadGrfReady_Impl, void* );
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 3533fb8a428f..bb1f1da13abd 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -31,37 +31,54 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sfx2.hxx"
-
-#include <tools/debug.hxx>
#include <sfx2/linkmgr.hxx>
-
+#include <com/sun/star/document/UpdateDocMode.hpp>
+#include <sfx2/objsh.hxx>
+#include <svl/urihelper.hxx>
+#include <sot/formats.hxx>
+#include <tools/urlobj.hxx>
+#include <sot/exchange.hxx>
+#include <tools/debug.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/lnkbase.hxx>
-//#include <sfx2/linksrc.hxx>
+#include <sfx2/app.hxx>
+#include <vcl/graph.hxx>
+#include <svl/stritem.hxx>
+#include <svl/eitem.hxx>
+#include <svl/intitem.hxx>
+#include <unotools/localfilehelper.hxx>
+#include <i18npool/mslangid.hxx>
+#include <sfx2/request.hxx>
+
+#include "fileobj.hxx"
#include "impldde.hxx"
-//#include "svuidlg.hrc"
-//#include "iface.hxx"
-
#include "app.hrc"
#include "sfxresid.hxx"
#define _SVSTDARR_STRINGSDTOR
-
#include <svl/svstdarr.hxx>
-
namespace sfx2
{
+class SvxInternalLink : public sfx2::SvLinkSource
+{
+public:
+ SvxInternalLink() {}
+
+ virtual BOOL Connect( sfx2::SvBaseLink* );
+};
+
+
SV_IMPL_PTRARR( SvBaseLinks, SvBaseLinkRefPtr )
-SvLinkManager::SvLinkManager()
- : pPersist( 0 )
+LinkManager::LinkManager(SfxObjectShell* p)
+ : pPersist( p )
{
}
-SvLinkManager::~SvLinkManager()
+LinkManager::~LinkManager()
{
SvBaseLinkRef** ppRef = (SvBaseLinkRef**)aLinkTbl.GetData();
for( USHORT n = aLinkTbl.Count(); n; --n, ++ppRef )
@@ -77,12 +94,12 @@ SvLinkManager::~SvLinkManager()
/************************************************************************
-|* SvLinkManager::Remove()
+|* LinkManager::Remove()
|*
|* Beschreibung
*************************************************************************/
-void SvLinkManager::Remove( SvBaseLink *pLink )
+void LinkManager::Remove( SvBaseLink *pLink )
{
// keine Links doppelt einfuegen
int bFound = FALSE;
@@ -110,7 +127,7 @@ void SvLinkManager::Remove( SvBaseLink *pLink )
}
-void SvLinkManager::Remove( USHORT nPos, USHORT nCnt )
+void LinkManager::Remove( USHORT nPos, USHORT nCnt )
{
if( nCnt && nPos < aLinkTbl.Count() )
{
@@ -132,7 +149,7 @@ void SvLinkManager::Remove( USHORT nPos, USHORT nCnt )
}
-BOOL SvLinkManager::Insert( SvBaseLink* pLink )
+BOOL LinkManager::Insert( SvBaseLink* pLink )
{
// keine Links doppelt einfuegen
for( USHORT n = 0; n < aLinkTbl.Count(); ++n )
@@ -152,7 +169,7 @@ BOOL SvLinkManager::Insert( SvBaseLink* pLink )
}
-BOOL SvLinkManager::InsertLink( SvBaseLink * pLink,
+BOOL LinkManager::InsertLink( SvBaseLink * pLink,
USHORT nObjType,
USHORT nUpdateMode,
const String* pName )
@@ -166,7 +183,7 @@ BOOL SvLinkManager::InsertLink( SvBaseLink * pLink,
}
-BOOL SvLinkManager::InsertDDELink( SvBaseLink * pLink,
+BOOL LinkManager::InsertDDELink( SvBaseLink * pLink,
const String& rServer,
const String& rTopic,
const String& rItem )
@@ -183,7 +200,7 @@ BOOL SvLinkManager::InsertDDELink( SvBaseLink * pLink,
}
-BOOL SvLinkManager::InsertDDELink( SvBaseLink * pLink )
+BOOL LinkManager::InsertDDELink( SvBaseLink * pLink )
{
DBG_ASSERT( OBJECT_CLIENT_SO & pLink->GetObjType(), "no OBJECT_CLIENT_SO" );
if( !( OBJECT_CLIENT_SO & pLink->GetObjType() ) )
@@ -197,34 +214,70 @@ BOOL SvLinkManager::InsertDDELink( SvBaseLink * pLink )
// erfrage die Strings fuer den Dialog
-BOOL SvLinkManager::GetDisplayNames( const SvBaseLink * pLink,
+BOOL LinkManager::GetDisplayNames( const SvBaseLink * pLink,
String* pType,
String* pFile,
String* pLinkStr,
- String* /*pFilter*/ ) const
+ String* pFilter ) const
{
BOOL bRet = FALSE;
- String aLN = pLink->GetLinkSourceName();
- if( aLN.Len() != 0 && pLink->GetObjType() == OBJECT_CLIENT_DDE )
+ const String sLNm( pLink->GetLinkSourceName() );
+ if( sLNm.Len() )
{
- USHORT nTmp = 0;
- String sCmd( aLN );
- String sServer( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
- String sTopic( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
-
- if( pType )
- *pType = sServer;
- if( pFile )
- *pFile = sTopic;
- if( pLinkStr )
- *pLinkStr = sCmd.Copy( nTmp );
- bRet = TRUE;
+ switch( pLink->GetObjType() )
+ {
+ case OBJECT_CLIENT_FILE:
+ case OBJECT_CLIENT_GRF:
+ case OBJECT_CLIENT_OLE:
+ {
+ USHORT nPos = 0;
+ String sFile( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
+ String sRange( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
+
+ if( pFile )
+ *pFile = sFile;
+ if( pLink )
+ *pLinkStr = sRange;
+ if( pFilter )
+ *pFilter = sLNm.Copy( nPos );
+
+ if( pType )
+ {
+ sal_uInt16 nObjType = pLink->GetObjType();
+ *pType = String( SfxResId(
+ ( OBJECT_CLIENT_FILE == nObjType || OBJECT_CLIENT_OLE == nObjType )
+ ? RID_SVXSTR_FILELINK
+ : RID_SVXSTR_GRAFIKLINK ));
+ }
+ bRet = TRUE;
+ }
+ break;
+ case OBJECT_CLIENT_DDE:
+ {
+ USHORT nTmp = 0;
+ String sCmd( sLNm );
+ String sServer( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
+ String sTopic( sCmd.GetToken( 0, cTokenSeperator, nTmp ) );
+
+ if( pType )
+ *pType = sServer;
+ if( pFile )
+ *pFile = sTopic;
+ if( pLinkStr )
+ *pLinkStr = sCmd.Copy( nTmp );
+ bRet = TRUE;
+ }
+ break;
+ default:
+ break;
+ }
}
+
return bRet;
}
-void SvLinkManager::UpdateAllLinks(
+void LinkManager::UpdateAllLinks(
BOOL bAskUpdate,
BOOL /*bCallErrHdl*/,
BOOL bUpdateGrfLinks,
@@ -287,14 +340,24 @@ void SvLinkManager::UpdateAllLinks(
|* Beschreibung
*************************************************************************/
-SvLinkSourceRef SvLinkManager::CreateObj( SvBaseLink * pLink )
+SvLinkSourceRef LinkManager::CreateObj( SvBaseLink * pLink )
{
- if( OBJECT_CLIENT_DDE == pLink->GetObjType() )
- return new SvDDEObject();
- return SvLinkSourceRef();
+ switch( pLink->GetObjType() )
+ {
+ case OBJECT_CLIENT_FILE:
+ case OBJECT_CLIENT_GRF:
+ case OBJECT_CLIENT_OLE:
+ return new SvFileObject;
+ case OBJECT_INTERN:
+ return new SvxInternalLink;
+ case OBJECT_CLIENT_DDE:
+ return new SvDDEObject;
+ default:
+ return SvLinkSourceRef();
+ }
}
-BOOL SvLinkManager::InsertServer( SvLinkSource* pObj )
+BOOL LinkManager::InsertServer( SvLinkSource* pObj )
{
// keine doppelt einfuegen
if( !pObj || USHRT_MAX != aServerTbl.GetPos( pObj ) )
@@ -305,7 +368,7 @@ BOOL SvLinkManager::InsertServer( SvLinkSource* pObj )
}
-void SvLinkManager::RemoveServer( SvLinkSource* pObj )
+void LinkManager::RemoveServer( SvLinkSource* pObj )
{
USHORT nPos = aServerTbl.GetPos( pObj );
if( USHRT_MAX != nPos )
@@ -327,6 +390,259 @@ void MakeLnkName( String& rName, const String* pType, const String& rFile,
((rName += cTokenSeperator ) += *pFilter).EraseLeadingChars().EraseTrailingChars();
}
+BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
+ USHORT nFileType,
+ const String& rFileNm,
+ const String* pFilterNm,
+ const String* pRange )
+{
+ if( !( OBJECT_CLIENT_SO & rLink.GetObjType() ))
+ return FALSE;
+
+ String sCmd( rFileNm );
+ sCmd += ::sfx2::cTokenSeperator;
+ if( pRange )
+ sCmd += *pRange;
+ if( pFilterNm )
+ ( sCmd += ::sfx2::cTokenSeperator ) += *pFilterNm;
+
+ return InsertLink( &rLink, nFileType, sfx2::LINKUPDATE_ONCALL, &sCmd );
+}
+
+BOOL LinkManager::InsertFileLink( sfx2::SvBaseLink& rLink )
+{
+ if( OBJECT_CLIENT_FILE == ( OBJECT_CLIENT_FILE & rLink.GetObjType() ))
+ return InsertLink( &rLink, rLink.GetObjType(), sfx2::LINKUPDATE_ONCALL );
+ return FALSE;
+}
+
+// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
+// (ist zur Zeit nur fuer die FileLinks interressant!)
+void LinkManager::CancelTransfers()
+{
+ SvFileObject* pFileObj;
+ sfx2::SvBaseLink* pLnk;
+
+ const sfx2::SvBaseLinks& rLnks = GetLinks();
+ for( USHORT n = rLnks.Count(); n; )
+ if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
+ OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
+ 0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
+// 0 != ( pFileObj = (SvFileObject*)SvFileObject::ClassFactory()->
+// CastAndAddRef( pLnk->GetObj() )) )
+ pFileObj->CancelTransfers();
+}
+
+void LinkManager::SetTransferPriority( sfx2::SvBaseLink& /*rLink*/, USHORT /*nPrio*/ )
+{
+// SvFileObject* pFileObj =
+// (SvFileObject*)SvFileObject::ClassFactory()->
+// CastAndAddRef( rLink.GetObj() );
+// OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & rLink.GetObjType()) ?
+// (SvFileObject*)rLink.GetObj() : 0;
+}
+
+
+ // um Status Informationen aus dem FileObject an den BaseLink zu
+ // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
+ // dann die entsprechenden Informationen als String.
+ // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
+ // - das braucht Informationen ueber Load/Abort/Error
+ULONG LinkManager::RegisterStatusInfoId()
+{
+ static ULONG nFormat = 0;
+
+ if( !nFormat )
+ {
+// wie sieht die neue Schnittstelle aus?
+// nFormat = Exchange::RegisterFormatName( "StatusInfo vom SvxInternalLink" );
+ nFormat = SotExchange::RegisterFormatName(
+ String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(
+ "StatusInfo vom SvxInternalLink" )));
+ }
+ return nFormat;
+}
+
+// ----------------------------------------------------------------------
+
+BOOL LinkManager::GetGraphicFromAny( const String& rMimeType,
+ const ::com::sun::star::uno::Any & rValue,
+ Graphic& rGrf )
+{
+ BOOL bRet = FALSE;
+ ::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
+ if( rValue.hasValue() && ( rValue >>= aSeq ) )
+ {
+ SvMemoryStream aMemStm( (void*)aSeq.getConstArray(), aSeq.getLength(),
+ STREAM_READ );
+ aMemStm.Seek( 0 );
+
+ switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
+ {
+ case SOT_FORMATSTR_ID_SVXB:
+ {
+ aMemStm >> rGrf;
+ bRet = TRUE;
+ }
+ break;
+ case FORMAT_GDIMETAFILE:
+ {
+ GDIMetaFile aMtf;
+ aMtf.Read( aMemStm );
+ rGrf = aMtf;
+ bRet = TRUE;
+ }
+ break;
+ case FORMAT_BITMAP:
+ {
+ Bitmap aBmp;
+ aMemStm >> aBmp;
+ rGrf = aBmp;
+ bRet = TRUE;
+ }
+ break;
+ }
+ }
+ return bRet;
+}
+
+
+// ----------------------------------------------------------------------
+String lcl_DDE_RelToAbs( const String& rTopic, const String& rBaseURL )
+{
+ String sRet;
+ INetURLObject aURL( rTopic );
+ if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
+ utl::LocalFileHelper::ConvertSystemPathToURL( rTopic, rBaseURL, sRet );
+ if( !sRet.Len() )
+ sRet = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), rTopic, URIHelper::GetMaybeFileHdl(), true );
+ return sRet;
+}
+
+BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
+{
+ SfxObjectShell* pFndShell = 0;
+ USHORT nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
+ String sTopic, sItem, sReferer;
+ if( pLink->GetLinkManager() &&
+ pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sTopic, &sItem )
+ && sTopic.Len() )
+ {
+ // erstmal nur ueber die DocumentShells laufen und die mit dem
+ // Namen heraussuchen:
+
+ com::sun::star::lang::Locale aLocale;
+ MsLangId::convertLanguageToLocale( LANGUAGE_SYSTEM, aLocale );
+ CharClass aCC( aLocale );
+
+ String sNm( sTopic ), sTmp;
+ aCC.toLower( sNm );
+
+ TypeId aType( TYPE(SfxObjectShell) );
+
+ BOOL bFirst = TRUE;
+ SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
+ if( pShell && pShell->GetMedium() )
+ {
+ sReferer = pShell->GetMedium()->GetBaseURL();
+ SFX_ITEMSET_ARG( pShell->GetMedium()->GetItemSet(), pItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False );
+ if ( pItem )
+ nUpdateMode = pItem->GetValue();
+ }
+
+ String sNmURL( lcl_DDE_RelToAbs( sTopic, sReferer ) );
+ aCC.toLower( sNmURL );
+
+ if ( !pShell )
+ {
+ bFirst = FALSE;
+ pShell = SfxObjectShell::GetFirst( &aType, sal_False );
+ }
+
+ while( pShell )
+ {
+ if( !sTmp.Len() )
+ {
+ sTmp = pShell->GetTitle( SFX_TITLE_FULLNAME );
+ sTmp = lcl_DDE_RelToAbs(sTmp, sReferer );
+ }
+
+
+ aCC.toLower( sTmp );
+ if( sTmp == sNmURL ) // die wollen wir haben
+ {
+ pFndShell = pShell;
+ break;
+ }
+
+ if( bFirst )
+ {
+ bFirst = FALSE;
+ pShell = SfxObjectShell::GetFirst( &aType, sal_False );
+ }
+ else
+ pShell = SfxObjectShell::GetNext( *pShell, &aType, sal_False );
+
+ sTmp.Erase();
+ }
+ }
+
+ // empty topics are not allowed - which document is it
+ if( !sTopic.Len() )
+ return FALSE;
+
+ if( !pFndShell )
+ {
+ // dann versuche die Datei zu laden:
+ INetURLObject aURL( sTopic );
+ INetProtocol eOld = aURL.GetProtocol();
+ aURL.SetURL( sTopic = lcl_DDE_RelToAbs( sTopic, sReferer ) );
+ if( INET_PROT_NOT_VALID != eOld ||
+ INET_PROT_HTTP != aURL.GetProtocol() )
+ {
+ SfxStringItem aName( SID_FILE_NAME, sTopic );
+ SfxBoolItem aMinimized(SID_MINIMIZED, TRUE);
+ SfxBoolItem aHidden(SID_HIDDEN, TRUE);
+ SfxStringItem aTarget( SID_TARGETNAME, String::CreateFromAscii("_blank") );
+ SfxStringItem aReferer( SID_REFERER, sReferer );
+ SfxUInt16Item aUpdate( SID_UPDATEDOCMODE, nUpdateMode );
+ SfxBoolItem aReadOnly(SID_DOC_READONLY, TRUE);
+
+ // #i14200# (DDE-link crashes wordprocessor)
+ SfxAllItemSet aArgs( SFX_APP()->GetPool() );
+ aArgs.Put(aReferer);
+ aArgs.Put(aTarget);
+ aArgs.Put(aHidden);
+ aArgs.Put(aMinimized);
+ aArgs.Put(aName);
+ aArgs.Put(aUpdate);
+ aArgs.Put(aReadOnly);
+ pFndShell = SfxObjectShell::CreateAndLoadObject( aArgs );
+ }
+ }
+
+ BOOL bRet = FALSE;
+ if( pFndShell )
+ {
+ sfx2::SvLinkSource* pNewSrc = pFndShell->DdeCreateLinkSource( sItem );
+ if( pNewSrc )
+ {
+ bRet = TRUE;
+
+ ::com::sun::star::datatransfer::DataFlavor aFl;
+ SotExchange::GetFormatDataFlavor( pLink->GetContentType(), aFl );
+
+ pLink->SetObj( pNewSrc );
+ pNewSrc->AddDataAdvise( pLink, aFl.MimeType,
+ sfx2::LINKUPDATE_ONCALL == pLink->GetUpdateMode()
+ ? ADVISEMODE_ONLYONCE
+ : 0 );
+ }
+ }
+ return bRet;
+}
+
+
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 8a852b44b6f7..516e7eccf400 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -37,19 +37,12 @@
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <vcl/msgbox.hxx>
-
#include <sfx2/linkmgr.hxx>
-//#include "svuidlg.hrc"
-//#include "iface.hxx"
#include <vcl/svapp.hxx>
-//#include <soerr.hxx>
-
#include "app.hrc"
#include "sfxresid.hxx"
#include <sfx2/filedlghelper.hxx>
-
#include <tools/debug.hxx>
-
#include <svl/svdde.hxx>
using namespace ::com::sun::star::uno;
@@ -66,7 +59,7 @@ class ImplDdeItem;
struct BaseLink_Impl
{
Link m_aEndEditLink;
- SvLinkManager* m_pLinkMgr;
+ LinkManager* m_pLinkMgr;
Window* m_pParentWin;
FileDialogHelper* m_pFileDlg;
bool m_bIsConnect;
@@ -472,17 +465,17 @@ BOOL SvBaseLink::SetContentType( ULONG nType )
return FALSE;
}
-SvLinkManager* SvBaseLink::GetLinkManager()
+LinkManager* SvBaseLink::GetLinkManager()
{
return pImpl->m_pLinkMgr;
}
-const SvLinkManager* SvBaseLink::GetLinkManager() const
+const LinkManager* SvBaseLink::GetLinkManager() const
{
return pImpl->m_pLinkMgr;
}
-void SvBaseLink::SetLinkManager( SvLinkManager* _pMgr )
+void SvBaseLink::SetLinkManager( LinkManager* _pMgr )
{
pImpl->m_pLinkMgr = _pMgr;
}
diff --git a/sfx2/source/appl/makefile.mk b/sfx2/source/appl/makefile.mk
index 48d1258e2838..1673a4953a97 100644
--- a/sfx2/source/appl/makefile.mk
+++ b/sfx2/source/appl/makefile.mk
@@ -93,6 +93,7 @@ SFX_OBJECTS = \
$(SLO)$/appuno.obj \
$(SLO)$/appbaslib.obj \
$(SLO)$/childwin.obj \
+ $(SLO)$/fileobj.obj \
$(SLO)$/helpdispatch.obj \
$(SLO)$/helpinterceptor.obj \
$(SLO)$/imagemgr.obj\
@@ -103,6 +104,7 @@ SFX_OBJECTS = \
$(SLO)$/lnkbase2.obj \
$(SLO)$/module.obj \
$(SLO)$/newhelp.obj \
+ $(SLO)$/opengrf.obj \
$(SLO)$/sfxdll.obj \
$(SLO)$/sfxhelp.obj \
$(SLO)$/sfxpicklist.obj \
@@ -143,8 +145,10 @@ EXCEPTIONSFILES=\
$(SLO)$/appmisc.obj \
$(SLO)$/appinit.obj \
$(SLO)$/appcfg.obj \
+ $(SLO)$/fileobj.obj \
$(SLO)$/helpinterceptor.obj \
$(SLO)$/newhelp.obj \
+ $(SLO)$/opengrf.obj \
$(SLO)$/sfxhelp.obj \
$(SLO)$/shutdownicon.obj \
$(SLO)$/shutdowniconw32.obj \
diff --git a/svx/source/dialog/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 432ca7cb46ea..e10fa3899d39 100644
--- a/svx/source/dialog/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -29,7 +29,8 @@
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
+#include "precompiled_sfx2.hxx"
+
#include <tools/urlobj.hxx>
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/uno/Reference.h>
@@ -47,24 +48,16 @@
#include <com/sun/star/ui/dialogs/XFilePreview.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <svl/urihelper.hxx>
-#ifndef _UNOTOOLS_UCBSTREAMHELPER_HXX
#include <unotools/ucbstreamhelper.hxx>
-#endif
#include <svtools/transfer.hxx>
-#include <svx/svdograf.hxx>
#include <sot/formats.hxx>
-#ifndef _MSGBOX_HXX //autogen
#include <vcl/msgbox.hxx>
-#endif
#include <sfx2/filedlghelper.hxx>
#include <sfx2/docfile.hxx>
#include <unotools/pathoptions.hxx>
-#include <svx/dialmgr.hxx>
-#include "opengrf.hxx"
-
-#include <svx/dialogs.hrc>
-//#include "impgrf.hrc"
-
+#include <sfx2/opengrf.hxx>
+#include "app.hrc"
+#include "sfxresid.hxx"
//-----------------------------------------------------------------------------
@@ -178,7 +171,7 @@ short SvxOpenGraphicDialog::Execute()
// could not load?
if ( nFound == USHRT_MAX )
{
- WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, SVX_RESSTR( SvxOpenGrfErr2ResId(nImpRet) ) );
+ WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, String( SfxResId( SvxOpenGrfErr2ResId(nImpRet) ) ) );
bQuitLoop = aWarningBox.Execute()==RET_RETRY ? FALSE : TRUE;
}
else
diff --git a/svx/inc/linkmgr.hxx b/svx/inc/linkmgr.hxx
deleted file mode 100644
index b65c91ce7ebd..000000000000
--- a/svx/inc/linkmgr.hxx
+++ /dev/null
@@ -1,101 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: linkmgr.hxx,v $
- * $Revision: 1.7 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _SVXLINKMGR_HXX
-#define _SVXLINKMGR_HXX
-
-
-#include <sfx2/linkmgr.hxx>
-#include "svx/svxdllapi.h"
-
-class Graphic;
-class Size;
-
-// Damit der Link ueber den Status der zu ladenen Grafik informierten werden
-// verschickt das FileObject ein SvData, mit der FormatId
-// "RegisterStatusInfoId" und ein einem String als Datentraeger. Dieser
-// enthaelt den folgenden enum.
-enum LinkState
-{
- STATE_LOAD_OK,
- STATE_LOAD_ERROR,
- STATE_LOAD_ABORT
-};
-
-class SVX_DLLPUBLIC SvxLinkManager : public ::sfx2::SvLinkManager
-{
- SvxLinkManager( const SvxLinkManager& );
- SvxLinkManager& operator=( const SvxLinkManager& );
-
-public:
- SvxLinkManager( SfxObjectShell * pCacheCont );
-
- // den Link mit einem PseudoObject verbinden und in die Liste eintragen
- BOOL InsertFileLink( sfx2::SvBaseLink&,
- USHORT nFileType,
- const String& rTxt,
- const String* pFilterNm = 0,
- const String* pRange = 0 );
-
- // falls am Link schon alles eingestellt ist !
- BOOL InsertFileLink( sfx2::SvBaseLink& );
-
- // erfrage die Strings fuer den Dialog
- virtual BOOL GetDisplayNames( const sfx2::SvBaseLink*,
- String* pType,
- String* pFile = 0,
- String* pLink = 0,
- String* pFilter = 0 ) const;
-
- virtual sfx2::SvLinkSourceRef CreateObj( sfx2::SvBaseLink * );
-
- // eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
- // (ist zur Zeit nur fuer die FileLinks interressant!)
- void CancelTransfers();
-
- static void SetTransferPriority( sfx2::SvBaseLink& rLink, USHORT nPrio );
-
- // um Status Informationen aus dem FileObject an den BaseLink zu
- // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
- // dann die entsprechenden Informationen als String.
- // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
- // - das braucht Informationen ueber Load/Abort/Error
- static ULONG RegisterStatusInfoId();
-
- // if the mimetype says graphic/bitmap/gdimetafile then get the
- // graphic from the Any. Return says no errors
- static BOOL GetGraphicFromAny( const String& rMimeType,
- const ::com::sun::star::uno::Any & rValue,
- Graphic& rGrf );
-
-};
-
-
-#endif
-
diff --git a/svx/inc/optextbr.hrc b/svx/inc/optextbr.hrc
deleted file mode 100644
index 9524ab69fbb1..000000000000
--- a/svx/inc/optextbr.hrc
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: optextbr.hrc,v $
- * $Revision: 1.4 $
- *
- * 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.
- *
- ************************************************************************/
-#ifndef _SVX_OPTEXTBR_HRC
-#define _SVX_OPTEXTBR_HRC
-
-// defines ---------------------------------------------------------------
-
-#define CB_EXTBRW_ON 10
-#define FT_EXTBRW_EXCEPTION 11
-#define ED_EXTBRW_EXCEPTION 12
-#define LB_EXTBRW_EXCEPTION 13
-#define PB_EXTBRW_ADD 14
-#define PB_EXTBRW_DELETE 15
-#define PB_EXTBRW_IEOPTIONS 16
-#define CB_EXTBRW_NOHINT 17
-#define ED_EXTBRW_FILE 18
-#define PB_EXTBRW_FILE 19
-#define CB_EXTBRW_FILE 20
-
-#define STR_EXTBRW_FILE 30
-
-#define IMG_EXTBRW_WARNING 10
-#define FT_EXTBRW_WARNING 11
-#define CB_EXTBRW_DISABLE 12
-#define GB_EXTBRW_WARNING 13
-#define BTN_EXTBRW_YES 14
-#define BTN_EXTBRW_NO 15
-
-#endif // #ifndef _SVX_OPTEXTBR_HRC
-
-// ******************************************************************* EOF
-
diff --git a/svx/inc/svx/dialogs.hrc b/svx/inc/svx/dialogs.hrc
index faaecd816758..7f8556931fec 100644
--- a/svx/inc/svx/dialogs.hrc
+++ b/svx/inc/svx/dialogs.hrc
@@ -460,13 +460,6 @@
#define RID_SVXSTR_RULER_TAB_DECIMAL (RID_SVX_START + 247)
#define RID_SVXSTR_RULER_TAB_CENTER (RID_SVX_START + 248)
-// File-/Grafik-Link String, Dialog Name
-#define RID_SVXSTR_FILELINK (RID_SVX_START + 255)
-#define RID_SVXSTR_GRAFIKLINK (RID_SVX_START + 256)
-#define RID_SVXSTR_EDITGRFLINK (RID_SVX_START + 257)
-#define RID_SVXSTR_GRFLINKPROGRESS (RID_SVX_START + 258)
-#define RID_SVXGRF_GRAPHICLOAD (RID_SVX_START + 259)
-
// Schlie"ssen (im TabDialog Line/Area)
#define RID_SVXSTR_CLOSE (RID_SVX_START + 260)
@@ -734,14 +727,6 @@
#define RID_SVXSTR_HATCH_START RID_SVXSTR_HATCH0
#define RID_SVXSTR_HATCH_END RID_SVXSTR_HATCH10
-// strings for error messsages of OpenGraphics dialog
-#define RID_SVXSTR_GRFILTER_OPENERROR (RID_SVX_START + 683)
-#define RID_SVXSTR_GRFILTER_IOERROR (RID_SVX_START + 684)
-#define RID_SVXSTR_GRFILTER_FORMATERROR (RID_SVX_START + 685)
-#define RID_SVXSTR_GRFILTER_VERSIONERROR (RID_SVX_START + 686)
-#define RID_SVXSTR_GRFILTER_FILTERERROR (RID_SVX_START + 687)
-#define RID_SVXSTR_GRFILTER_TOOBIG (RID_SVX_START + 688)
-
// Default-Bitmap-Names
#define RID_SVXSTR_BMP0_DEF (RID_SVX_START + 691)
#define RID_SVXSTR_BMP1_DEF (RID_SVX_START + 692)
diff --git a/svx/inc/svx/svdmodel.hxx b/svx/inc/svx/svdmodel.hxx
index a9abeac76fc2..cc8c8c7db211 100644
--- a/svx/inc/svx/svdmodel.hxx
+++ b/svx/inc/svx/svdmodel.hxx
@@ -37,9 +37,7 @@
#include <tools/link.hxx>
#include <tools/contnr.hxx>
#include <tools/weakbase.hxx>
-#ifndef _MAPMOD_HXX //autogen
#include <vcl/mapmod.hxx>
-#endif
#include <svl/brdcst.hxx>
#include <tools/string.hxx>
#include <tools/datetime.hxx>
@@ -86,7 +84,6 @@ class SfxRepeatTarget;
class SfxStyleSheet;
class SfxUndoAction;
class SfxUndoManager;
-class SvxLinkManager;
class XBitmapList;
class XBitmapTable;
class XColorTable;
@@ -107,6 +104,9 @@ class SdrUndoFactory;
namespace comphelper{
class IEmbeddedHelper;
}
+namespace sfx2{
+ class LinkManager;
+}
////////////////////////////////////////////////////////////////////////////////////////////////////
#define SDR_SWAPGRAPHICSMODE_NONE 0x00000000
@@ -215,7 +215,7 @@ protected:
ULONG nProgressOfs; // -Handler
rtl::Reference< SfxStyleSheetBasePool > mxStyleSheetPool;
SfxStyleSheet* pDefaultStyleSheet;
- SvxLinkManager* pLinkManager; // LinkManager
+ sfx2::LinkManager* pLinkManager; // LinkManager
Container* pUndoStack;
Container* pRedoStack;
SdrUndoGroup* pAktUndoGroup; // Fuer mehrstufige
@@ -403,8 +403,8 @@ public:
SfxStyleSheet* GetDefaultStyleSheet() const { return pDefaultStyleSheet; }
void SetDefaultStyleSheet(SfxStyleSheet* pDefSS) { pDefaultStyleSheet = pDefSS; }
- SvxLinkManager* GetLinkManager() { return pLinkManager; }
- void SetLinkManager(SvxLinkManager* pLinkMgr) { pLinkManager = pLinkMgr; }
+ sfx2::LinkManager* GetLinkManager() { return pLinkManager; }
+ void SetLinkManager( sfx2::LinkManager* pLinkMgr ) { pLinkManager = pLinkMgr; }
::comphelper::IEmbeddedHelper* GetPersist() const { return m_pEmbeddedHelper; }
void ClearPersist() { m_pEmbeddedHelper = 0; }
diff --git a/svx/prj/build.lst b/svx/prj/build.lst
index 5e7b2b8f93d2..cdd466abbe17 100644
--- a/svx/prj/build.lst
+++ b/svx/prj/build.lst
@@ -22,11 +22,9 @@ sx svx\source\smarttags nmake - all sx_smarttags sx_inc NULL
sx svx\source\stbctrls nmake - all sx_stbc sx_inc NULL
sx svx\source\mnuctrls nmake - all sx_mnuc sx_inc NULL
sx svx\source\engine3d nmake - all sx_3deng sx_inc NULL
-sx svx\source\svxlink nmake - all sx_link sx_inc NULL
sx svx\source\form nmake - all sx_form sx_sdi sx_inc NULL
sx svx\source\fmcomp nmake - all sx_fmcmp sx_sdi sx_inc NULL
sx svx\source\tbxctrls nmake - all sx_tbxc sx_inc NULL
-sx svx\source\options nmake - all sx_opt sx_inc NULL
sx svx\source\dialog nmake - all sx_dlg sx_inc NULL
sx svx\source\unodraw nmake - all sx_undrw sx_inc NULL
sx svx\source\unogallery nmake - all sx_ungal sx_inc NULL
@@ -35,5 +33,5 @@ sx svx\source\xml nmake - all sx_xml sx_inc NULL
sx svx\source\accessibility nmake - all sx_accessibility sx_inc NULL
sx svx\source\customshapes nmake - all sx_customshapes sx_inc NULL
sx svx\source\toolbars nmake - all sx_toolbars sx_inc NULL
-sx svx\util nmake - all sx_util sx_3deng sx_dlg sx_draw sx_attribute sx_properties sx_contact sx_event sx_animation sx_primitive2d sx_primitive3d sx_overlay sx_fmcmp sx_form sx_gall sx_items sx_link sx_mnuc sx_opt sx_sdi sx_stbc sx_tbxc sx_undrw sx_ungal sx_xml sx_xout sx_accessibility sx_intro sx_customshapes sx_toolbars sx_table sx_smarttags NULL
+sx svx\util nmake - all sx_util sx_3deng sx_dlg sx_draw sx_attribute sx_properties sx_contact sx_event sx_animation sx_primitive2d sx_primitive3d sx_overlay sx_fmcmp sx_form sx_gall sx_items sx_mnuc sx_sdi sx_stbc sx_tbxc sx_undrw sx_ungal sx_xml sx_xout sx_accessibility sx_intro sx_customshapes sx_toolbars sx_table sx_smarttags NULL
sx svx\source\gengal nmake - all sx_gengal sx_util NULL
diff --git a/svx/source/dialog/hyprdlg.hxx b/svx/source/dialog/hyprdlg.hxx
index 9400b674f510..1462a0623e03 100644
--- a/svx/source/dialog/hyprdlg.hxx
+++ b/svx/source/dialog/hyprdlg.hxx
@@ -35,7 +35,7 @@
#include <vcl/menu.hxx>
#include <svtools/stdctrl.hxx>
#include <sfx2/ctrlitem.hxx>
-#include "srchcfg.hxx"
+#include <svl/srchcfg.hxx>
#include <sfx2/tbxctrl.hxx>
class SvxHyperlinkDlg;
diff --git a/svx/source/dialog/makefile.mk b/svx/source/dialog/makefile.mk
index d80c1cb1d040..47844a022637 100644
--- a/svx/source/dialog/makefile.mk
+++ b/svx/source/dialog/makefile.mk
@@ -68,7 +68,8 @@ SRC1FILES = \
svxbmpnumvalueset.src \
swframeposstrings.src \
txenctab.src \
- ucsubset.src
+ ucsubset.src \
+ optgrid.src
SRS2NAME=drawdlgs
SRC2FILES = \
@@ -81,7 +82,6 @@ LIB1OBJFILES= \
$(SLO)$/dlgutil.obj \
$(SLO)$/framelink.obj\
$(SLO)$/langbox.obj \
- $(SLO)$/opengrf.obj \
$(SLO)$/simptabl.obj \
$(SLO)$/svxdlg.obj \
$(SLO)$/stddlg.obj \
@@ -136,7 +136,9 @@ LIB2OBJFILES= \
$(SLO)$/txenctab.obj \
$(SLO)$/wrapfield.obj \
$(SLO)$/_bmpmask.obj \
- $(SLO)$/_contdlg.obj
+ $(SLO)$/_contdlg.obj \
+ $(SLO)$/optgrid.obj
+
.IF "$(GUI)"=="UNX"
LIB2OBJFILES += $(SLO)$/sendreportunx.obj
diff --git a/svx/source/options/optgrid.cxx b/svx/source/dialog/optgrid.cxx
index d202d226fd9a..d202d226fd9a 100644
--- a/svx/source/options/optgrid.cxx
+++ b/svx/source/dialog/optgrid.cxx
diff --git a/svx/source/options/optgrid.hrc b/svx/source/dialog/optgrid.hrc
index e891c8f1d39d..e891c8f1d39d 100644
--- a/svx/source/options/optgrid.hrc
+++ b/svx/source/dialog/optgrid.hrc
diff --git a/svx/source/options/optgrid.src b/svx/source/dialog/optgrid.src
index b956c6704140..b956c6704140 100644
--- a/svx/source/options/optgrid.src
+++ b/svx/source/dialog/optgrid.src
diff --git a/svx/source/dialog/sdstring.src b/svx/source/dialog/sdstring.src
index 4668e0c42fa0..eeafc74c87a7 100644
--- a/svx/source/dialog/sdstring.src
+++ b/svx/source/dialog/sdstring.src
@@ -367,32 +367,6 @@ String RID_SVXSTR_LINEJOINT_ROUND
Text [ en-US ] = "Line joint round";
};
-String RID_SVXSTR_GRFILTER_OPENERROR
-{
- Text [ en-US ] = "Graphics file cannot be opened" ;
-};
-String RID_SVXSTR_GRFILTER_IOERROR
-{
- Text [ en-US ] = "Graphics file cannot be read" ;
-};
-String RID_SVXSTR_GRFILTER_FORMATERROR
-{
- Text [ en-US ] = "Unknown graphics format" ;
-};
-String RID_SVXSTR_GRFILTER_VERSIONERROR
-{
- Text [ en-US ] = "This version of the graphics file is not supported" ;
-};
-String RID_SVXSTR_GRFILTER_FILTERERROR
-{
- Text [ en-US ] = "Graphics filter not found" ;
-};
-String RID_SVXSTR_GRFILTER_TOOBIG
-{
- Text [ en-US ] = "Not enough memory to insert graphic" ;
-};
-
-
///////////////////////////////////////////////////////////////////////////////
//
// Reference-strings for standardcolor-table
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index 81a6db032c85..f357f858c244 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -73,7 +73,7 @@
#include <com/sun/star/text/XNumberingTypeInfo.hpp>
#include <algorithm>
-#include "opengrf.hxx"
+#include <sfx2/opengrf.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
diff --git a/svx/source/dialog/txencbox.cxx b/svx/source/dialog/txencbox.cxx
index 8d69378838a1..c40dfcb9e926 100644
--- a/svx/source/dialog/txencbox.cxx
+++ b/svx/source/dialog/txencbox.cxx
@@ -181,7 +181,7 @@ void SvxTextEncodingBox::FillFromDbTextEncodingMap(
void SvxTextEncodingBox::FillWithMimeAndSelectBest()
{
FillFromTextEncodingTable( sal_False, 0xffffffff, RTL_TEXTENCODING_INFO_MIME );
- rtl_TextEncoding nEnc = GetBestMimeEncoding();
+ rtl_TextEncoding nEnc = SvtSysLocale::GetBestMimeEncoding();
SelectTextEncoding( nEnc );
}
diff --git a/svx/source/options/makefile.mk b/svx/source/options/makefile.mk
deleted file mode 100644
index 0b64dcf0329a..000000000000
--- a/svx/source/options/makefile.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.31 $
-#
-# 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=..$/..
-
-PROJECTPCH4DLL=TRUE
-PROJECTPCH=svxpch
-PROJECTPCHSOURCE=$(PRJ)$/util\svxpch
-
-PRJNAME=svx
-TARGET=options
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SRS1NAME=$(TARGET)
-SRC1FILES=\
- optgrid.src
-
-SLOFILES= \
- $(SLO)$/optgrid.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 016ac49d5632..8b4d91cd3049 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -73,7 +73,7 @@
#include "svdoutlinercache.hxx"
-#include "asiancfg.hxx"
+#include <svl/asiancfg.hxx>
#include "editeng/fontitem.hxx"
#include <editeng/colritem.hxx>
#include <editeng/fhgtitem.hxx>
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 2a4103791363..4d7b51a073e5 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -47,7 +47,7 @@
#include <svtools/grfmgr.hxx>
#include <vcl/svapp.hxx>
-#include "linkmgr.hxx"
+#include <sfx2/linkmgr.hxx>
#include <svx/svdetc.hxx>
#include "svdglob.hxx"
#include "svdstr.hrc"
@@ -124,14 +124,14 @@ void SdrGraphicLink::DataChanged( const String& rMimeType,
const ::com::sun::star::uno::Any & rValue )
{
SdrModel* pModel = pGrafObj ? pGrafObj->GetModel() : 0;
- SvxLinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
+ sfx2::LinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
if( pLinkManager && rValue.hasValue() )
{
pLinkManager->GetDisplayNames( this, 0, &pGrafObj->aFileName, 0, &pGrafObj->aFilterName );
Graphic aGraphic;
- if( SvxLinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic ))
+ if( sfx2::LinkManager::GetGraphicFromAny( rMimeType, rValue, aGraphic ))
{
GraphicType eOldGraphicType = pGrafObj->GetGraphicType(); // kein Hereinswappen
const sal_Bool bIsChanged = pModel->IsChanged();
@@ -142,8 +142,7 @@ void SdrGraphicLink::DataChanged( const String& rMimeType,
else
pModel->SetChanged( bIsChanged );
}
- else if( SotExchange::GetFormatIdFromMimeType( rMimeType ) !=
- SvxLinkManager::RegisterStatusInfoId() )
+ else if( SotExchange::GetFormatIdFromMimeType( rMimeType ) != sfx2::LinkManager::RegisterStatusInfoId() )
{
// only repaint, no objectchange
pGrafObj->ActionChanged();
@@ -476,7 +475,7 @@ void SdrGrafObj::ForceSwapOut() const
void SdrGrafObj::ImpLinkAnmeldung()
{
- SvxLinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
if( pLinkManager != NULL && pGraphicLink == NULL )
{
@@ -493,7 +492,7 @@ void SdrGrafObj::ImpLinkAnmeldung()
void SdrGrafObj::ImpLinkAbmeldung()
{
- SvxLinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel != NULL ? pModel->GetLinkManager() : NULL;
if( pLinkManager != NULL && pGraphicLink!=NULL)
{
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index ea29c860e8ab..976d9349ee7c 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -30,7 +30,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
-#include <linkmgr.hxx>
+#include <sfx2/linkmgr.hxx>
#include <ucbhelper/content.hxx>
#include <ucbhelper/contentbroker.hxx>
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 843a6fee9ab5..2b16b7749d31 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -69,7 +69,7 @@
#include <sot/clsids.hxx>
#include <sot/formats.hxx>
-#include <linkmgr.hxx>
+#include <sfx2/linkmgr.hxx>
#include <svtools/transfer.hxx>
#include <cppuhelper/implbase5.hxx>
@@ -937,7 +937,7 @@ sal_Bool SdrOle2Obj::UpdateLinkURL_Impl()
if ( mpImpl->mpObjectLink )
{
- SvxLinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
if ( pLinkManager )
{
String aNewLinkURL;
@@ -1028,7 +1028,7 @@ void SdrOle2Obj::BreakFileLink_Impl()
void SdrOle2Obj::DisconnectFileLink_Impl()
{
- SvxLinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager = pModel ? pModel->GetLinkManager() : NULL;
if ( pLinkManager && mpImpl->mpObjectLink )
{
pLinkManager->Remove( mpImpl->mpObjectLink );
@@ -1051,7 +1051,7 @@ void SdrOle2Obj::CheckFileLink_Impl()
if ( aLinkURL.Len() )
{
// this is a file link so the model link manager should handle it
- SvxLinkManager* pLinkManager = pModel->GetLinkManager();
+ sfx2::LinkManager* pLinkManager = pModel->GetLinkManager();
if ( pLinkManager )
{
mpImpl->mpObjectLink = new SdrEmbedObjectLink( this );
diff --git a/svx/source/svdraw/svdotxln.cxx b/svx/source/svdraw/svdotxln.cxx
index 9d28a0fdfa09..d7f60f5277fe 100644
--- a/svx/source/svdraw/svdotxln.cxx
+++ b/svx/source/svdraw/svdotxln.cxx
@@ -33,24 +33,16 @@
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/localfilehelper.hxx>
-
#include <ucbhelper/content.hxx>
#include <ucbhelper/contentbroker.hxx>
#include <unotools/datetime.hxx>
-
#include <svx/svdotext.hxx>
#include "svditext.hxx"
#include <svx/svdmodel.hxx>
#include <editeng/editdata.hxx>
-
-#ifndef SVX_LIGHT
-#ifndef _LNKBASE_HXX //autogen
#include <sfx2/lnkbase.hxx>
-#endif
-#endif
-#include <linkmgr.hxx>
+#include <sfx2/linkmgr.hxx>
#include <tools/urlobj.hxx>
-
#include <svl/urihelper.hxx>
// #90477#
@@ -114,7 +106,7 @@ void ImpSdrObjTextLink::DataChanged( const String& /*rMimeType*/,
{
FASTBOOL bForceReload=FALSE;
SdrModel* pModel = pSdrObj ? pSdrObj->GetModel() : 0;
- SvxLinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
+ sfx2::LinkManager* pLinkManager= pModel ? pModel->GetLinkManager() : 0;
if( pLinkManager )
{
ImpSdrObjTextLinkUserData* pData=pSdrObj->GetLinkUserData();
@@ -331,9 +323,8 @@ ImpSdrObjTextLinkUserData* SdrTextObj::GetLinkUserData() const
void SdrTextObj::ImpLinkAnmeldung()
{
-#ifndef SVX_LIGHT
ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
- SvxLinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
if (pLinkManager!=NULL && pData!=NULL && pData->pLink==NULL) { // Nicht 2x Anmelden
pData->pLink=new ImpSdrObjTextLink(this);
#ifdef GCC
@@ -347,19 +338,16 @@ void SdrTextObj::ImpLinkAnmeldung()
#endif
pData->pLink->Connect();
}
-#endif // SVX_LIGHT
}
void SdrTextObj::ImpLinkAbmeldung()
{
-#ifndef SVX_LIGHT
ImpSdrObjTextLinkUserData* pData=GetLinkUserData();
- SvxLinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
+ sfx2::LinkManager* pLinkManager=pModel!=NULL ? pModel->GetLinkManager() : NULL;
if (pLinkManager!=NULL && pData!=NULL && pData->pLink!=NULL) { // Nicht 2x Abmelden
// Bei Remove wird *pLink implizit deleted
pLinkManager->Remove( pData->pLink );
pData->pLink=NULL;
}
-#endif // SVX_LIGHT
}
diff --git a/svx/source/svxlink/linkmgr.cxx b/svx/source/svxlink/linkmgr.cxx
deleted file mode 100644
index 7b1d7dca42d8..000000000000
--- a/svx/source/svxlink/linkmgr.cxx
+++ /dev/null
@@ -1,390 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: linkmgr.cxx,v $
- * $Revision: 1.34 $
- *
- * 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.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_svx.hxx"
-#include <com/sun/star/document/UpdateDocMode.hpp>
-#include <com/sun/star/uno/Sequence.h>
-#include <sot/formats.hxx>
-#include <sot/exchange.hxx>
-#include <vcl/graph.hxx>
-#include <sfx2/lnkbase.hxx>
-#include <tools/urlobj.hxx>
-#include <svl/stritem.hxx>
-#include <svl/eitem.hxx>
-#include <svl/intitem.hxx>
-#include <svl/rectitem.hxx>
-#include <sfx2/app.hxx>
-#include <sfx2/request.hxx>
-#include <sfx2/objsh.hxx>
-#ifndef _SFX_INTERNO_HXX //autogen
-//#include <sfx2/interno.hxx>
-#endif
-#include <sfx2/dispatch.hxx>
-#include <unotools/charclass.hxx>
-#include <unotools/localfilehelper.hxx>
-#include <svl/itemset.hxx>
-#include <svl/urihelper.hxx>
-#include <com/sun/star/datatransfer/DataFlavor.hpp>
-
-#include "linkmgr.hxx"
-#include "fileobj.hxx"
-#include <svx/dialmgr.hxx>
-#include <svx/dialogs.hrc>
-#include "editeng/unolingu.hxx"
-
-class SvxInternalLink : public sfx2::SvLinkSource
-{
-public:
- SvxInternalLink() {}
-
- virtual BOOL Connect( sfx2::SvBaseLink* );
-};
-
-SvxLinkManager::SvxLinkManager( SfxObjectShell* _pPersist )
-{
- SvLinkManager::SetPersist( _pPersist );
-}
-
-sfx2::SvLinkSourceRef SvxLinkManager::CreateObj( sfx2::SvBaseLink * pLink )
-{
- switch( pLink->GetObjType() )
- {
- case OBJECT_CLIENT_FILE:
- case OBJECT_CLIENT_GRF:
- case OBJECT_CLIENT_OLE:
- return new SvFileObject;
-
- case OBJECT_INTERN:
- return new SvxInternalLink();
- }
- return SvLinkManager::CreateObj( pLink );
-}
-
-
-BOOL SvxLinkManager::InsertFileLink( sfx2::SvBaseLink& rLink,
- USHORT nFileType,
- const String& rFileNm,
- const String* pFilterNm,
- const String* pRange )
-{
- if( !( OBJECT_CLIENT_SO & rLink.GetObjType() ))
- return FALSE;
-
- String sCmd( rFileNm );
- sCmd += ::sfx2::cTokenSeperator;
- if( pRange )
- sCmd += *pRange;
- if( pFilterNm )
- ( sCmd += ::sfx2::cTokenSeperator ) += *pFilterNm;
-
- return SvLinkManager::InsertLink( &rLink, nFileType,
- sfx2::LINKUPDATE_ONCALL, &sCmd );
-}
-
-BOOL SvxLinkManager::InsertFileLink( sfx2::SvBaseLink& rLink )
-{
- if( OBJECT_CLIENT_FILE == ( OBJECT_CLIENT_FILE & rLink.GetObjType() ))
- return SvLinkManager::InsertLink( &rLink, rLink.GetObjType(),
- sfx2::LINKUPDATE_ONCALL );
- return FALSE;
-}
-
- // erfrage die Strings fuer den Dialog
-BOOL SvxLinkManager::GetDisplayNames( const sfx2::SvBaseLink* pBaseLink,
- String* pType,
- String* pFile,
- String* pLink,
- String* pFilter ) const
-{
- BOOL bRet = FALSE;
- const String sLNm( pBaseLink->GetLinkSourceName() );
- if( sLNm.Len() )
- switch( pBaseLink->GetObjType() )
- {
- case OBJECT_CLIENT_FILE:
- case OBJECT_CLIENT_GRF:
- case OBJECT_CLIENT_OLE:
- {
- USHORT nPos = 0;
- String sFile( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
- String sRange( sLNm.GetToken( 0, ::sfx2::cTokenSeperator, nPos ) );
-
- if( pFile )
- *pFile = sFile;
- if( pLink )
- *pLink = sRange;
- if( pFilter )
- *pFilter = sLNm.Copy( nPos );
-
- if( pType )
- {
- sal_uInt16 nObjType = pBaseLink->GetObjType();
- *pType = String( ResId(
- ( OBJECT_CLIENT_FILE == nObjType || OBJECT_CLIENT_OLE == nObjType )
- ? RID_SVXSTR_FILELINK
- : RID_SVXSTR_GRAFIKLINK
- , DIALOG_MGR() ));
- }
- bRet = TRUE;
- }
- break;
- default:
- bRet = SvLinkManager::GetDisplayNames( pBaseLink, pType, pFile,
- pLink, pFilter );
- break;
- }
- return bRet;
-}
-
-// eine Uebertragung wird abgebrochen, also alle DownloadMedien canceln
-// (ist zur Zeit nur fuer die FileLinks interressant!)
-void SvxLinkManager::CancelTransfers()
-{
- SvFileObject* pFileObj;
- sfx2::SvBaseLink* pLnk;
-
- const sfx2::SvBaseLinks& rLnks = GetLinks();
- for( USHORT n = rLnks.Count(); n; )
- if( 0 != ( pLnk = &(*rLnks[ --n ])) &&
- OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & pLnk->GetObjType()) &&
- 0 != ( pFileObj = (SvFileObject*)pLnk->GetObj() ) )
-// 0 != ( pFileObj = (SvFileObject*)SvFileObject::ClassFactory()->
-// CastAndAddRef( pLnk->GetObj() )) )
- pFileObj->CancelTransfers();
-}
-
-void SvxLinkManager::SetTransferPriority( sfx2::SvBaseLink& /*rLink*/, USHORT /*nPrio*/ )
-{
-// SvFileObject* pFileObj =
-// (SvFileObject*)SvFileObject::ClassFactory()->
-// CastAndAddRef( rLink.GetObj() );
-// OBJECT_CLIENT_FILE == (OBJECT_CLIENT_FILE & rLink.GetObjType()) ?
-// (SvFileObject*)rLink.GetObj() : 0;
-}
-
-
- // um Status Informationen aus dem FileObject an den BaseLink zu
- // senden, gibt es eine eigene ClipBoardId. Das SvData-Object hat
- // dann die entsprechenden Informationen als String.
- // Wird zur Zeit fuer FileObject in Verbindung mit JavaScript benoetigt
- // - das braucht Informationen ueber Load/Abort/Error
-ULONG SvxLinkManager::RegisterStatusInfoId()
-{
- static ULONG nFormat = 0;
-
- if( !nFormat )
- {
-// wie sieht die neue Schnittstelle aus?
-// nFormat = Exchange::RegisterFormatName( "StatusInfo vom SvxInternalLink" );
- nFormat = SotExchange::RegisterFormatName(
- String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM(
- "StatusInfo vom SvxInternalLink" )));
- }
- return nFormat;
-}
-
-// ----------------------------------------------------------------------
-
-BOOL SvxLinkManager::GetGraphicFromAny( const String& rMimeType,
- const ::com::sun::star::uno::Any & rValue,
- Graphic& rGrf )
-{
- BOOL bRet = FALSE;
- ::com::sun::star::uno::Sequence< sal_Int8 > aSeq;
- if( rValue.hasValue() && ( rValue >>= aSeq ) )
- {
- SvMemoryStream aMemStm( (void*)aSeq.getConstArray(), aSeq.getLength(),
- STREAM_READ );
- aMemStm.Seek( 0 );
-
- switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
- {
- case SOT_FORMATSTR_ID_SVXB:
- {
- aMemStm >> rGrf;
- bRet = TRUE;
- }
- break;
- case FORMAT_GDIMETAFILE:
- {
- GDIMetaFile aMtf;
- aMtf.Read( aMemStm );
- rGrf = aMtf;
- bRet = TRUE;
- }
- break;
- case FORMAT_BITMAP:
- {
- Bitmap aBmp;
- aMemStm >> aBmp;
- rGrf = aBmp;
- bRet = TRUE;
- }
- break;
- }
- }
- return bRet;
-}
-
-
-// ----------------------------------------------------------------------
-String lcl_DDE_RelToAbs( const String& rTopic, const String& rBaseURL )
-{
- String sRet;
- INetURLObject aURL( rTopic );
- if( INET_PROT_NOT_VALID == aURL.GetProtocol() )
- utl::LocalFileHelper::ConvertSystemPathToURL( rTopic, rBaseURL, sRet );
- if( !sRet.Len() )
- sRet = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), rTopic, URIHelper::GetMaybeFileHdl(), true );
- return sRet;
-}
-
-BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
-{
- SfxObjectShell* pFndShell = 0;
- USHORT nUpdateMode = com::sun::star::document::UpdateDocMode::NO_UPDATE;
- String sTopic, sItem, sReferer;
- if( pLink->GetLinkManager() &&
- pLink->GetLinkManager()->GetDisplayNames( pLink, 0, &sTopic, &sItem )
- && sTopic.Len() )
- {
- // erstmal nur ueber die DocumentShells laufen und die mit dem
- // Namen heraussuchen:
-
- CharClass aCC( SvxCreateLocale( LANGUAGE_SYSTEM ));
- String sNm( sTopic ), sTmp;
- aCC.toLower( sNm );
-
- TypeId aType( TYPE(SfxObjectShell) );
-
- BOOL bFirst = TRUE;
- SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
- if( pShell && pShell->GetMedium() )
- {
- sReferer = pShell->GetMedium()->GetBaseURL();
- SFX_ITEMSET_ARG( pShell->GetMedium()->GetItemSet(), pItem, SfxUInt16Item, SID_UPDATEDOCMODE, sal_False );
- if ( pItem )
- nUpdateMode = pItem->GetValue();
- }
-
- String sNmURL( lcl_DDE_RelToAbs( sTopic, sReferer ) );
- aCC.toLower( sNmURL );
-
- if ( !pShell )
- {
- bFirst = FALSE;
- pShell = SfxObjectShell::GetFirst( &aType, sal_False );
- }
-
- while( pShell )
- {
- if( !sTmp.Len() )
- {
- sTmp = pShell->GetTitle( SFX_TITLE_FULLNAME );
- sTmp = lcl_DDE_RelToAbs(sTmp, sReferer );
- }
-
-
- aCC.toLower( sTmp );
- if( sTmp == sNmURL ) // die wollen wir haben
- {
- pFndShell = pShell;
- break;
- }
-
- if( bFirst )
- {
- bFirst = FALSE;
- pShell = SfxObjectShell::GetFirst( &aType, sal_False );
- }
- else
- pShell = SfxObjectShell::GetNext( *pShell, &aType, sal_False );
-
- sTmp.Erase();
- }
- }
-
- // empty topics are not allowed - which document is it
- if( !sTopic.Len() )
- return FALSE;
-
- if( !pFndShell )
- {
- // dann versuche die Datei zu laden:
- INetURLObject aURL( sTopic );
- INetProtocol eOld = aURL.GetProtocol();
- aURL.SetURL( sTopic = lcl_DDE_RelToAbs( sTopic, sReferer ) );
- if( INET_PROT_NOT_VALID != eOld ||
- INET_PROT_HTTP != aURL.GetProtocol() )
- {
- SfxStringItem aName( SID_FILE_NAME, sTopic );
- SfxBoolItem aMinimized(SID_MINIMIZED, TRUE);
- SfxBoolItem aHidden(SID_HIDDEN, TRUE);
- SfxStringItem aTarget( SID_TARGETNAME, String::CreateFromAscii("_blank") );
- SfxStringItem aReferer( SID_REFERER, sReferer );
- SfxUInt16Item aUpdate( SID_UPDATEDOCMODE, nUpdateMode );
- SfxBoolItem aReadOnly(SID_DOC_READONLY, TRUE);
-
- // #i14200# (DDE-link crashes wordprocessor)
- SfxAllItemSet aArgs( SFX_APP()->GetPool() );
- aArgs.Put(aReferer);
- aArgs.Put(aTarget);
- aArgs.Put(aHidden);
- aArgs.Put(aMinimized);
- aArgs.Put(aName);
- aArgs.Put(aUpdate);
- aArgs.Put(aReadOnly);
- pFndShell = SfxObjectShell::CreateAndLoadObject( aArgs );
- }
- }
-
- BOOL bRet = FALSE;
- if( pFndShell )
- {
- sfx2::SvLinkSource* pNewSrc = pFndShell->DdeCreateLinkSource( sItem );
- if( pNewSrc )
- {
- bRet = TRUE;
-
- ::com::sun::star::datatransfer::DataFlavor aFl;
- SotExchange::GetFormatDataFlavor( pLink->GetContentType(), aFl );
-
- pLink->SetObj( pNewSrc );
- pNewSrc->AddDataAdvise( pLink, aFl.MimeType,
- sfx2::LINKUPDATE_ONCALL == pLink->GetUpdateMode()
- ? ADVISEMODE_ONLYONCE
- : 0 );
- }
- }
- return bRet;
-}
-
-
diff --git a/svx/source/svxlink/linkmgr.src b/svx/source/svxlink/linkmgr.src
deleted file mode 100644
index 91de23427e1d..000000000000
--- a/svx/source/svxlink/linkmgr.src
+++ /dev/null
@@ -1,86 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: linkmgr.src,v $
- * $Revision: 1.25 $
- *
- * 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.
- *
- ************************************************************************/
-
-#include <svx/dialogs.hrc>
-String RID_SVXSTR_FILELINK
-{
- Text [ en-US ] = "Document" ;
-};
-String RID_SVXSTR_GRAFIKLINK
-{
- Text [ en-US ] = "Graphic" ;
-};
-String RID_SVXSTR_EDITGRFLINK
-{
- /* ### ACHTUNG: Neuer Text in Resource? Grafik Verknpfen : Grafik Verknpfen */
- /* ### ACHTUNG: Neuer Text in Resource? Grafik Verknpfen : Grafik Verknpfen */
- Text [ en-US ] = "Link graphics" ;
-};
-String RID_SVXSTR_GRFLINKPROGRESS
-{
- Text [ en-US ] = "Importing graphic..." ;
-};
-Bitmap RID_SVXGRF_GRAPHICLOAD
-{
- File = "grfload.bmp" ;
-};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/svx/source/svxlink/makefile.mk b/svx/source/svxlink/makefile.mk
deleted file mode 100644
index 4494b1dccec8..000000000000
--- a/svx/source/svxlink/makefile.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.5 $
-#
-# 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=..$/..
-
-PROJECTPCH=svxpch
-PROJECTPCHSOURCE=$(PRJ)$/util$/svxpch
-
-PRJNAME=svx
-TARGET=svxlink
-AUTOSEG=true
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES=\
- $(SLO)$/linkmgr.obj \
- $(SLO)$/fileobj.obj
-
-SRS1NAME=$(TARGET)
-SRC1FILES= \
- linkmgr.src
-
-.IF "$(GUI)" == "WNT"
-NOOPTFILES=\
- $(SLO)$/fileobj.obj
-.ENDIF
-
-# ==========================================================================
-
-.INCLUDE : target.mk
-
diff --git a/svx/util/makefile.mk b/svx/util/makefile.mk
index f02a5f9c0514..e22781a096d5 100644
--- a/svx/util/makefile.mk
+++ b/svx/util/makefile.mk
@@ -65,13 +65,11 @@ SHL1LIBS= \
$(SLB)$/form-core.lib \
$(SLB)$/gal.lib \
$(SLB)$/items-core.lib \
- $(SLB)$/options-core.lib \
$(SLB)$/overlay.lib \
$(SLB)$/primitive2d.lib \
$(SLB)$/primitive3d.lib \
$(SLB)$/properties.lib \
$(SLB)$/svdraw-core.lib \
- $(SLB)$/svxlink.lib \
$(SLB)$/table-core.lib \
$(SLB)$/tbxctrls-core.lib \
$(SLB)$/toolbars.lib \
@@ -122,7 +120,6 @@ SHL2LIBS= \
$(SLB)$/items.lib \
$(SLB)$/dialogs.lib \
$(SLB)$/mnuctrls.lib \
- $(SLB)$/options.lib \
$(SLB)$/stbctrls.lib \
$(SLB)$/tbxctrls.lib \
$(SLB)$/smarttags.lib \
@@ -185,13 +182,11 @@ SRSFILELIST=\
$(SRS)$/mnuctrls.srs \
$(SRS)$/stbctrls.srs \
$(SRS)$/tbxctrls.srs \
- $(SRS)$/options.srs \
$(SRS)$/svxitems.srs \
$(SRS)$/form.srs \
$(SRS)$/fmcomp.srs \
$(SRS)$/engine3d.srs \
$(SRS)$/unodraw.srs \
- $(SRS)$/svxlink.srs \
$(SRS)$/accessibility.srs \
$(SRS)$/table.srs \
$(SRS)$/toolbars.srs \