This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO42X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO42X by this push:
     new 816a6f8dfe Cleanup
816a6f8dfe is described below

commit 816a6f8dfeb6119539a51ef5f50db6e1d746cc1e
Author: mseidel <[email protected]>
AuthorDate: Tue Mar 3 15:53:36 2026 +0100

    Cleanup
    
    (cherry picked from commit 3ae1a36b3980fd37953d83365002a970e2c84a89)
---
 main/sw/source/ui/dochdl/gloshdl.cxx  |   69 +-
 main/sw/source/ui/dochdl/selglos.cxx  |   14 +-
 main/sw/source/ui/dochdl/selglos.hrc  |    7 +-
 main/sw/source/ui/dochdl/selglos.src  |    2 -
 main/sw/source/ui/dochdl/swdtflvr.cxx | 2024 ++++++++++++++++-----------------
 5 files changed, 1034 insertions(+), 1082 deletions(-)

diff --git a/main/sw/source/ui/dochdl/gloshdl.cxx 
b/main/sw/source/ui/dochdl/gloshdl.cxx
index 9dc03eb633..26de842bc6 100644
--- a/main/sw/source/ui/dochdl/gloshdl.cxx
+++ b/main/sw/source/ui/dochdl/gloshdl.cxx
@@ -51,9 +51,9 @@
 #include <gloshdl.hxx>
 #include <glosdoc.hxx>
 #include <shellio.hxx>
-#include <swundo.hxx>                  // fuer Undo-Ids
+#include <swundo.hxx>                  // for Undo-Ids
 #include <expfld.hxx>
-#include <initui.hxx>                                  // fuer 
::GetGlossaries()
+#include <initui.hxx>                                  // for ::GetGlossaries()
 #include <gloslst.hxx>
 #include <swdtflvr.hxx>
 #ifndef _DOCSH_HXX
@@ -82,7 +82,7 @@ using namespace ::com::sun::star;
 
 const short RET_EDIT = 100;
 
-// PUBLIC METHODES -------------------------------------------------------
+// PUBLIC METHODS -------------------------------------------------------
 struct TextBlockInfo_Impl
 {
        String sTitle;
@@ -94,10 +94,9 @@ SV_DECL_PTRARR_DEL( TextBlockInfoArr, TextBlockInfo_ImplPtr, 
0, 4 )
 SV_IMPL_PTRARR( TextBlockInfoArr, TextBlockInfo_ImplPtr )
 SV_IMPL_REF( SwDocShell )
 /*------------------------------------------------------------------------
-       Beschreibung:   Dialog fuer Bearbeiten Vorlagen
+ Beschreibung: Dialog für Bearbeiten Vorlagen
 ------------------------------------------------------------------------*/
 
-
 void SwGlossaryHdl::GlossaryDlg()
 {
        SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
@@ -125,12 +124,11 @@ void SwGlossaryHdl::GlossaryDlg()
 }
 
 /*------------------------------------------------------------------------
-       Beschreibung:   Setzen der aktuellen Gruppe; falls aus dem Dialog
-                                       gerufen, wird die Gruppe temp. erzeugt 
fuer einen
-                                       schnelleren Zugriff
+ Beschreibung: Setzen der aktuellen Gruppe; falls aus dem Dialog
+                          gerufen, wird die Gruppe temp. erzeugt für einen
+                          schnelleren Zugriff
 ------------------------------------------------------------------------*/
 
-
 void SwGlossaryHdl::SetCurGroup(const String &rGrp, sal_Bool bApi, sal_Bool 
bAlwaysCreateNew )
 {
        String sGroup(rGrp);
@@ -188,7 +186,6 @@ void SwGlossaryHdl::SetCurGroup(const String &rGrp, 
sal_Bool bApi, sal_Bool bAlw
        Beschreibung:
 ------------------------------------------------------------------------*/
 
-
 sal_uInt16 SwGlossaryHdl::GetGroupCnt() const
 {
        return rStatGlossaries.GetGroupCnt();
@@ -198,7 +195,6 @@ sal_uInt16 SwGlossaryHdl::GetGroupCnt() const
        Beschreibung:
 ------------------------------------------------------------------------*/
 
-
 String SwGlossaryHdl::GetGroupName( sal_uInt16 nId, String* pTitle )
 {
        String sRet = rStatGlossaries.GetGroupName(nId);
@@ -224,7 +220,6 @@ String SwGlossaryHdl::GetGroupName( sal_uInt16 nId, String* 
pTitle )
        Beschreibung:
 ------------------------------------------------------------------------*/
 
-
 sal_Bool SwGlossaryHdl::NewGroup(String &rGrpName, const String& rTitle)
 {
        if(STRING_NOTFOUND == rGrpName.Search(GLOS_DELIM))
@@ -279,7 +274,7 @@ sal_Bool SwGlossaryHdl::CopyOrMove( const String& 
rSourceGroupName,  String& rSo
        if(bMove && pSourceGroup->IsOld() && 0 != pSourceGroup->ConvertToNew())
                return sal_False;*/
 
-       //Der Index muss hier ermittelt werden, weil rSourceShortName in 
CopyBlock evtl veraendert wird
+       // Der Index muss hier ermittelt werden, weil rSourceShortName in 
CopyBlock evtl. verändert wird
        sal_uInt16 nDeleteIdx = pSourceGroup->GetIndex( rSourceShortName );
        DBG_ASSERT(USHRT_MAX != nDeleteIdx, "Eintrag nicht gefunden");
        sal_uLong nRet = pSourceGroup->CopyBlock( *pDestGroup, 
rSourceShortName, rLongName );
@@ -294,10 +289,9 @@ sal_Bool SwGlossaryHdl::CopyOrMove( const String& 
rSourceGroupName,  String& rSo
 }
 
 /*------------------------------------------------------------------------
-       Beschreibung: Loeschen einer Textbausteindatei-Gruppe
+       Beschreibung: Löschen einer Textbausteindatei-Gruppe
 ------------------------------------------------------------------------*/
 
-
 sal_Bool SwGlossaryHdl::DelGroup(const String &rGrpName)
 {
        String sGroup(rGrpName);
@@ -317,10 +311,9 @@ sal_Bool SwGlossaryHdl::DelGroup(const String &rGrpName)
 }
 
 /*------------------------------------------------------------------------
-       Beschreibung:   Anzahl Textbausteine erfragen
+       Beschreibung: Anzahl Textbausteine erfragen
 ------------------------------------------------------------------------*/
 
-
 sal_uInt16 SwGlossaryHdl::GetGlossaryCnt()
 {
        return pCurGrp ? pCurGrp->GetCount() : 0;
@@ -330,7 +323,6 @@ sal_uInt16 SwGlossaryHdl::GetGlossaryCnt()
        Beschreibung:
 ------------------------------------------------------------------------*/
 
-
 String SwGlossaryHdl::GetGlossaryName( sal_uInt16 nId )
 {
        ASSERT(nId < GetGlossaryCnt(), Textbausteinarray ueberindiziert.);
@@ -345,12 +337,10 @@ String    SwGlossaryHdl::GetGlossaryShortName(sal_uInt16 
nId)
        return pCurGrp->GetShortName( nId );
 }
 
-
 /*------------------------------------------------------------------------
-       Beschreibung:   Kurzname erfragen
+ Beschreibung: Kurzname erfragen
 ------------------------------------------------------------------------*/
 
-
 String SwGlossaryHdl::GetGlossaryShortName(const String &rName)
 {
        String sReturn;
@@ -368,10 +358,9 @@ String SwGlossaryHdl::GetGlossaryShortName(const String 
&rName)
 }
 
 /*------------------------------------------------------------------------
- Beschreibung: Kuerzel fuer Textbaustein bereits verwendet?
+ Beschreibung: Kürzel für Textbaustein bereits verwendet?
 ------------------------------------------------------------------------*/
 
-
 sal_Bool SwGlossaryHdl::HasShortName(const String& rShortName) const
 {
        SwTextBlocks *pBlock = pCurGrp ? pCurGrp
@@ -405,7 +394,7 @@ sal_Bool    SwGlossaryHdl::ConvertToNew(SwTextBlocks& 
/*rOld*/)
 }
 
 /*------------------------------------------------------------------------
-       Beschreibung:   Erzeugen eines Textbausteines
+       Beschreibung: Erzeugen eines Textbausteines
 ------------------------------------------------------------------------*/
 
 sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, const String& 
rShortName,
@@ -431,7 +420,7 @@ sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, 
const String& rShortNam
        const SvxAutoCorrCfg* pCfg = SvxAutoCorrCfg::Get();
 
        const sal_uInt16 nSuccess = pWrtShell->MakeGlossary( *pTmp, rName, 
rShortName,
-                            pCfg->IsSaveRelFile(), pOnlyTxt );
+                                                       pCfg->IsSaveRelFile(), 
pOnlyTxt );
        if(nSuccess == (sal_uInt16) -1 )
        {
                InfoBox(pWrtShell->GetView().GetWindow(), 
SW_RES(MSG_ERR_INSERT_GLOS)).Execute();
@@ -441,10 +430,9 @@ sal_Bool SwGlossaryHdl::NewGlossary(const String& rName, 
const String& rShortNam
        return sal_Bool( nSuccess != (sal_uInt16) -1 );
 }
 /*------------------------------------------------------------------------
-       Beschreibung:   Loeschen eines Textbausteines
+ Beschreibung: Löschen eines Textbausteines
 ------------------------------------------------------------------------*/
 
-
 sal_Bool SwGlossaryHdl::DelGlossary(const String &rShortName)
 {
        SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
@@ -465,7 +453,6 @@ sal_Bool SwGlossaryHdl::DelGlossary(const String 
&rShortName)
        Beschreibung: Kurzform expandieren
 ------------------------------------------------------------------------*/
 
-
 sal_Bool SwGlossaryHdl::ExpandGlossary()
 {
        ASSERT(pWrtShell->CanInsert(), illegal);
@@ -556,11 +543,11 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
                        }
                        else
                        {
-                SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
-                DBG_ASSERT(pFact, "SwAbstractDialogFactory fail!");
+                               SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
+                               DBG_ASSERT(pFact, "SwAbstractDialogFactory 
fail!");
 
                                AbstractSwSelGlossaryDlg* pDlg = 
pFact->CreateSwSelGlossaryDlg( 0, aShortName, DLG_SEL_GLOS );
-                DBG_ASSERT(pDlg, "Dialogdiet fail!");
+                               DBG_ASSERT(pDlg, "Dialogdiet fail!");
                                for(sal_uInt16 i = 0; i < aFoundArr.Count(); 
++i)
                                {
                                        TextBlockInfo_Impl* pData = 
aFoundArr.GetObject(i);
@@ -616,7 +603,7 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
        // StartAction darf nicht vor HasSelection und DelRight stehen,
        // sonst wird der mögliche Shellwechsel verzögert und
        // API-Programme würden dann hängenbleiben
-       // ausserdem darf das Ereignismacro ebenfalls nicht in einer Action 
gerufen werden
+       // außerdem darf das Ereignismacro ebenfalls nicht in einer Action 
gerufen werden
                pWrtShell->StartUndo(UNDO_INSGLOSSARY);
                if( aStartMacro.GetMacName().Len() )
                        pWrtShell->ExecMacro( aStartMacro );
@@ -644,10 +631,9 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
 }
 
 /*------------------------------------------------------------------------
-       Beschreibung: Textbaustein einfuegen
+       Beschreibung: Textbaustein einfügen
 ------------------------------------------------------------------------*/
 
-
 sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
 {
        ASSERT(pWrtShell->CanInsert(), illegal);
@@ -682,7 +668,7 @@ sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
                pWrtShell->ExecMacro( aEndMacro );
        }
 
-       // fuer alle neuen InputFelder die Eingaben abfordern
+       // für alle neuen InputFelder die Eingaben abfordern
        if( aFldLst.BuildSortLst() )
                pWrtShell->UpdateInputFlds( &aFldLst );
 
@@ -692,10 +678,9 @@ sal_Bool SwGlossaryHdl::InsertGlossary(const String &rName)
 }
 
 /*------------------------------------------------------------------------
- Beschreibung: Macro setzen / erfragen
+ Beschreibung: Macro setzen / erfragen
 ------------------------------------------------------------------------*/
 
-
 void SwGlossaryHdl::SetMacros(const String& rShortName,
                                                          const SvxMacro* 
pStart,
                                                          const SvxMacro* pEnd,
@@ -745,12 +730,10 @@ void SwGlossaryHdl::GetMacros( const String &rShortName,
                rStatGlossaries.PutGroupDoc( pGlos );
 }
 
-
 /*------------------------------------------------------------------------
-       Beschreibung:   ctor, dtor
+ Beschreibung: ctor, dtor
 ------------------------------------------------------------------------*/
 
-
 SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrm, SwWrtShell *pSh)
        : rStatGlossaries( *::GetGlossaries() ),
        aCurGrp( rStatGlossaries.GetDefName() ),
@@ -760,7 +743,6 @@ SwGlossaryHdl::SwGlossaryHdl(SfxViewFrame* pVwFrm, 
SwWrtShell *pSh)
 {
 }
 
-
 SwGlossaryHdl::~SwGlossaryHdl()
 {
        if( pCurGrp )
@@ -768,10 +750,9 @@ SwGlossaryHdl::~SwGlossaryHdl()
 }
 
 /*------------------------------------------------------------------------
-       Beschreibung:   Umbenennen eines Textbausteines
+ Beschreibung: Umbenennen eines Textbausteines
 ------------------------------------------------------------------------*/
 
-
 sal_Bool SwGlossaryHdl::Rename(const String& rOldShort, const String& 
rNewShortName,
                                                   const String& rNewName )
 {
@@ -802,7 +783,6 @@ sal_Bool SwGlossaryHdl::Rename(const String& rOldShort, 
const String& rNewShortN
        return bRet;
 }
 
-
 sal_Bool SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) const
 {
        SwTextBlocks *pGlossary = 0;
@@ -820,7 +800,6 @@ sal_Bool SwGlossaryHdl::IsReadOnly( const String* pGrpNm ) 
const
        return bRet;
 }
 
-
 sal_Bool SwGlossaryHdl::IsOld() const
 {
        SwTextBlocks *pGlossary = pCurGrp ? pCurGrp
diff --git a/main/sw/source/ui/dochdl/selglos.cxx 
b/main/sw/source/ui/dochdl/selglos.cxx
index 59cfff8ee9..72cd244aae 100644
--- a/main/sw/source/ui/dochdl/selglos.cxx
+++ b/main/sw/source/ui/dochdl/selglos.cxx
@@ -19,8 +19,6 @@
  *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 
@@ -28,8 +26,6 @@
 #undef SW_DLLIMPLEMENTATION
 #endif
 
-
-
 #include "swtypes.hxx"
 
 #include "selglos.hxx"
@@ -46,21 +42,21 @@
 SwSelGlossaryDlg::SwSelGlossaryDlg(Window * pParent, const String &rShortName)
        : ModalDialog(pParent, SW_RES(DLG_SEL_GLOS)),
        aGlosBox(this, SW_RES( LB_GLOS)),
-    aGlosFL(this, SW_RES( FL_GLOS)),
+       aGlosFL(this, SW_RES( FL_GLOS)),
        aOKBtn(this, SW_RES( BT_OK)),
        aCancelBtn(this, SW_RES( BT_CANCEL)),
        aHelpBtn(this, SW_RES(BT_HELP))
 {
-    String sText(aGlosFL.GetText());
+       String sText(aGlosFL.GetText());
        sText += rShortName;
-    aGlosFL.SetText(sText);
+       aGlosFL.SetText(sText);
        FreeResource();
 
        aGlosBox.SetDoubleClickHdl(LINK(this, SwSelGlossaryDlg, 
DoubleClickHdl));
 }
 
 /*-----------------25.02.94 20:50-------------------
- dtor ueberladen
+ dtor überladen
 --------------------------------------------------*/
 SwSelGlossaryDlg::~SwSelGlossaryDlg() {}
 /* -----------------25.10.99 08:33-------------------
@@ -71,3 +67,5 @@ IMPL_LINK(SwSelGlossaryDlg, DoubleClickHdl, ListBox*, 
/*pBox*/)
        EndDialog(RET_OK);
        return 0;
 }
+
+/* vim: set noet sw=4 ts=4: */
diff --git a/main/sw/source/ui/dochdl/selglos.hrc 
b/main/sw/source/ui/dochdl/selglos.hrc
index e922c1788c..d800a511d1 100644
--- a/main/sw/source/ui/dochdl/selglos.hrc
+++ b/main/sw/source/ui/dochdl/selglos.hrc
@@ -19,9 +19,8 @@
  *
  *************************************************************/
 
-
-#define BT_OK          100
-#define BT_CANCEL      101
+#define BT_OK          100
+#define BT_CANCEL      101
 #define BT_HELP                102
 #define LB_GLOS                1
-#define FL_GLOS         2
+#define FL_GLOS                2
diff --git a/main/sw/source/ui/dochdl/selglos.src 
b/main/sw/source/ui/dochdl/selglos.src
index ac9019fbfc..8aef692fd8 100644
--- a/main/sw/source/ui/dochdl/selglos.src
+++ b/main/sw/source/ui/dochdl/selglos.src
@@ -19,8 +19,6 @@
  *
  *************************************************************/
 
-
-
 #include "selglos.hrc"
 #include "dochdl.hrc"
 #include "cmdid.h"
diff --git a/main/sw/source/ui/dochdl/swdtflvr.cxx 
b/main/sw/source/ui/dochdl/swdtflvr.cxx
index b81fe2f295..72e39a817c 100644
--- a/main/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/main/sw/source/ui/dochdl/swdtflvr.cxx
@@ -19,15 +19,12 @@
  *
  *************************************************************/
 
-
-
 // MARKER(update_precomp.py): autogen include statement, do not remove
 #include "precompiled_sw.hxx"
 #ifdef PRECOMPILED
 #include "ui_pch.hxx"
 #endif
 
-
 #include <com/sun/star/embed/XVisualObject.hpp>
 #include <com/sun/star/embed/XTransactedObject.hpp>
 #include <com/sun/star/embed/Aspects.hpp>
@@ -100,13 +97,12 @@
 #include <docsh.hxx>
 #include <wdocsh.hxx>
 #include <fldbas.hxx>          //DDE
-#include <swundo.hxx>          // fuer Undo-Ids
+#include <swundo.hxx>          // for Undo-Ids
 #include <pam.hxx>
 #include <ndole.hxx>
 #include <swwait.hxx>
 #include <viewopt.hxx>
 #include <swunodef.hxx>
-#include <vcl/sound.hxx>
 #include <swerror.h>
 #include <SwCapObjType.hxx>
 #include <cmdid.h>
@@ -130,17 +126,16 @@ extern sal_Bool bFrmDrag;
 extern sal_Bool bDDINetAttr;
 extern sal_Bool bExecuteDrag;
 
-
 #define OLESIZE        11905 - 2 * lMinBorder, 6 * MM50
 
 #define SWTRANSFER_OBJECTTYPE_DRAWMODEL                        0x00000001
-#define SWTRANSFER_OBJECTTYPE_HTML              0x00000002
+#define SWTRANSFER_OBJECTTYPE_HTML                             0x00000002
 #define SWTRANSFER_OBJECTTYPE_RTF                              0x00000004
 #define SWTRANSFER_OBJECTTYPE_STRING                   0x00000008
 #define SWTRANSFER_OBJECTTYPE_SWOLE                            0x00000010
 #define SWTRANSFER_OBJECTTYPE_DDE                              0x00000020
 
-#define SWTRANSFER_GRAPHIC_INSERTED             0x00000040
+#define SWTRANSFER_GRAPHIC_INSERTED                            0x00000040
 
 using namespace ::svx;
 using ::rtl::OUString;
@@ -149,12 +144,12 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::datatransfer;
 using namespace nsTransferBufferType;
 
-#define DDE_TXT_ENCODING       gsl_getSystemTextEncoding()
+#define DDE_TXT_ENCODING       gsl_getSystemTextEncoding()
 
 class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink
 {
        String sName;
-    ::sfx2::SvLinkSourceRef refObj;
+       ::sfx2::SvLinkSourceRef refObj;
        SwTransferable& rTrnsfr;
        SwDocShell* pDocShell;
        sal_uLong nOldTimeOut;
@@ -163,7 +158,7 @@ class SwTrnsfrDdeLink : public ::sfx2::SvBaseLink
 
        sal_Bool FindDocShell();
 
-    using sfx2::SvBaseLink::Disconnect;
+       using sfx2::SvBaseLink::Disconnect;
 
 protected:
        virtual ~SwTrnsfrDdeLink();
@@ -172,7 +167,7 @@ public:
        SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh );
 
        virtual void DataChanged( const String& rMimeType,
-                              const uno::Any & rValue );
+                                                         const uno::Any & 
rValue );
        virtual void Closed();
 
        sal_Bool WriteData( SvStream& rStrm );
@@ -184,26 +179,25 @@ public:
 class SwTrnsfrActionAndUndo
 {
        SwWrtShell *pSh;
-    SwUndoId eUndoId;
+       SwUndoId eUndoId;
 public:
-    SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId,
-                           const SwRewriter * pRewriter = 0,
-                           sal_Bool bDelSel = sal_False)
-        : pSh( pS ), eUndoId( nId )
+       SwTrnsfrActionAndUndo( SwWrtShell *pS, SwUndoId nId,
+                                                  const SwRewriter * pRewriter 
= 0,
+                                                  sal_Bool bDelSel = sal_False)
+               : pSh( pS ), eUndoId( nId )
        {
-        pSh->StartUndo( eUndoId, pRewriter );
+               pSh->StartUndo( eUndoId, pRewriter );
                if( bDelSel )
                        pSh->DelRight();
                pSh->StartAllAction();
        }
        ~SwTrnsfrActionAndUndo()
        {
-        pSh->EndUndo();
+               pSh->EndUndo();
                pSh->EndAllAction();
        }
 };
 
-
 // -----------------------------------------------------------------------
 
 SwTransferable::SwTransferable( SwWrtShell& rSh )
@@ -218,8 +212,8 @@ SwTransferable::SwTransferable( SwWrtShell& rSh )
        pTargetURL( 0 ),
        eBufferType( TRNSFR_NONE )
 {
-    rSh.GetView().AddTransferable(*this);
-    SwDocShell* pDShell = rSh.GetDoc()->GetDocShell();
+       rSh.GetView().AddTransferable(*this);
+       SwDocShell* pDShell = rSh.GetDoc()->GetDocShell();
        if( pDShell )
        {
                pDShell->FillTransferableObjectDescriptor( aObjDesc );
@@ -229,10 +223,10 @@ SwTransferable::SwTransferable( SwWrtShell& rSh )
                        aObjDesc.maDisplayName = URIHelper::removePassword(
                                                                
rURLObj.GetMainURL( INetURLObject::NO_DECODE ),
                                                                
INetURLObject::WAS_ENCODED,
-                                                               
INetURLObject::DECODE_UNAMBIGUOUS );
+                                                               
INetURLObject::DECODE_UNAMBIGUOUS );
                }
 
-        PrepareOLE( aObjDesc );
+               PrepareOLE( aObjDesc );
        }
 }
 
@@ -240,7 +234,7 @@ SwTransferable::SwTransferable( SwWrtShell& rSh )
 
 SwTransferable::~SwTransferable()
 {
-    Application::GetSolarMutex().acquire();
+       Application::GetSolarMutex().acquire();
 
        // der DDELink braucht noch die WrtShell!
        if( refDdeLink.Is() )
@@ -251,30 +245,30 @@ SwTransferable::~SwTransferable()
 
        pWrtShell = 0;
 
-    // dvo 2002-05-30, #99239#: release reference to the document so that
-    // aDocShellRef will delete it (if aDocShellRef is set). Otherwise, the OLE
-    // nodes keep references to their sub-storage when the storage is already
-    // dead.
+       // dvo 2002-05-30, #99239#: release reference to the document so that
+       // aDocShellRef will delete it (if aDocShellRef is set). Otherwise, the 
OLE
+       // nodes keep references to their sub-storage when the storage is 
already
+       // dead.
        delete pClpDocFac;
 
-       //JP 22.04.95: erst schliessen, dann kann die Ref. auch gecleared 
werden,
-       //                              so das die DocShell auch tatsaechlich 
geloescht wird!
+       //JP 22.04.95: erst schließen, dann kann die Ref. auch gecleared werden,
+       //                              so das die DocShell auch tatsächlich 
gelöscht wird!
        if( aDocShellRef.Is() )
        {
-        SfxObjectShell * pObj = aDocShellRef;
+               SfxObjectShell * pObj = aDocShellRef;
                SwDocShell* pDocSh = (SwDocShell*)pObj;
                pDocSh->DoClose();
        }
        aDocShellRef.Clear();
 
        SwModule* pMod = SW_MOD();
-    if(pMod)
-    {
-        if ( pMod->pDragDrop == this )
-            pMod->pDragDrop = 0;
-        else if ( pMod->pXSelection == this )
-            pMod->pXSelection = 0;
-    }
+       if(pMod)
+       {
+               if ( pMod->pDragDrop == this )
+                       pMod->pDragDrop = 0;
+               else if ( pMod->pXSelection == this )
+                       pMod->pXSelection = 0;
+       }
 
        delete pClpGraphic;
        delete pClpBitmap;
@@ -282,23 +276,22 @@ SwTransferable::~SwTransferable()
        delete pTargetURL;
        delete pBkmk;
 
-
        eBufferType = TRNSFR_NONE;
 
-    Application::GetSolarMutex().release();
+       Application::GetSolarMutex().release();
 }
 
 // -----------------------------------------------------------------------
 
 static SwDoc * lcl_GetDoc(SwDocFac & rDocFac)
 {
-    SwDoc *const pDoc = rDocFac.GetDoc();
-    ASSERT( pDoc, "Document not found" );
-    if (pDoc)
-    {
-        pDoc->SetClipBoard( true );
-    }
-    return pDoc;
+       SwDoc *const pDoc = rDocFac.GetDoc();
+       ASSERT( pDoc, "Document not found" );
+       if (pDoc)
+       {
+               pDoc->SetClipBoard( true );
+       }
+       return pDoc;
 }
 
 // -----------------------------------------------------------------------
@@ -328,11 +321,11 @@ void SwTransferable::AddSupportedFormats()
 
 void SwTransferable::InitOle( SfxObjectShell* pDoc, SwDoc& rDoc )
 {
-       //OleVisArea einstellen. Linke obere Ecke der Seite und Groesse
-       //der RealSize in Twips.
+       // OleVisArea einstellen. Linke obere Ecke der Seite und Größe
+       // der RealSize in Twips.
        const Size aSz( OLESIZE );
        SwRect aVis( Point( DOCUMENTBORDER, DOCUMENTBORDER ), aSz );
-    pDoc->SetVisArea( aVis.SVRect() );
+       pDoc->SetVisArea( aVis.SVRect() );
        rDoc.set(IDocumentSettingAccess::BROWSE_MODE, true );
 }
 
@@ -340,19 +333,19 @@ void SwTransferable::InitOle( SfxObjectShell* pDoc, 
SwDoc& rDoc )
 
 uno::Reference < embed::XEmbeddedObject > SwTransferable::FindOLEObj( 
sal_Int64& nAspect ) const
 {
-    uno::Reference < embed::XEmbeddedObject > xObj;
+       uno::Reference < embed::XEmbeddedObject > xObj;
        if( pClpDocFac )
        {
                SwIterator<SwCntntNode,SwFmtColl> aIter( 
*pClpDocFac->GetDoc()->GetDfltGrfFmtColl() );
                for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
                        if( ND_OLENODE == pNd->GetNodeType() )
                        {
-                xObj = ((SwOLENode*)pNd)->GetOLEObj().GetOleRef();
+                               xObj = 
((SwOLENode*)pNd)->GetOLEObj().GetOleRef();
                                nAspect = ((SwOLENode*)pNd)->GetAspect();
                                break;
                        }
        }
-    return xObj;
+       return xObj;
 }
 
 // -----------------------------------------------------------------------
@@ -365,14 +358,13 @@ Graphic* SwTransferable::FindOLEReplacementGraphic() const
                for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
                        if( ND_OLENODE == pNd->GetNodeType() )
                        {
-                return ((SwOLENode*)pNd)->GetGraphic();
+                               return ((SwOLENode*)pNd)->GetGraphic();
                        }
        }
 
-    return NULL;
+       return NULL;
 }
 
-
 // -----------------------------------------------------------------------
 
 void SwTransferable::RemoveDDELinkFormat( const Window& rWin )
@@ -387,23 +379,23 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& 
rFlavor )
 {
        sal_uInt32      nFormat = SotExchange::GetFormat( rFlavor );
 
-    // we can only fullfil the request if
-    // 1) we have data for this format
-    // 2) we have either a clipboard document (pClpDocFac), or
-    //    we have a SwWrtShell (so we can generate a new clipboard document)
-    if( !HasFormat( nFormat ) || ( pClpDocFac == NULL && pWrtShell == NULL ) )
+       // we can only fulfill the request if
+       // 1) we have data for this format
+       // 2) we have either a clipboard document (pClpDocFac), or
+       //    we have a SwWrtShell (so we can generate a new clipboard document)
+       if( !HasFormat( nFormat ) || ( pClpDocFac == NULL && pWrtShell == NULL 
) )
                return sal_False;
 
        if( !pClpDocFac )
        {
-        SelectionType nSelectionType = pWrtShell->GetSelectionType();
+               SelectionType nSelectionType = pWrtShell->GetSelectionType();
 
-        // when pending we will not get the correct type, but 
nsSelectionType::SEL_TXT
-        // as fallback. This *happens* durning D&D, so we need to check if we 
are in
-        // the fallback and just try to get a graphic
-        const bool bPending(pWrtShell->BasicActionPend());
+               // when pending we will not get the correct type, but 
nsSelectionType::SEL_TXT
+               // as fallback. This *happens* during D&D, so we need to check 
if we are in
+               // the fallback and just try to get a graphic
+               const bool bPending(pWrtShell->BasicActionPend());
 
-        // SEL_GRF kommt vom ContentType der editsh
+               // SEL_GRF kommt vom ContentType der editsh
                if(bPending || ((nsSelectionType::SEL_GRF | 
nsSelectionType::SEL_DRW_FORM) & nSelectionType))
                {
                        pClpGraphic = new Graphic;
@@ -423,13 +415,13 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& 
rFlavor )
                }
 
                pClpDocFac = new SwDocFac;
-        SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
+               SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
 
-               pTmpDoc->LockExpFlds();         // nie die Felder updaten - 
Text so belassen
+               pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so 
belassen
                pWrtShell->Copy( pTmpDoc );
 
                // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
-        aDocShellRef = pTmpDoc->GetTmpDocShell();
+               aDocShellRef = pTmpDoc->GetTmpDocShell();
                if( aDocShellRef.Is() )
                        SwTransferable::InitOle( aDocShellRef, *pTmpDoc );
                pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
@@ -455,7 +447,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& 
rFlavor )
                }
                if( pWrtShell->IsFrmSelected() )
                {
-                       SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_URL, 
RES_URL );
+                       SfxItemSet aSet( pWrtShell->GetAttrPool(), RES_URL, 
RES_URL );
                        pWrtShell->GetFlyFrmAttr( aSet );
                        const SwFmtURL& rURL = (SwFmtURL&)aSet.Get( RES_URL );
                        if( rURL.GetMap() )
@@ -470,16 +462,16 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& 
rFlavor )
        sal_Bool        bOK = sal_False;
        if( TRNSFR_OLE == eBufferType )
        {
-        //TODO/MBA: testing - is this the "single OLE object" case?!
+               //TODO/MBA: testing - is this the "single OLE object" case?!
                // aus dem ClipDoc das OLE-Object besorgen und von dem die Daten
                // besorgen.
                sal_Int64 nAspect = embed::Aspects::MSOLE_CONTENT; // will be 
set in the next statement
-        uno::Reference < embed::XEmbeddedObject > xObj = FindOLEObj( nAspect );
+               uno::Reference < embed::XEmbeddedObject > xObj = FindOLEObj( 
nAspect );
                Graphic* pOLEGraph = FindOLEReplacementGraphic();
-        if( xObj.is() )
+               if( xObj.is() )
                {
-            TransferableDataHelper aD( new SvEmbedTransferHelper( xObj, 
pOLEGraph, nAspect ) );
-            uno::Any aAny( aD.GetAny( rFlavor ));
+                       TransferableDataHelper aD( new SvEmbedTransferHelper( 
xObj, pOLEGraph, nAspect ) );
+                       uno::Any aAny( aD.GetAny( rFlavor ));
                        if( aAny.hasValue() )
                                bOK = SetAny( aAny, rFlavor );
                }
@@ -510,30 +502,30 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& 
rFlavor )
 
                case SOT_FORMATSTR_ID_DRAWING:
                        {
-                SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+                               SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
                                bOK = SetObject( pDoc->GetDrawModel(),
                                                                
SWTRANSFER_OBJECTTYPE_DRAWMODEL, rFlavor );
                        }
                        break;
 
                case SOT_FORMAT_STRING:
-        {
-            SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
-            bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_STRING, rFlavor );
-        }
-        break;
+               {
+                       SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+                       bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_STRING, 
rFlavor );
+               }
+               break;
                case SOT_FORMAT_RTF:
-        {
-            SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
-            bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_RTF, rFlavor );
-        }
+               {
+                       SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+                       bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_RTF, 
rFlavor );
+               }
                        break;
 
                case SOT_FORMATSTR_ID_HTML:
-        {
-            SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
-            bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_HTML, rFlavor );
-        }
+               {
+                       SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+                       bOK = SetObject( pDoc, SWTRANSFER_OBJECTTYPE_HTML, 
rFlavor );
+               }
                        break;
 
                case SOT_FORMATSTR_ID_SVXB:
@@ -546,9 +538,9 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& 
rFlavor )
                                bOK = SetGDIMetaFile( 
pClpGraphic->GetGDIMetaFile(), rFlavor );
                        break;
                case SOT_FORMAT_BITMAP:
-        case SOT_FORMATSTR_ID_PNG:
-            // #126398#  Neither pClpBitmap nor pClpGraphic are necessarily set
-            if( (eBufferType & TRNSFR_GRAPHIC) && (pClpBitmap != 0 || 
pClpGraphic != 0))
+               case SOT_FORMATSTR_ID_PNG:
+                       // #126398#  Neither pClpBitmap nor pClpGraphic are 
necessarily set
+                       if( (eBufferType & TRNSFR_GRAPHIC) && (pClpBitmap != 0 
|| pClpGraphic != 0))
                                bOK = SetBitmapEx( (pClpBitmap ? pClpBitmap : 
pClpGraphic)->GetBitmapEx(), rFlavor );
                        break;
 
@@ -576,7 +568,7 @@ sal_Bool SwTransferable::GetData( const DATA_FLAVOR& 
rFlavor )
 //             default:
                        if( !aDocShellRef.Is() )
                        {
-                SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+                               SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
                                SwDocShell* pNewDocSh = new SwDocShell( pDoc,
                                                                                
 SFX_CREATE_MODE_EMBEDDED );
                                aDocShellRef = pNewDocSh;
@@ -635,7 +627,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& 
xStream,
                        }
 
                        {
-                uno::Reference<io::XOutputStream> xDocOut( new 
utl::OOutputStreamWrapper( *xStream ) );
+                               uno::Reference<io::XOutputStream> xDocOut( new 
utl::OOutputStreamWrapper( *xStream ) );
                                if( SvxDrawingLayerExport( pModel, xDocOut ) )
                                        xStream->Commit();
                        }
@@ -646,47 +638,46 @@ sal_Bool SwTransferable::WriteObject( 
SotStorageStreamRef& xStream,
 
        case SWTRANSFER_OBJECTTYPE_SWOLE:
                {
-            SfxObjectShell*   pEmbObj = (SfxObjectShell*) pObject;
-            try
-            {
-                ::utl::TempFile     aTempFile;
-                aTempFile.EnableKillingFile();
-                uno::Reference< embed::XStorage > xWorkStore =
-                    ::comphelper::OStorageHelper::GetStorageFromURL( 
aTempFile.GetURL(), embed::ElementModes::READWRITE );
-
-                // write document storage
-                pEmbObj->SetupStorage( xWorkStore, SOFFICE_FILEFORMAT_CURRENT, 
sal_False );
-                // mba: no BaseURL for clipboard
-                SfxMedium aMedium( xWorkStore, String() );
-                bRet = pEmbObj->DoSaveObjectAs( aMedium, sal_False );
-                pEmbObj->DoSaveCompleted();
-
-                uno::Reference< embed::XTransactedObject > xTransact( 
xWorkStore, uno::UNO_QUERY );
-                if ( xTransact.is() )
-                    xTransact->commit();
-
-                SvStream* pSrcStm = ::utl::UcbStreamHelper::CreateStream( 
aTempFile.GetURL(), STREAM_READ );
-                if( pSrcStm )
-                {
-                    xStream->SetBufferSize( 0xff00 );
-                    *xStream << *pSrcStm;
-                    delete pSrcStm;
-                }
-
-                bRet = sal_True;
-
-                xWorkStore->dispose();
-                xWorkStore = uno::Reference < embed::XStorage >();
-                xStream->Commit();
-            }
-            catch ( uno::Exception& )
-            {}
-
-            bRet = ( xStream->GetError() == ERRCODE_NONE );
+                       SfxObjectShell*   pEmbObj = (SfxObjectShell*) pObject;
+                       try
+                       {
+                               ::utl::TempFile     aTempFile;
+                               aTempFile.EnableKillingFile();
+                               uno::Reference< embed::XStorage > xWorkStore =
+                                       
::comphelper::OStorageHelper::GetStorageFromURL( aTempFile.GetURL(), 
embed::ElementModes::READWRITE );
+
+                               // write document storage
+                               pEmbObj->SetupStorage( xWorkStore, 
SOFFICE_FILEFORMAT_CURRENT, sal_False );
+                               // mba: no BaseURL for clipboard
+                               SfxMedium aMedium( xWorkStore, String() );
+                               bRet = pEmbObj->DoSaveObjectAs( aMedium, 
sal_False );
+                               pEmbObj->DoSaveCompleted();
+
+                               uno::Reference< embed::XTransactedObject > 
xTransact( xWorkStore, uno::UNO_QUERY );
+                               if ( xTransact.is() )
+                                       xTransact->commit();
+
+                               SvStream* pSrcStm = 
::utl::UcbStreamHelper::CreateStream( aTempFile.GetURL(), STREAM_READ );
+                               if( pSrcStm )
+                               {
+                                       xStream->SetBufferSize( 0xff00 );
+                                       *xStream << *pSrcStm;
+                                       delete pSrcStm;
+                               }
+
+                               bRet = sal_True;
+
+                               xWorkStore->dispose();
+                               xWorkStore = uno::Reference < embed::XStorage 
>();
+                               xStream->Commit();
+                       }
+                       catch ( uno::Exception& )
+                       {}
+
+                       bRet = ( xStream->GetError() == ERRCODE_NONE );
                }
                break;
 
-
        case SWTRANSFER_OBJECTTYPE_DDE:
                {
                        xStream->SetBufferSize( 1024 );
@@ -700,23 +691,23 @@ sal_Bool SwTransferable::WriteObject( 
SotStorageStreamRef& xStream,
                break;
 
        case SWTRANSFER_OBJECTTYPE_HTML:
-        GetHTMLWriter( aEmptyStr, String(), xWrt );
+               GetHTMLWriter( aEmptyStr, String(), xWrt );
                break;
 
        case SWTRANSFER_OBJECTTYPE_RTF:
-        GetRTFWriter( aEmptyStr, String(), xWrt );
+               GetRTFWriter( aEmptyStr, String(), xWrt );
                break;
 
        case SWTRANSFER_OBJECTTYPE_STRING:
-        GetASCWriter( aEmptyStr, String(), xWrt );
+               GetASCWriter( aEmptyStr, String(), xWrt );
                if( xWrt.Is() )
                {
                        SwAsciiOptions aAOpt;
                        aAOpt.SetCharSet( RTL_TEXTENCODING_UTF8 );
                        xWrt->SetAsciiOptions( aAOpt );
 
-            // #102841# no start char for clipboard
-            xWrt->bUCS2_WithStartChar = sal_False;
+                       // #102841# no start char for clipboard
+                       xWrt->bUCS2_WithStartChar = sal_False;
                }
                break;
        }
@@ -730,7 +721,7 @@ sal_Bool SwTransferable::WriteObject( SotStorageStreamRef& 
xStream,
                SwWriter aWrt( *xStream, *pDoc );
                if( !IsError( aWrt.Write( xWrt )) )
                {
-                       *xStream << '\0';                               // 
terminate with a zero
+                       *xStream << '\0'; // terminate with a zero
                        xStream->Commit();
                        bRet = sal_True;
                }
@@ -753,9 +744,9 @@ int SwTransferable::Cut()
 
 void SwTransferable::DeleteSelection()
 {
-    if(!pWrtShell)
-        return;
-    // Selektionsart vor Action-Klammerung erfragen
+       if(!pWrtShell)
+               return;
+       // Selektionsart vor Action-Klammerung erfragen
        const int nSelection = pWrtShell->GetSelectionType();
        pWrtShell->StartUndo( UNDO_DELETE );
        if( ( nsSelectionType::SEL_TXT | nsSelectionType::SEL_TBL ) & 
nSelection )
@@ -769,8 +760,8 @@ void SwTransferable::DeleteSelection()
 int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
 {
        int nRet = 1;
-    if(!pWrtShell)
-        return 0;
+       if(!pWrtShell)
+               return 0;
 
        String sGrfNm;
        const int nSelection = pWrtShell->GetSelectionType();
@@ -784,22 +775,22 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
                        pOrigGrf = pClpBitmap;
 
                pClpDocFac = new SwDocFac;
-        SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
-        pWrtShell->Copy( pDoc );
+               SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+               pWrtShell->Copy( pDoc );
 
-        if (pOrigGrf && !pOrigGrf->GetBitmap().IsEmpty())
+               if (pOrigGrf && !pOrigGrf->GetBitmap().IsEmpty())
                  AddFormat( SOT_FORMATSTR_ID_SVXB );
 
-        PrepareOLE( aObjDesc );
+               PrepareOLE( aObjDesc );
                AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
 
-        // --> OD 2005-02-09 #119353# - robust
-        const Graphic* pGrf = pWrtShell->GetGraphic();
-        if( pGrf && pGrf->IsSupportedGraphic() )
-        // <--
+               // --> OD 2005-02-09 #119353# - robust
+               const Graphic* pGrf = pWrtShell->GetGraphic();
+               if( pGrf && pGrf->IsSupportedGraphic() )
+               // <--
                {
                        AddFormat( FORMAT_GDIMETAFILE );
-            AddFormat( SOT_FORMATSTR_ID_PNG );
+                       AddFormat( SOT_FORMATSTR_ID_PNG );
                        AddFormat( FORMAT_BITMAP );
                }
                eBufferType = TRNSFR_GRAPHIC;
@@ -807,25 +798,25 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
        }
        else if ( nSelection == nsSelectionType::SEL_OLE )
        {
-        pClpDocFac = new SwDocFac;
-        SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+               pClpDocFac = new SwDocFac;
+               SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
                aDocShellRef = new SwDocShell( pDoc, SFX_CREATE_MODE_EMBEDDED);
                aDocShellRef->DoInitNew( NULL );
                pWrtShell->Copy( pDoc );
 
                AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
 
-        // --> OD #i98753#
-        // set size of embedded object at the object description structure
-        aObjDesc.maSize = OutputDevice::LogicToLogic( pWrtShell->GetObjSize(), 
MAP_TWIP, MAP_100TH_MM );
-        // <--
-        PrepareOLE( aObjDesc );
+               // --> OD #i98753#
+               // set size of embedded object at the object description 
structure
+               aObjDesc.maSize = OutputDevice::LogicToLogic( 
pWrtShell->GetObjSize(), MAP_TWIP, MAP_100TH_MM );
+               // <--
+               PrepareOLE( aObjDesc );
                AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
 
-        AddFormat( FORMAT_GDIMETAFILE );
+               AddFormat( FORMAT_GDIMETAFILE );
                eBufferType = TRNSFR_OLE;
        }
-       //Gibt es ueberhaupt etwas zum bereitstellen?
+       // Gibt es überhaupt etwas zum bereitstellen?
        else if ( pWrtShell->IsSelection() || pWrtShell->IsFrmSelected() ||
                          pWrtShell->IsObjSelected() )
        {
@@ -835,38 +826,38 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
 
                pClpDocFac = new SwDocFac;
 
-               // zusaetzlichen Cursor erzeugen, damit eine Gleichbehandlung
-               // von Tastatur- und Mausselektion moeglich ist.
+               // zusätzlichen Cursor erzeugen, damit eine Gleichbehandlung
+               // von Tastatur- und Mausselektion möglich ist.
                // Im AddMode wird bei Tastaturselektion der neue Cursor erst
                // beim Bewegen des Cursors nach Selektionsende erzeugt.
                if( pWrtShell->IsAddMode() && 
pWrtShell->SwCrsrShell::HasSelection() )
                        pWrtShell->CreateCrsr();
 
-        SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
+               SwDoc *const pTmpDoc = lcl_GetDoc(*pClpDocFac);
 
-               pTmpDoc->LockExpFlds();         // nie die Felder updaten - 
Text so belassen
+               pTmpDoc->LockExpFlds(); // nie die Felder updaten - Text so 
belassen
                pWrtShell->Copy( pTmpDoc );
 
-        {
-            IDocumentMarkAccess* const pMarkAccess = 
pTmpDoc->getIDocumentMarkAccess();
-            ::std::vector< ::sw::mark::IMark* > vDdeMarks;
-            // find all DDE-Bookmarks
-            for(IDocumentMarkAccess::const_iterator_t ppMark = 
pMarkAccess->getAllMarksBegin();
-                ppMark != pMarkAccess->getAllMarksEnd();
-                ppMark++)
-            {
-                if(IDocumentMarkAccess::DDE_BOOKMARK == 
IDocumentMarkAccess::GetType(**ppMark))
-                    vDdeMarks.push_back(ppMark->get());
-            }
-            // remove all DDE-Bookmarks, they are invalid inside the clipdoc!
-            for(::std::vector< ::sw::mark::IMark* >::iterator ppMark = 
vDdeMarks.begin();
-                ppMark != vDdeMarks.end();
-                ppMark++)
-                pMarkAccess->deleteMark(*ppMark);
-        }
+               {
+                       IDocumentMarkAccess* const pMarkAccess = 
pTmpDoc->getIDocumentMarkAccess();
+                       ::std::vector< ::sw::mark::IMark* > vDdeMarks;
+                       // find all DDE-Bookmarks
+                       for(IDocumentMarkAccess::const_iterator_t ppMark = 
pMarkAccess->getAllMarksBegin();
+                               ppMark != pMarkAccess->getAllMarksEnd();
+                               ppMark++)
+                       {
+                               if(IDocumentMarkAccess::DDE_BOOKMARK == 
IDocumentMarkAccess::GetType(**ppMark))
+                                       vDdeMarks.push_back(ppMark->get());
+                       }
+                       // remove all DDE-Bookmarks, they are invalid inside 
the clipdoc!
+                       for(::std::vector< ::sw::mark::IMark* >::iterator 
ppMark = vDdeMarks.begin();
+                               ppMark != vDdeMarks.end();
+                               ppMark++)
+                               pMarkAccess->deleteMark(*ppMark);
+               }
 
                // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
-        aDocShellRef = pTmpDoc->GetTmpDocShell();
+               aDocShellRef = pTmpDoc->GetTmpDocShell();
                if( aDocShellRef.Is() )
                        SwTransferable::InitOle( aDocShellRef, *pTmpDoc );
                pTmpDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
@@ -887,11 +878,11 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
                        bDDELink = pWrtShell->HasWholeTabSelection();
                }
 
-               //Wenn's einer braucht OLE'n wir ihm was.
+               // Wenn's einer braucht OLE'n wir ihm was.
                AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
 
-               //RTF vor das Metafile von OLE stellen, weil mit weniger 
verlusten
-               //behaftet.
+               // RTF vor das Metafile von OLE stellen, weil mit weniger 
Verlusten
+               // behaftet.
                if( !pWrtShell->IsObjSelected() )
                {
                        AddFormat( FORMAT_RTF );
@@ -906,7 +897,7 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
                        if ( nSelection & nsSelectionType::SEL_DRW )
                        {
                                AddFormat( FORMAT_GDIMETAFILE );
-                AddFormat( SOT_FORMATSTR_ID_PNG );
+                               AddFormat( SOT_FORMATSTR_ID_PNG );
                                AddFormat( FORMAT_BITMAP );
                        }
                        eBufferType = (TransferBufferType)( TRNSFR_GRAPHIC | 
eBufferType );
@@ -923,11 +914,11 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
                        if( pWrtShell->GetURLFromButton( sURL, sDesc ) )
                        {
                                AddFormat( FORMAT_STRING );
-                               AddFormat( SOT_FORMATSTR_ID_SOLK );
-                               AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
-                               AddFormat( SOT_FORMATSTR_ID_FILECONTENT );
-                               AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR );
-                               AddFormat( 
SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR );
+                               AddFormat( SOT_FORMATSTR_ID_SOLK );
+                               AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
+                               AddFormat( SOT_FORMATSTR_ID_FILECONTENT );
+                               AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR );
+                               AddFormat( 
SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR );
                                eBufferType = (TransferBufferType)( 
TRNSFR_INETFLD | eBufferType );
                                nRet = sal_True;
                        }
@@ -943,15 +934,15 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
                        refDdeLink = new SwTrnsfrDdeLink( *this, *pWrtShell );
                }
 
-               //ObjectDescriptor wurde bereits aus der alten DocShell 
gefuellt.
+               //ObjectDescriptor wurde bereits aus der alten DocShell gefüllt.
                //Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
                //auch noch mit delayed rendering beantwortet werden.
                aObjDesc.mbCanLink = sal_False;
                Size aSz( OLESIZE );
                aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, 
MAP_100TH_MM );
 
-        PrepareOLE( aObjDesc );
-        AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
+               PrepareOLE( aObjDesc );
+               AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
 
                delete pWait;
        }
@@ -982,11 +973,11 @@ int SwTransferable::PrepareForCopy( sal_Bool bIsCut )
 
 int SwTransferable::Copy( sal_Bool bIsCut )
 {
-    int nRet = PrepareForCopy( bIsCut );
-    if ( nRet )
-    {
-        CopyToClipboard( &pWrtShell->GetView().GetEditWin() );
-    }
+       int nRet = PrepareForCopy( bIsCut );
+       if ( nRet )
+       {
+               CopyToClipboard( &pWrtShell->GetView().GetEditWin() );
+       }
        return nRet;
 }
 
@@ -994,15 +985,15 @@ int SwTransferable::Copy( sal_Bool bIsCut )
 
 int SwTransferable::CalculateAndCopy()
 {
-    if(!pWrtShell)
-        return 0;
-    SwWait aWait( *pWrtShell->GetView().GetDocShell(), true );
+       if(!pWrtShell)
+               return 0;
+       SwWait aWait( *pWrtShell->GetView().GetDocShell(), true );
 
        String aStr( pWrtShell->Calculate() );
 
        pClpDocFac = new SwDocFac;
-    SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
-    pWrtShell->Copy(pDoc, & aStr);
+       SwDoc *const pDoc = lcl_GetDoc(*pClpDocFac);
+       pWrtShell->Copy(pDoc, & aStr);
        eBufferType = TRNSFR_DOCUMENT;
        AddFormat( FORMAT_STRING );
 
@@ -1016,45 +1007,45 @@ int SwTransferable::CalculateAndCopy()
 int SwTransferable::CopyGlossary( SwTextBlocks& rGlossary,
                                                                        const 
String& rStr )
 {
-    if(!pWrtShell)
-        return 0;
-    SwWait aWait( *pWrtShell->GetView().GetDocShell(), true );
+       if(!pWrtShell)
+               return 0;
+       SwWait aWait( *pWrtShell->GetView().GetDocShell(), true );
 
        pClpDocFac = new SwDocFac;
-    SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac);
+       SwDoc *const pCDoc = lcl_GetDoc(*pClpDocFac);
 
        SwNodes& rNds = pCDoc->GetNodes();
        SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() );
        SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // gehe zum 1. ContentNode
        SwPaM aPam( *pCNd );
 
-       pCDoc->LockExpFlds();   // nie die Felder updaten - Text so belassen
+       pCDoc->LockExpFlds(); // nie die Felder updaten - Text so belassen
 
        pCDoc->InsertGlossary( rGlossary, rStr, aPam, 0 );
 
        // es wurde in der CORE eine neu angelegt (OLE-Objekte kopiert!)
-    aDocShellRef = pCDoc->GetTmpDocShell();
+       aDocShellRef = pCDoc->GetTmpDocShell();
        if( aDocShellRef.Is() )
                SwTransferable::InitOle( aDocShellRef, *pCDoc );
-    pCDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
+       pCDoc->SetTmpDocShell( (SfxObjectShell*)NULL );
 
        eBufferType = TRNSFR_DOCUMENT;
 
        //Wenn's einer braucht OLE'n wir ihm was.
        AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
-    AddFormat( FORMAT_RTF );
+       AddFormat( FORMAT_RTF );
        AddFormat( SOT_FORMATSTR_ID_HTML );
        AddFormat( FORMAT_STRING );
 
-       //ObjectDescriptor wurde bereits aus der alten DocShell gefuellt.
+       //ObjectDescriptor wurde bereits aus der alten DocShell gefüllt.
        //Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
        //auch noch mit delayed rendering beantwortet werden.
        aObjDesc.mbCanLink = sal_False;
        Size aSz( OLESIZE );
        aObjDesc.maSize = OutputDevice::LogicToLogic( aSz, MAP_TWIP, 
MAP_100TH_MM );
 
-    PrepareOLE( aObjDesc );
-    AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
+       PrepareOLE( aObjDesc );
+       AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
 
        CopyToClipboard( &pWrtShell->GetView().GetEditWin() );
 
@@ -1070,40 +1061,40 @@ static inline uno::Reference < XTransferable > * 
lcl_getTransferPointer ( uno::R
 sal_Bool SwTransferable::IsPaste( const SwWrtShell& rSh,
                                                          const 
TransferableDataHelper& rData )
 {
-    // Check the common case first: We can always paste our own data!
-    // #106503#: If _only_ the internal format can be pasted, this check will
-    // yield 'true', while the one below would give a (wrong) result 'false'.
+       // Check the common case first: We can always paste our own data!
+       // #106503#: If _only_ the internal format can be pasted, this check 
will
+       // yield 'true', while the one below would give a (wrong) result 
'false'.
 
-    bool bIsPaste = ( GetSwTransferable( rData ) != NULL );
+       bool bIsPaste = ( GetSwTransferable( rData ) != NULL );
 
-    // if it's not our own data, we need to have a closer look:
-    if( ! bIsPaste )
-    {
-        // determine the proper paste action, and return true if we find one
-        uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() 
);
+       // if it's not our own data, we need to have a closer look:
+       if( ! bIsPaste )
+       {
+               // determine the proper paste action, and return true if we 
find one
+               uno::Reference<XTransferable> xTransferable( 
rData.GetXTransferable() );
 
-        sal_uInt16 nDestination = SwTransferable::GetSotDestination( rSh );
-        sal_uInt16 nSourceOptions =
+               sal_uInt16 nDestination = SwTransferable::GetSotDestination( 
rSh );
+               sal_uInt16 nSourceOptions =
                                        (( EXCHG_DEST_DOC_TEXTFRAME == 
nDestination ||
                                           EXCHG_DEST_SWDOC_FREE_AREA == 
nDestination ||
                                           EXCHG_DEST_DOC_TEXTFRAME_WEB == 
nDestination ||
                                           EXCHG_DEST_SWDOC_FREE_AREA_WEB == 
nDestination )
                                                                        ? 
EXCHG_IN_ACTION_COPY
-                     : EXCHG_IN_ACTION_MOVE);
+                                        : EXCHG_IN_ACTION_MOVE);
 
-        sal_uLong nFormat;          // output param for GetExchangeAction
-        sal_uInt16 nEventAction;    // output param for GetExchangeAction
-        sal_uInt16 nAction = SotExchange::GetExchangeAction(
+               sal_uLong nFormat;          // output param for 
GetExchangeAction
+               sal_uInt16 nEventAction;    // output param for 
GetExchangeAction
+               sal_uInt16 nAction = SotExchange::GetExchangeAction(
                                                                
rData.GetDataFlavorExVector(),
                                                                nDestination,
-                                                               nSourceOptions, 
                        /* ?? */
+                                                               nSourceOptions, 
            /* ?? */
                                                                
EXCHG_IN_ACTION_DEFAULT,    /* ?? */
                                                                nFormat, 
nEventAction, 0,
                                                                
lcl_getTransferPointer ( xTransferable ) );
 
-        // if we find a suitable action, we can paste!
-        bIsPaste = (EXCHG_INOUT_ACTION_NONE != nAction);
-    }
+               // if we find a suitable action, we can paste!
+               bIsPaste = (EXCHG_INOUT_ACTION_NONE != nAction);
+       }
 
        return bIsPaste;
 }
@@ -1112,9 +1103,9 @@ sal_Bool SwTransferable::IsPaste( const SwWrtShell& rSh,
 
 int SwTransferable::Paste( SwWrtShell& rSh, TransferableDataHelper& rData )
 {
-    sal_uInt16 nEventAction, nAction=0,
+       sal_uInt16 nEventAction, nAction=0,
                   nDestination = SwTransferable::GetSotDestination( rSh );
-    sal_uLong nFormat = 0;
+       sal_uLong nFormat = 0;
 
        if( GetSwTransferable( rData ) )
        {
@@ -1122,24 +1113,24 @@ int SwTransferable::Paste( SwWrtShell& rSh, 
TransferableDataHelper& rData )
        }
        else
        {
-        sal_uInt16 nSourceOptions =
-                    (( EXCHG_DEST_DOC_TEXTFRAME == nDestination ||
-                    EXCHG_DEST_SWDOC_FREE_AREA == nDestination ||
-                    EXCHG_DEST_DOC_TEXTFRAME_WEB == nDestination ||
-                    EXCHG_DEST_SWDOC_FREE_AREA_WEB == nDestination )
-                                    ? EXCHG_IN_ACTION_COPY
-                                    : EXCHG_IN_ACTION_MOVE);
-        uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() 
);
-        nAction = SotExchange::GetExchangeAction(
-                                    rData.GetDataFlavorExVector(),
-                                    nDestination,
-                                    nSourceOptions,             /* ?? */
-                                    EXCHG_IN_ACTION_DEFAULT,    /* ?? */
-                                    nFormat, nEventAction, 0,
-                                    lcl_getTransferPointer ( xTransferable ) );
-       }
-
-       // special case for tables from draw application
+               sal_uInt16 nSourceOptions =
+                                       (( EXCHG_DEST_DOC_TEXTFRAME == 
nDestination ||
+                                       EXCHG_DEST_SWDOC_FREE_AREA == 
nDestination ||
+                                       EXCHG_DEST_DOC_TEXTFRAME_WEB == 
nDestination ||
+                                       EXCHG_DEST_SWDOC_FREE_AREA_WEB == 
nDestination )
+                                                                       ? 
EXCHG_IN_ACTION_COPY
+                                                                       : 
EXCHG_IN_ACTION_MOVE);
+               uno::Reference<XTransferable> xTransferable( 
rData.GetXTransferable() );
+               nAction = SotExchange::GetExchangeAction(
+                                                                       
rData.GetDataFlavorExVector(),
+                                                                       
nDestination,
+                                                                       
nSourceOptions,             /* ?? */
+                                                                       
EXCHG_IN_ACTION_DEFAULT,    /* ?? */
+                                                                       
nFormat, nEventAction, 0,
+                                                                       
lcl_getTransferPointer ( xTransferable ) );
+       }
+
+       // special case for tables from Draw application
        if( EXCHG_OUT_ACTION_INSERT_DRAWOBJ == (nAction & EXCHG_ACTION_MASK) )
        {
                if( rData.HasFormat( SOT_FORMAT_RTF ) )
@@ -1151,7 +1142,7 @@ int SwTransferable::Paste( SwWrtShell& rSh, 
TransferableDataHelper& rData )
 
        return EXCHG_INOUT_ACTION_NONE != nAction &&
                        SwTransferable::PasteData( rData, rSh, nAction, nFormat,
-                                        nDestination, sal_False, sal_False );
+                                                                               
nDestination, sal_False, sal_False );
 }
 
 // -----------------------------------------------------------------------
@@ -1168,7 +1159,7 @@ int SwTransferable::PasteData( TransferableDataHelper& 
rData,
        SwModule* pMod = SW_MOD();
 
        int nRet = 0;
-    bool bCallAutoCaption = false;
+       bool bCallAutoCaption = false;
 
        if( pPt )
        {
@@ -1185,7 +1176,7 @@ int SwTransferable::PasteData( TransferableDataHelper& 
rData,
                        case EXCHG_DEST_DOC_DRAWOBJ:
                        case EXCHG_DEST_DOC_URLBUTTON:
                        case EXCHG_DEST_DOC_GROUPOBJ:
-                               // Rahmen/Objecte selektieren
+                               // Rahmen/Objekte selektieren
                                SwTransferable::SetSelInShell( rSh, sal_True, 
pPt );
                                break;
 
@@ -1201,12 +1192,12 @@ int SwTransferable::PasteData( TransferableDataHelper& 
rData,
        else if( ( !GetSwTransferable( rData ) || bIsPasteFmt ) &&
                        !rSh.IsTableMode() && rSh.HasSelection() )
        {
-               // dann die Selektionen loeschen
+               // dann die Selektionen löschen
 
-               //Selektierten Inhalt loeschen,
+               //Selektierten Inhalt löschen,
                // - nicht bei Tabellen-Selektion
                // - nicht bei ReRead einer Grafik/DDEDaten
-               // - nicht bei D&D, fuer die richtige Selektion wurde im
+               // - nicht bei D&D, für die richtige Selektion wurde im
                //              Drop-Handler gesorgt
                sal_Bool bDelSel = sal_False;
                switch( nDestination )
@@ -1220,71 +1211,71 @@ int SwTransferable::PasteData( TransferableDataHelper& 
rData,
                }
 
                if( bDelSel )
-            // --> FME 2004-10-19 #i34830#
+                       // --> FME 2004-10-19 #i34830#
                        pAction = new SwTrnsfrActionAndUndo( &rSh, 
UNDO_PASTE_CLIPBOARD, NULL,
-                                                 sal_True );
-            // <--
-       }
-
-    SwTransferable *pTrans=0, *pTunneledTrans=GetSwTransferable( rData );
-//    uno::Reference<XUnoTunnel> xTunnel( rData.GetTransferable(), UNO_QUERY );
-//    if ( xTunnel.is() )
-//    {
-//        sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() );
-//        if ( nHandle )
-//            pTunneledTrans = (SwTransferable*) (sal_IntPtr) nHandle;
-//    }
-
-    // check for private drop
-    bool bPrivateDrop(pPt && (bPasteSelection ? 0 != (pTrans = 
pMod->pXSelection) : 0 != (pTrans = pMod->pDragDrop)));
-    bool bNeedToSelectBeforePaste(false);
-
-    if(bPrivateDrop && DND_ACTION_LINK == nDropAction)
-    {
-        // internal drop on object, suppress bPrivateDrop to change internal 
fill
-        bPrivateDrop = false;
-        bNeedToSelectBeforePaste = true;
-    }
-
-    if(bPrivateDrop && pPt && DND_ACTION_MOVE == nDropAction)
-    {
-        // check if dragged over a useful target. If yes, use as content 
exchange
-        // drop as if from external
-        const SwFrmFmt* pSwFrmFmt = rSh.GetFmtFromObj(*pPt);
-
-        if(pSwFrmFmt && 0 != dynamic_cast< const SwDrawFrmFmt* >(pSwFrmFmt))
-        {
-            bPrivateDrop = false;
-            bNeedToSelectBeforePaste = true;
-        }
-    }
-
-    if(bPrivateDrop)
+                                                                               
                 sal_True );
+                       // <--
+       }
+
+       SwTransferable *pTrans=0, *pTunneledTrans=GetSwTransferable( rData );
+//     uno::Reference<XUnoTunnel> xTunnel( rData.GetTransferable(), UNO_QUERY 
);
+//     if ( xTunnel.is() )
+//     {
+//             sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() );
+//             if ( nHandle )
+//                     pTunneledTrans = (SwTransferable*) (sal_IntPtr) nHandle;
+//     }
+
+       // check for private drop
+       bool bPrivateDrop(pPt && (bPasteSelection ? 0 != (pTrans = 
pMod->pXSelection) : 0 != (pTrans = pMod->pDragDrop)));
+       bool bNeedToSelectBeforePaste(false);
+
+       if(bPrivateDrop && DND_ACTION_LINK == nDropAction)
+       {
+               // internal drop on object, suppress bPrivateDrop to change 
internal fill
+               bPrivateDrop = false;
+               bNeedToSelectBeforePaste = true;
+       }
+
+       if(bPrivateDrop && pPt && DND_ACTION_MOVE == nDropAction)
+       {
+               // check if dragged over a useful target. If yes, use as 
content exchange
+               // drop as if from external
+               const SwFrmFmt* pSwFrmFmt = rSh.GetFmtFromObj(*pPt);
+
+               if(pSwFrmFmt && 0 != dynamic_cast< const SwDrawFrmFmt* 
>(pSwFrmFmt))
+               {
+                       bPrivateDrop = false;
+                       bNeedToSelectBeforePaste = true;
+               }
+       }
+
+       if(bPrivateDrop)
        {
                // then internal Drag & Drop or XSelection
                nRet = pTrans->PrivateDrop( rSh, *pPt, DND_ACTION_MOVE == 
nDropAction,
                                                                        
bPasteSelection );
        }
-    else if( !pPt && pTunneledTrans &&
+       else if( !pPt && pTunneledTrans &&
                        EXCHG_OUT_ACTION_INSERT_PRIVATE == nAction )
        {
                // then internal paste
-        nRet = pTunneledTrans->PrivatePaste( rSh );
+               nRet = pTunneledTrans->PrivatePaste( rSh );
        }
        else if( EXCHG_INOUT_ACTION_NONE != nAction )
        {
                if( !pAction )
-        {
-            // #111827#
+               {
+                       // #111827#
                        pAction = new SwTrnsfrActionAndUndo( &rSh, 
UNDO_PASTE_CLIPBOARD);
-        }
+               }
 
-               // im Drag&Drop duerfen keine MessageBoxen angezeigt werden
+               // im Drag&Drop dürfen keine MessageBoxen angezeigt werden
                sal_Bool bMsg = 0 == pPt;
-        sal_uInt8 nActionFlags = static_cast< sal_uInt8 >(( nAction >> 8 ) & 
0xFF);
+               sal_uInt8 nActionFlags = static_cast< sal_uInt8 >(( nAction >> 
8 ) & 0xFF);
 
                sal_uInt16 nClearedAction = ( nAction & EXCHG_ACTION_MASK );
-               // Selektionen loeschen
+               // Selektionen löschen
 
                switch( nClearedAction )
                {
@@ -1296,7 +1287,6 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_INSERT_PRIVATE: was soll 
hier passieren?" );
 ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll hier passieren?" );
                        break;
 
-
                case EXCHG_IN_ACTION_MOVE:
                case EXCHG_IN_ACTION_COPY:
                case EXCHG_IN_ACTION_LINK:
@@ -1305,7 +1295,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
                case EXCHG_OUT_ACTION_INSERT_IMAGEMAP:
                case EXCHG_OUT_ACTION_REPLACE_IMAGEMAP:
 
-                       // dann muss ueber das Format gegangen werden
+                       // dann muss über das Format gegangen werden
                        switch( nFormat )
                        {
                        case SOT_FORMATSTR_ID_DRAWING:
@@ -1346,7 +1336,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
 
                        case SOT_FORMATSTR_ID_SVXB:
                        case SOT_FORMAT_BITMAP:
-            case SOT_FORMATSTR_ID_PNG:
+                       case SOT_FORMATSTR_ID_PNG:
                        case SOT_FORMAT_GDIMETAFILE:
                                nRet = SwTransferable::_PasteGrf( rData, rSh, 
nFormat,
                                                                                
                SW_PASTESDR_INSERT,pPt,
@@ -1373,7 +1363,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
                                break;
 
                        case SOT_FORMAT_FILE_LIST:
-                               // dann nur als Grafiken einfuegen
+                               // dann nur als Grafiken einfügen
                                nRet = SwTransferable::_PasteFileList( rData, 
rSh,
                                                                        
EXCHG_IN_ACTION_LINK == nClearedAction,
                                                                        pPt, 
bMsg );
@@ -1385,16 +1375,16 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
                                        NaviContentBookmark aBkmk;
                                        if( aBkmk.Paste( rData ) )
                                        {
-                        if(bIsDefault)
-                        {
-                            switch(aBkmk.GetDefaultDragType())
-                            {
-                                case REGION_MODE_NONE: nClearedAction = 
EXCHG_IN_ACTION_COPY; break;
-                                case REGION_MODE_EMBEDDED: nClearedAction = 
EXCHG_IN_ACTION_MOVE; break;
-                                case REGION_MODE_LINK: nClearedAction = 
EXCHG_IN_ACTION_LINK; break;
-                            }
-                        }
-                        rSh.NavigatorPaste( aBkmk, nClearedAction );
+                                               if(bIsDefault)
+                                               {
+                                                       
switch(aBkmk.GetDefaultDragType())
+                                                       {
+                                                               case 
REGION_MODE_NONE: nClearedAction = EXCHG_IN_ACTION_COPY; break;
+                                                               case 
REGION_MODE_EMBEDDED: nClearedAction = EXCHG_IN_ACTION_MOVE; break;
+                                                               case 
REGION_MODE_LINK: nClearedAction = EXCHG_IN_ACTION_LINK; break;
+                                                       }
+                                               }
+                                               rSh.NavigatorPaste( aBkmk, 
nClearedAction );
                                                nRet = 1;
                                        }
                                }
@@ -1408,7 +1398,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
                                break;
 
                        default:
-                               ASSERT( pPt, "unbekanntes Format" );
+                               ASSERT( pPt, "unknown format" );
                        }
                        break;
 
@@ -1417,8 +1407,8 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
                                                                                
SW_PASTESDR_INSERT, pPt,
                                                                                
nActionFlags, bMsg );
                        if( nRet & SWTRANSFER_GRAPHIC_INSERTED )
-                bCallAutoCaption = true;
-            break;
+                               bCallAutoCaption = true;
+                       break;
 
                case EXCHG_OUT_ACTION_INSERT_OLE:
                        nRet = SwTransferable::_PasteOLE( rData, rSh, nFormat,
@@ -1475,7 +1465,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
                        case SOT_FORMATSTR_ID_SVXB:
                        case SOT_FORMAT_GDIMETAFILE:
                        case SOT_FORMAT_BITMAP:
-            case SOT_FORMATSTR_ID_PNG:
+                       case SOT_FORMATSTR_ID_PNG:
                        case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK:
                        case SOT_FORMAT_FILE:
                        case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR:
@@ -1485,7 +1475,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
                                                                                
                nActionFlags, nDropAction, bNeedToSelectBeforePaste);
                                break;
                        default:
-                               ASSERT( sal_False, "unbekanntes Format" );
+                               ASSERT( sal_False, "unknown format" );
                        }
 
                        break;
@@ -1524,7 +1514,7 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
                        break;
 
                default:
-                       ASSERT( sal_False, "unbekannte Action" );
+                       ASSERT( sal_False, "unknown action" );
                }
        }
 
@@ -1537,8 +1527,8 @@ ASSERT( pPt, "EXCHG_OUT_ACTION_MOVE_PRIVATE: was soll 
hier passieren?" );
 
        if( pAction )
                delete pAction;
-    if( bCallAutoCaption )
-        rSh.GetView().AutoCaption( GRAPHIC_CAP );
+       if( bCallAutoCaption )
+               rSh.GetView().AutoCaption( GRAPHIC_CAP );
 
        return nRet;
 }
@@ -1598,11 +1588,11 @@ sal_uInt16 SwTransferable::GetSotDestination( const 
SwWrtShell& rSh,
        case OBJCNT_OLE:                nRet = EXCHG_DEST_DOC_OLEOBJ;           
break;
 
        case OBJCNT_CONTROL:    /* no Action avail */
-       case OBJCNT_SIMPLE:             nRet = EXCHG_DEST_DOC_DRAWOBJ;          
break;
-       case OBJCNT_URLBUTTON:  nRet = EXCHG_DEST_DOC_URLBUTTON;        break;
+       case OBJCNT_SIMPLE:             nRet = EXCHG_DEST_DOC_DRAWOBJ;          
break;
+       case OBJCNT_URLBUTTON:  nRet = EXCHG_DEST_DOC_URLBUTTON;        break;
        case OBJCNT_GROUPOBJ:   nRet = EXCHG_DEST_DOC_GROUPOBJ;         break;
 
-// was mmchen wir bei Mehrfachselektion???
+// was machen wir bei Mehrfachselektion???
 //     case OBJCNT_DONTCARE:
        default:
                {
@@ -1670,16 +1660,16 @@ int SwTransferable::_PasteFileContent( 
TransferableDataHelper& rData,
                if( rData.GetSotStorageStream( nFmt, xStrm ) )
                {
                        if( ( SOT_FORMATSTR_ID_HTML_SIMPLE == nFmt ) ||
-                ( SOT_FORMATSTR_ID_HTML_NO_COMMENT == nFmt ) )
+                               ( SOT_FORMATSTR_ID_HTML_NO_COMMENT == nFmt ) )
                        {
                                pStream = aMSE40ClpObj.IsValid( *xStrm );
                                pRead = ReadHTML;
                                pRead->SetReadUTF8( sal_True );
-                //pRead->SetBaseURL( aMSE40ClpObj.GetBaseURL() );
+                               //pRead->SetBaseURL( aMSE40ClpObj.GetBaseURL() 
);
 
-                sal_Bool bNoComments =
-                    ( nFmt == SOT_FORMATSTR_ID_HTML_NO_COMMENT );
-                pRead->SetIgnoreHTMLComments( bNoComments );
+                               sal_Bool bNoComments =
+                                       ( nFmt == 
SOT_FORMATSTR_ID_HTML_NO_COMMENT );
+                               pRead->SetIgnoreHTMLComments( bNoComments );
                        }
                        else
                        {
@@ -1687,10 +1677,10 @@ int SwTransferable::_PasteFileContent( 
TransferableDataHelper& rData,
                                if( SOT_FORMAT_RTF == nFmt )
                                        pRead = SwReaderWriter::GetReader( 
READER_WRITER_RTF );
                                else if( !pRead )
-                {
+                               {
                                        pRead = ReadHTML;
-                               pRead->SetReadUTF8( sal_True );
-                }
+                                       pRead->SetReadUTF8( sal_True );
+                               }
                        }
                }
                break;
@@ -1701,7 +1691,7 @@ int SwTransferable::_PasteFileContent( 
TransferableDataHelper& rData,
                Link aOldLink( rSh.GetChgLnk() );
                rSh.SetChgLnk( Link() );
 
-        const SwPosition& rInsPos = *rSh.GetCrsr()->Start();
+               const SwPosition& rInsPos = *rSh.GetCrsr()->Start();
                SwReader aReader( *pStream, aEmptyStr, String(), *rSh.GetCrsr() 
);
                rSh.SaveTblBoxCntnt( &rInsPos );
                if( IsError( aReader.Read( *pRead )) )
@@ -1734,12 +1724,12 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
 {
        int nRet = 0;
        TransferableObjectDescriptor aObjDesc;
-    uno::Reference < io::XInputStream > xStrm;
-    uno::Reference < embed::XStorage > xStore;
+       uno::Reference < io::XInputStream > xStrm;
+       uno::Reference < embed::XStorage > xStore;
        Reader* pRead = 0;
 
-    // Get the preferred format
-    SotFormatStringId nId;
+       // Get the preferred format
+       SotFormatStringId nId;
        if( rData.HasFormat( SOT_FORMATSTR_ID_EMBEDDED_OBJ ) )
                nId = SOT_FORMATSTR_ID_EMBEDDED_OBJ;
        else if( rData.HasFormat( SOT_FORMATSTR_ID_EMBED_SOURCE ) &&
@@ -1748,61 +1738,61 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
        else
                nId = 0;
 
-    if( nId && rData.GetInputStream( nId, xStrm ) && xStrm.is() )
-       {
-        // if there is an embedded object, first try if it's a writer object
-        // this will be inserted into the document by using a Reader
-        try
-        {
-            xStore = comphelper::OStorageHelper::GetStorageFromInputStream( 
xStrm );
-            switch( SotStorage::GetFormatID( xStore ) )
-            {
-                case SOT_FORMATSTR_ID_STARWRITER_60:
-                case SOT_FORMATSTR_ID_STARWRITERWEB_60:
-                case SOT_FORMATSTR_ID_STARWRITERGLOB_60:
+       if( nId && rData.GetInputStream( nId, xStrm ) && xStrm.is() )
+       {
+               // if there is an embedded object, first try if it's a Writer 
object
+               // this will be inserted into the document by using a Reader
+               try
+               {
+                       xStore = 
comphelper::OStorageHelper::GetStorageFromInputStream( xStrm );
+                       switch( SotStorage::GetFormatID( xStore ) )
+                       {
+                               case SOT_FORMATSTR_ID_STARWRITER_60:
+                               case SOT_FORMATSTR_ID_STARWRITERWEB_60:
+                               case SOT_FORMATSTR_ID_STARWRITERGLOB_60:
                                case SOT_FORMATSTR_ID_STARWRITER_8:
                                case SOT_FORMATSTR_ID_STARWRITERWEB_8:
                                case SOT_FORMATSTR_ID_STARWRITERGLOB_8:
-                    pRead = ReadXML;
-                    break;
-                default:
-                    try
-                    {
-                        uno::Reference < lang::XComponent > xComp( xStore, 
uno::UNO_QUERY );
-                        xComp->dispose();
-                        xStore = 0;
-                    }
-                    catch ( uno::Exception& )
-                    {
-                    }
-
-                    break;
-            }
-        }
-        catch ( uno::Exception& )
-        {
-            // it wasn't a storage, but maybe it's a useful stream
-        }
-
-        nFmt = nId;
-       }
-
-    if( pRead )
+                                       pRead = ReadXML;
+                                       break;
+                               default:
+                                       try
+                                       {
+                                               uno::Reference < 
lang::XComponent > xComp( xStore, uno::UNO_QUERY );
+                                               xComp->dispose();
+                                               xStore = 0;
+                                       }
+                                       catch ( uno::Exception& )
+                                       {
+                                       }
+
+                                       break;
+                       }
+               }
+               catch ( uno::Exception& )
+               {
+                       // it wasn't a storage, but maybe it's a useful stream
+               }
+
+               nFmt = nId;
+       }
+
+       if( pRead )
        {
                SwPaM &rPAM = *rSh.GetCrsr();
-        SwReader aReader( xStore, aEmptyStr, rPAM );
-        if( !IsError( aReader.Read( *pRead )) )
-            nRet = 1;
-        else if( bMsg )
-            InfoBox( 0, SW_RES(ERR_CLPBRD_READ) ).Execute();
+               SwReader aReader( xStore, aEmptyStr, rPAM );
+               if( !IsError( aReader.Read( *pRead )) )
+                       nRet = 1;
+               else if( bMsg )
+                       InfoBox( 0, SW_RES(ERR_CLPBRD_READ) ).Execute();
        }
-    else
+       else
        {
-               // temporary storage until the object is inserted
+               // temporary storage until the object is inserted
                uno::Reference< embed::XStorage > xTmpStor;
-        uno::Reference < embed::XEmbeddedObject > xObj;
-        ::rtl::OUString aName;
-               comphelper::EmbeddedObjectContainer aCnt;
+               uno::Reference < embed::XEmbeddedObject > xObj;
+               ::rtl::OUString aName;
+               comphelper::EmbeddedObjectContainer aCnt;
 
                if ( xStrm.is() )
                {
@@ -1814,9 +1804,9 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                else
                {
                        if( rData.HasFormat( nFmt = 
SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE ) && 
rData.GetTransferableObjectDescriptor( nFmt, aObjDesc ) )
-                       {
-               if ( !rData.GetInputStream( SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, 
xStrm ) )
-                       rData.GetInputStream( 
SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, xStrm );
+                       {
+                               if ( !rData.GetInputStream( 
SOT_FORMATSTR_ID_EMBED_SOURCE_OLE, xStrm ) )
+                                       rData.GetInputStream( 
SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE, xStrm );
 
                                if ( !xStrm.is() )
                                {
@@ -1842,12 +1832,12 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                                        {}
                                }
                        }
-       }
+               }
 
                if ( xStrm.is() && !xObj.is() )
-               xObj = aCnt.InsertEmbeddedObject( xStrm, aName );
+                       xObj = aCnt.InsertEmbeddedObject( xStrm, aName );
 
-        if( xObj.is() )
+               if( xObj.is() )
                {
                        svt::EmbeddedObjectRef xObjRef( xObj, 
aObjDesc.mnViewAspect );
 
@@ -1858,7 +1848,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
 // (wg. Selection Manager bei Trustet Solaris)
 #ifndef SOLARIS
 /*
-            if( rData.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) )
+                       if( rData.GetGraphic( SOT_FORMATSTR_ID_SVXB, aGraphic ) 
)
                                nGrFormat = SOT_FORMATSTR_ID_SVXB;
                        else if( rData.GetGraphic( FORMAT_GDIMETAFILE, aGraphic 
) )
                                nGrFormat = SOT_FORMAT_GDIMETAFILE;
@@ -1872,7 +1862,7 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                        {
                                datatransfer::DataFlavor aDataFlavor;
                                SotExchange::GetFormatDataFlavor( nGrFormat, 
aDataFlavor );
-                       xObjRef.SetGraphic( aGraphic, aDataFlavor.MimeType );
+                               xObjRef.SetGraphic( aGraphic, 
aDataFlavor.MimeType );
                        }
                        else if ( aObjDesc.mnViewAspect == 
embed::Aspects::MSOLE_ICON )
                        {
@@ -1883,15 +1873,15 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                                MapMode aMapMode( MAP_100TH_MM );
                                aGraphic.SetPrefSize( Size( 2500, 2500 ) );
                                aGraphic.SetPrefMapMode( aMapMode );
-                       xObjRef.SetGraphic( aGraphic, aMimeType );
+                               xObjRef.SetGraphic( aGraphic, aMimeType );
                        }
 
-                       //Size einstellen. Ist ein Hack wg. Auslieferung, die 
Size sollte
-                       //an das InsertOle uebergeben werden!!!!!!!!!!
+                       // Size einstellen. Ist ein Hack wg. Auslieferung, die 
Size sollte
+                       // an das InsertOle übergeben werden!!!!!!!!!!
                        Size aSize;
                        if ( aObjDesc.mnViewAspect == 
embed::Aspects::MSOLE_ICON )
                        {
-                       if( aObjDesc.maSize.Width() && aObjDesc.maSize.Height() 
)
+                               if( aObjDesc.maSize.Width() && 
aObjDesc.maSize.Height() )
                                        aSize = aObjDesc.maSize;
                                else
                                {
@@ -1901,10 +1891,10 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                        }
                        else if( aObjDesc.maSize.Width() && 
aObjDesc.maSize.Height() )
                        {
-               aSize = Size( aObjDesc.maSize );    //immer 100TH_MM
-                MapUnit aUnit = VCLUnoHelper::UnoEmbed2VCLMapUnit( 
xObj->getMapUnit( aObjDesc.mnViewAspect ) );
-                aSize = OutputDevice::LogicToLogic( aSize, MAP_100TH_MM, aUnit 
);
-                awt::Size aSz;
+                               aSize = Size( aObjDesc.maSize ); //immer 
100TH_MM
+                               MapUnit aUnit = 
VCLUnoHelper::UnoEmbed2VCLMapUnit( xObj->getMapUnit( aObjDesc.mnViewAspect ) );
+                               aSize = OutputDevice::LogicToLogic( aSize, 
MAP_100TH_MM, aUnit );
+                               awt::Size aSz;
                                try
                                {
                                        aSz = xObj->getVisualAreaSize( 
aObjDesc.mnViewAspect );
@@ -1916,9 +1906,9 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
 
                                if ( aSz.Width != aSize.Width() || aSz.Height 
!= aSize.Height() )
                                {
-                       aSz.Width = aSize.Width();
-                       aSz.Height = aSize.Height();
-                       xObj->setVisualAreaSize( aObjDesc.mnViewAspect, aSz );
+                                       aSz.Width = aSize.Width();
+                                       aSz.Height = aSize.Height();
+                                       xObj->setVisualAreaSize( 
aObjDesc.mnViewAspect, aSz );
                                }
                        }
                        else
@@ -1934,9 +1924,9 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                                {
                                }
                        }
-                       //Ende mit Hack!
+                       // Ende mit Hack!
 
-            rSh.InsertOleObject( xObjRef );
+                       rSh.InsertOleObject( xObjRef );
                        nRet = 1;
 
                        if( nRet && ( nActionFlags &
@@ -1950,9 +1940,6 @@ int SwTransferable::_PasteOLE( TransferableDataHelper& 
rData, SwWrtShell& rSh,
        return nRet;
 }
 
-// -----------------------------------------------------------------------
-
-
 // -----------------------------------------------------------------------
 
 int SwTransferable::_PasteTargetURL( TransferableDataHelper& rData,
@@ -1971,7 +1958,7 @@ int SwTransferable::_PasteTargetURL( 
TransferableDataHelper& rData,
                        String sURL( aINetImg.GetImageURL() );
                        SwTransferable::_CheckForURLOrLNKFile( rData, sURL );
 
-                       //!!! auf FileSystem abpruefen - nur dann ist es 
sinnvoll die
+                       //!!! auf FileSystem abprüfen - nur dann ist es 
sinnvoll die
                        // Grafiken zu testen !!!!
                        Graphic aGrf;
                        GraphicFilter *pFlt = GraphicFilter::GetGraphicFilter();
@@ -2034,7 +2021,6 @@ int SwTransferable::_PasteTargetURL( 
TransferableDataHelper& rData,
        return nRet;
 }
 
-
 // -----------------------------------------------------------------------
 
 void SwTransferable::SetSelInShell( SwWrtShell& rSh, sal_Bool bSelectFrm,
@@ -2042,8 +2028,8 @@ void SwTransferable::SetSelInShell( SwWrtShell& rSh, 
sal_Bool bSelectFrm,
 {
        if( bSelectFrm )
        {
-               // Rahmen/Objecte selektieren
-        if( pPt && !rSh.GetView().GetViewFrame()->GetDispatcher()->IsLocked() )
+               // Rahmen/Objekte selektieren
+               if( pPt && 
!rSh.GetView().GetViewFrame()->GetDispatcher()->IsLocked() )
                {
                        rSh.GetView().NoRotate();
                        if( rSh.SelectObj( *pPt ))
@@ -2087,16 +2073,16 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& 
rData,
                {
                        ASSERT( !&rWrtShell, "DDE Data not found." );
                        return 0;
-               }       //sinnvollen Fehler melden!!
+               }       // sinnvollen Fehler melden!!
 
-        rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
-        xStrm->ReadCString( aApp, eEncoding );
-        xStrm->ReadCString( aTopic, eEncoding );
-        xStrm->ReadCString( aItem, eEncoding );
+               rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
+               xStrm->ReadCString( aApp, eEncoding );
+               xStrm->ReadCString( aTopic, eEncoding );
+               xStrm->ReadCString( aItem, eEncoding );
        }
 
        String aCmd;
-    sfx2::MakeLnkName( aCmd, &aApp, aTopic, aItem );
+       sfx2::MakeLnkName( aCmd, &aApp, aTopic, aItem );
 
        // wollen wir jetzt eine Grafik einlesen ?
        sal_uLong nFormat;
@@ -2120,7 +2106,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& 
rData,
                return nRet;
        }
 
-    SwFieldType* pTyp = 0;
+       SwFieldType* pTyp = 0;
        sal_uInt16 i = 1,j;
        String aName;
        sal_Bool bAlreadyThere = sal_False, bDoublePaste = sal_False;
@@ -2137,7 +2123,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& 
rData,
                        {
                                String sTmp( ((SwDDEFieldType*)pTyp)->GetCmd() 
);
                                if( rColl.isEqual( sTmp, aCmd ) &&
-                    sfx2::LINKUPDATE_ALWAYS == 
((SwDDEFieldType*)pTyp)->GetType() )
+                                       sfx2::LINKUPDATE_ALWAYS == 
((SwDDEFieldType*)pTyp)->GetType() )
                                {
                                        aName = pTyp->GetName();
                                        bDoublePaste = sal_True;
@@ -2159,20 +2145,19 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& 
rData,
 
        if( !bDoublePaste )
        {
-        SwDDEFieldType aType( aName, aCmd, sfx2::LINKUPDATE_ALWAYS );
+               SwDDEFieldType aType( aName, aCmd, sfx2::LINKUPDATE_ALWAYS );
                pTyp = rWrtShell.InsertFldType( aType );
        }
 
-
        SwDDEFieldType* pDDETyp = (SwDDEFieldType*)pTyp;
 
        String aExpand;
        if( rData.GetString( FORMAT_STRING, aExpand ))
        {
-               do {                    // middle checked loop
+               do { // middle checked loop
 
                        // Wenn die Daten von einer Tabellenkalkulation kommen
-                       // fuegen wir eine DDE-Tabelle ein
+                       // fügen wir eine DDE-Tabelle ein
                        if( ( rData.HasFormat( SOT_FORMATSTR_ID_SYLK ) ||
                                  rData.HasFormat( 
SOT_FORMATSTR_ID_SYLK_BIGCAPS ) ) &&
                                aExpand.Len() &&
@@ -2195,22 +2180,22 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& 
rData,
                                        break;
                                }
 
-                rWrtShell.InsertDDETable(
-                    SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ), // 
TODO MULTIHEADER
-                    pDDETyp, nRows, nCols );
+                               rWrtShell.InsertDDETable(
+                                       SwInsertTableOptions( 
tabopts::HEADLINE_NO_BORDER, 1 ), // TODO MULTIHEADER
+                                       pDDETyp, nRows, nCols );
                        }
                        else if( 1 < aExpand.GetTokenCount( '\n' ) )
                        {
-                               // mehrere Absaetze -> eine geschuetzte Section 
einfuegen
+                               // mehrere Absätze -> eine geschützte Section 
einfügen
                                if( rWrtShell.HasSelection() )
                                        rWrtShell.DelRight();
 
-                SwSectionData aSect( DDE_LINK_SECTION, aName );
+                               SwSectionData aSect( DDE_LINK_SECTION, aName );
                                aSect.SetLinkFileName( aCmd );
-                aSect.SetProtectFlag(true);
+                               aSect.SetProtectFlag(true);
                                rWrtShell.InsertSection( aSect );
 
-                               pDDETyp = 0;                            // 
FeldTypen wieder entfernen
+                               pDDETyp = 0; // FeldTypen wieder entfernen
                        }
                        else
                        {
@@ -2222,7 +2207,7 @@ int SwTransferable::_PasteDDE( TransferableDataHelper& 
rData,
                } while( sal_False );
        }
        else
-               pDDETyp = 0;                                            // 
FeldTypen wieder entfernen
+               pDDETyp = 0; // FeldTypen wieder entfernen
 
        if( !pDDETyp && !bDoublePaste )
        {
@@ -2250,12 +2235,12 @@ int SwTransferable::_PasteSdrFormat(  
TransferableDataHelper& rData,
        {
                xStrm->SetVersion( SOFFICE_FILEFORMAT_50 );
 
-        if(bNeedToSelectBeforePaste && pPt)
-        {
-            // if this is an internal drag, need to set the target right 
(select it), else
-            // still the source will be selected
-            SwTransferable::SetSelInShell( rSh, sal_True, pPt );
-        }
+               if(bNeedToSelectBeforePaste && pPt)
+               {
+                       // if this is an internal drag, need to set the target 
right (select it), else
+                       // still the source will be selected
+                       SwTransferable::SetSelInShell( rSh, sal_True, pPt );
+               }
 
                rSh.Paste( *xStrm, nAction, pPt );
                nRet = 1;
@@ -2282,23 +2267,23 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
        switch( nFmt )
        {
        case SOT_FORMAT_BITMAP:
-    case SOT_FORMATSTR_ID_PNG:
+       case SOT_FORMATSTR_ID_PNG:
        case SOT_FORMAT_GDIMETAFILE:
                nRet = rData.GetGraphic( nFmt, aGrf );
                break;
 
-    case SOT_FORMATSTR_ID_SVXB:
-    {
-        SotStorageStreamRef xStm;
+       case SOT_FORMATSTR_ID_SVXB:
+       {
+               SotStorageStreamRef xStm;
 
-        if(rData.GetSotStorageStream(SOT_FORMATSTR_ID_SVXB, xStm))
-        {
-            *xStm >> aGrf;
-            nRet = (GRAPHIC_NONE != aGrf.GetType() && GRAPHIC_DEFAULT != 
aGrf.GetType());
-        }
+               if(rData.GetSotStorageStream(SOT_FORMATSTR_ID_SVXB, xStm))
+               {
+                       *xStm >> aGrf;
+                       nRet = (GRAPHIC_NONE != aGrf.GetType() && 
GRAPHIC_DEFAULT != aGrf.GetType());
+               }
 
-        break;
-    }
+               break;
+       }
 
        case SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK:
        case SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR:
@@ -2327,9 +2312,9 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                                String sDesc;
                                SwTransferable::_CheckForURLOrLNKFile( rData, 
sTxt, &sDesc );
 
-                aBkmk = INetBookmark(
-                        URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link(), 
false ),
-                        sDesc );
+                               aBkmk = INetBookmark(
+                                               
URIHelper::SmartRel2Abs(INetURLObject(), sTxt, Link(), false ),
+                                               sDesc );
                                bCheckForGrf = sal_True;
                                bCheckForImageMap = SW_PASTESDR_REPLACE == 
nAction;
                        }
@@ -2343,7 +2328,7 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
 
        if( bCheckForGrf )
        {
-               //!!! auf FileSystem abpruefen - nur dann ist es sinnvoll die
+               //!!! auf FileSystem abprüfen - nur dann ist es sinnvoll die
                // Grafiken zu testen !!!!
                GraphicFilter *pFlt = GraphicFilter::GetGraphicFilter();
                nRet = GRFILTER_OK == GraphicFilter::LoadGraphic( 
aBkmk.GetURL(), aEmptyStr,
@@ -2359,96 +2344,96 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                }
        }
 
-    if(pPt && bNeedToSelectBeforePaste)
-    {
-        // when using internal D&Ds, still the source object is selected and
-        // this is necessary to get the correct source data which is also
-        // dependent from selection. After receiving the drag data it is
-        // now tiime to select the correct target object
-        SwTransferable::SetSelInShell( rSh, sal_True, pPt );
-    }
+       if(pPt && bNeedToSelectBeforePaste)
+       {
+               // when using internal D&Ds, still the source object is 
selected and
+               // this is necessary to get the correct source data which is 
also
+               // dependent from selection. After receiving the drag data it is
+               // now time to select the correct target object
+               SwTransferable::SetSelInShell( rSh, sal_True, pPt );
+       }
 
        if( nRet )
        {
-        String sURL;
-
-        if( rSh.GetView().GetDocShell()->ISA(SwWebDocShell)
-            // #123922# if link action is noted, also take URL
-            || DND_ACTION_LINK == nDropAction)
-        {
-            sURL = aBkmk.GetURL();
-        }
-
-        switch( nAction )
-        {
-            case SW_PASTESDR_INSERT:
-            {
-                SwTransferable::SetSelInShell( rSh, sal_False, pPt );
-                rSh.Insert( sURL, aEmptyStr, aGrf );
-                break;
-            }
-
-            case SW_PASTESDR_REPLACE:
-            {
-                if( rSh.IsObjSelected() )
-                {
-                    // #123922# for D&D on draw objects, do for now the same 
for
-                    // SW_PASTESDR_REPLACE (D&D) as for SW_PASTESDR_SETATTR 
(D&D and
-                    // CTRL+SHIFT). The code below replaces the draw object 
with
-                    // a writer graphic; maybe this is an option later again 
if wanted
-                    rSh.Paste( aGrf, sURL );
-
-                    // rSh.ReplaceSdrObj( sURL, aEmptyStr, &aGrf );
-                    // Point aPt( pPt ? *pPt : rSh.GetCrsrDocPos() );
-                    // SwTransferable::SetSelInShell( rSh, sal_True, &aPt );
-                }
-                else
-                {
-                    // set graphic at writer graphic without link
-                    rSh.ReRead( sURL, aEmptyStr, &aGrf );
-                }
-
-                break;
-            }
-
-            case SW_PASTESDR_SETATTR:
-            {
-                if( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK == nFmt )
-                {
-                    if( rSh.IsFrmSelected() )
-                    {
-                        SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
-                        rSh.GetFlyFrmAttr( aSet );
-                        SwFmtURL aURL( (SwFmtURL&)aSet.Get( RES_URL ) );
-                        aURL.SetURL( aBkmk.GetURL(), sal_False );
-                        aSet.Put( aURL );
-                        rSh.SetFlyFrmAttr( aSet );
-                    }
-                }
-                else if( rSh.IsObjSelected() )
-                {
-                    // set as attribute at DrawObject
-                    rSh.Paste( aGrf, sURL );
-                }
-                else if( OBJCNT_GRF == rSh.GetObjCntTypeOfSelection() )
-                {
-                    // set as linked graphic at writer graphic frame
-                    rSh.ReRead( sURL, aEmptyStr, &aGrf );
-                }
-                else
-                {
-                    SwTransferable::SetSelInShell( rSh, sal_False, pPt );
-                    rSh.Insert( aBkmk.GetURL(), aEmptyStr, aGrf );
-                }
-                break;
-            }
-            default:
-            {
-                nRet = 0;
-                break;
-            }
-        }
-    }
+               String sURL;
+
+               if( rSh.GetView().GetDocShell()->ISA(SwWebDocShell)
+                       // #123922# if link action is noted, also take URL
+                       || DND_ACTION_LINK == nDropAction)
+               {
+                       sURL = aBkmk.GetURL();
+               }
+
+               switch( nAction )
+               {
+                       case SW_PASTESDR_INSERT:
+                       {
+                               SwTransferable::SetSelInShell( rSh, sal_False, 
pPt );
+                               rSh.Insert( sURL, aEmptyStr, aGrf );
+                               break;
+                       }
+
+                       case SW_PASTESDR_REPLACE:
+                       {
+                               if( rSh.IsObjSelected() )
+                               {
+                                       // #123922# for D&D on draw objects, do 
for now the same for
+                                       // SW_PASTESDR_REPLACE (D&D) as for 
SW_PASTESDR_SETATTR (D&D and
+                                       // CTRL+SHIFT). The code below replaces 
the draw object with
+                                       // a writer graphic; maybe this is an 
option later again if wanted
+                                       rSh.Paste( aGrf, sURL );
+
+                                       // rSh.ReplaceSdrObj( sURL, aEmptyStr, 
&aGrf );
+                                       // Point aPt( pPt ? *pPt : 
rSh.GetCrsrDocPos() );
+                                       // SwTransferable::SetSelInShell( rSh, 
sal_True, &aPt );
+                               }
+                               else
+                               {
+                                       // set graphic at writer graphic 
without link
+                                       rSh.ReRead( sURL, aEmptyStr, &aGrf );
+                               }
+
+                               break;
+                       }
+
+                       case SW_PASTESDR_SETATTR:
+                       {
+                               if( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK == nFmt )
+                               {
+                                       if( rSh.IsFrmSelected() )
+                                       {
+                                               SfxItemSet aSet( 
rSh.GetAttrPool(), RES_URL, RES_URL );
+                                               rSh.GetFlyFrmAttr( aSet );
+                                               SwFmtURL aURL( 
(SwFmtURL&)aSet.Get( RES_URL ) );
+                                               aURL.SetURL( aBkmk.GetURL(), 
sal_False );
+                                               aSet.Put( aURL );
+                                               rSh.SetFlyFrmAttr( aSet );
+                                       }
+                               }
+                               else if( rSh.IsObjSelected() )
+                               {
+                                       // set as attribute at DrawObject
+                                       rSh.Paste( aGrf, sURL );
+                               }
+                               else if( OBJCNT_GRF == 
rSh.GetObjCntTypeOfSelection() )
+                               {
+                                       // set as linked graphic at writer 
graphic frame
+                                       rSh.ReRead( sURL, aEmptyStr, &aGrf );
+                               }
+                               else
+                               {
+                                       SwTransferable::SetSelInShell( rSh, 
sal_False, pPt );
+                                       rSh.Insert( aBkmk.GetURL(), aEmptyStr, 
aGrf );
+                               }
+                               break;
+                       }
+                       default:
+                       {
+                               nRet = 0;
+                               break;
+                       }
+               }
+       }
 
        if( nRet )
        {
@@ -2468,11 +2453,11 @@ int SwTransferable::_PasteGrf( TransferableDataHelper& 
rData, SwWrtShell& rSh,
                ImageMap aMap;
                SfxMedium aMed( INetURLObject(aBkmk.GetURL()).GetFull(),
                                                        STREAM_STD_READ, 
sal_False );
-        SvStream* pStream = aMed.GetInStream();
-        if( pStream != NULL  &&
-            !pStream->GetError()  &&
-            // mba: no BaseURL for clipboard functionality
-            aMap.Read( *pStream, IMAP_FORMAT_DETECT, String() ) == IMAP_ERR_OK 
&&
+               SvStream* pStream = aMed.GetInStream();
+               if( pStream != NULL  &&
+                       !pStream->GetError()  &&
+                       // mba: no BaseURL for clipboard functionality
+                       aMap.Read( *pStream, IMAP_FORMAT_DETECT, String() ) == 
IMAP_ERR_OK &&
                        aMap.GetIMapObjectCount() )
                {
                        SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, RES_URL );
@@ -2527,7 +2512,7 @@ int SwTransferable::_PasteAsHyperlink( 
TransferableDataHelper& rData,
                String sDesc;
                SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
 
-               //#41801# ersteinmal die URL absolut machen
+               // #41801# erst einmal die URL absolut machen
                INetURLObject aURL;
                aURL.SetSmartProtocol( INET_PROT_FILE );
                aURL.SetSmartURL( sFile );
@@ -2570,93 +2555,92 @@ int SwTransferable::_PasteFileName( 
TransferableDataHelper& rData,
 {
        int nRet = SwTransferable::_PasteGrf( rData, rSh, nFmt, nAction,
                                                                                
        pPt, nActionFlags, 0, false);
-    if( nRet )
-        nRet |= SWTRANSFER_GRAPHIC_INSERTED;
-    if( !nRet )
-    {
-        String sFile, sDesc;
-        if( rData.GetString( nFmt, sFile ) && sFile.Len() )
-        {
-            INetURLObject aMediaURL;
-
-            aMediaURL.SetSmartURL( sFile );
-            const String aMediaURLStr( aMediaURL.GetMainURL( 
INetURLObject::NO_DECODE ) );
-
-            if( ::avmedia::MediaWindow::isMediaURL( aMediaURLStr ) )
-            {
-                const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, 
aMediaURLStr );
-                rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(
-                                SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON,
-                                &aMediaURLItem, 0L );
-            }
-            else
-            {
-                sal_Bool bIsURLFile = SwTransferable::_CheckForURLOrLNKFile( 
rData, sFile, &sDesc );
-
-                //Eigenes FileFormat? -->Einfuegen, nicht fuer StarWriter/Web
-                String sFileURL = URIHelper::SmartRel2Abs(INetURLObject(), 
sFile, Link(), false );
-                const SfxFilter* pFlt = SW_PASTESDR_SETATTR == nAction
-                        ? 0 : SwIoSystem::GetFileFilter(
-                        sFileURL, aEmptyStr );
-                if( pFlt && !rSh.GetView().GetDocShell()->ISA(SwWebDocShell)
-    /*
-    JP 02.07.98: warum nur fuer die Formate ??
-                    && ( pFlt->GetUserData() == FILTER_SW5 ||
-                    pFlt->GetUserData() == FILTER_SW4 ||
-                    pFlt->GetUserData() == FILTER_SW3 ||
-                    pFlt->GetUserData() == FILTER_SWG )
-    */
-                    )
-                {
-    // und dann per PostUser Event den Bereich-Einfuegen-Dialog hochreissen
-                    SwSectionData * pSect = new SwSectionData(
-                                    FILE_LINK_SECTION,
-                                    rSh.GetDoc()->GetUniqueSectionName() );
-                    pSect->SetLinkFileName( sFileURL );
-                    pSect->SetProtectFlag( true );
-
-                    Application::PostUserEvent( STATIC_LINK( &rSh, SwWrtShell,
-                                                InsertRegionDialog ), pSect );
-                    nRet = 1;
-                    }
-                else if( SW_PASTESDR_SETATTR == nAction ||
-                        ( bIsURLFile && SW_PASTESDR_INSERT == nAction ))
-                {
-                    //Fremde Files koennen wir immerhin noch als Links
-                    //Einfuegen.
-
-                    //#41801# ersteinmal die URL absolut machen
-                    INetURLObject aURL;
-                    aURL.SetSmartProtocol( INET_PROT_FILE );
-                    aURL.SetSmartURL( sFile );
-                    sFile = aURL.GetMainURL( INetURLObject::NO_DECODE );
-
-                    switch( rSh.GetObjCntTypeOfSelection() )
-                    {
-                    case OBJCNT_FLY:
-                    case OBJCNT_GRF:
-                    case OBJCNT_OLE:
-                        {
-                            SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, 
RES_URL );
-                            rSh.GetFlyFrmAttr( aSet );
-                            SwFmtURL aURL2( (SwFmtURL&)aSet.Get( RES_URL ) );
-                            aURL2.SetURL( sFile, sal_False );
-                            if( !aURL2.GetName().Len() )
-                                aURL2.SetName( sFile );
-                            aSet.Put( aURL2 );
-                            rSh.SetFlyFrmAttr( aSet );
-                        }
-                        break;
-
-                    default:
-                        {
-                            rSh.InsertURL( SwFmtINetFmt( sFile, aEmptyStr ),
-                                            sDesc.Len() ? sDesc : sFile );
-                        }
-                    }
-                    nRet = sal_True;
-                }
-            }
+       if( nRet )
+               nRet |= SWTRANSFER_GRAPHIC_INSERTED;
+       if( !nRet )
+       {
+               String sFile, sDesc;
+               if( rData.GetString( nFmt, sFile ) && sFile.Len() )
+               {
+                       INetURLObject aMediaURL;
+
+                       aMediaURL.SetSmartURL( sFile );
+                       const String aMediaURLStr( aMediaURL.GetMainURL( 
INetURLObject::NO_DECODE ) );
+
+                       if( ::avmedia::MediaWindow::isMediaURL( aMediaURLStr ) )
+                       {
+                               const SfxStringItem aMediaURLItem( 
SID_INSERT_AVMEDIA, aMediaURLStr );
+                               
rSh.GetView().GetViewFrame()->GetDispatcher()->Execute(
+                                                               
SID_INSERT_AVMEDIA, SFX_CALLMODE_SYNCHRON,
+                                                               &aMediaURLItem, 
0L );
+                       }
+                       else
+                       {
+                               sal_Bool bIsURLFile = 
SwTransferable::_CheckForURLOrLNKFile( rData, sFile, &sDesc );
+
+                               // Eigenes FileFormat? --> Einfügen, nicht für 
Writer/Web
+                               String sFileURL = 
URIHelper::SmartRel2Abs(INetURLObject(), sFile, Link(), false );
+                               const SfxFilter* pFlt = SW_PASTESDR_SETATTR == 
nAction
+                                               ? 0 : SwIoSystem::GetFileFilter(
+                                               sFileURL, aEmptyStr );
+                               if( pFlt && 
!rSh.GetView().GetDocShell()->ISA(SwWebDocShell)
+       /*
+       JP 02.07.98: warum nur für die Formate ??
+                                       && ( pFlt->GetUserData() == FILTER_SW5 
||
+                                       pFlt->GetUserData() == FILTER_SW4 ||
+                                       pFlt->GetUserData() == FILTER_SW3 ||
+                                       pFlt->GetUserData() == FILTER_SWG )
+       */
+                                       )
+                               {
+       // und dann per PostUser Event den Bereich-Einfügen-Dialog hochreißen
+                                       SwSectionData * pSect = new 
SwSectionData(
+                                                                       
FILE_LINK_SECTION,
+                                                                       
rSh.GetDoc()->GetUniqueSectionName() );
+                                       pSect->SetLinkFileName( sFileURL );
+                                       pSect->SetProtectFlag( true );
+
+                                       Application::PostUserEvent( 
STATIC_LINK( &rSh, SwWrtShell,
+                                                                               
                InsertRegionDialog ), pSect );
+                                       nRet = 1;
+                                       }
+                               else if( SW_PASTESDR_SETATTR == nAction ||
+                                               ( bIsURLFile && 
SW_PASTESDR_INSERT == nAction ))
+                               {
+                                       // Fremde Files können wir immerhin 
noch als Links einfügen.
+
+                                       // #41801# erst einmal die URL absolut 
machen
+                                       INetURLObject aURL;
+                                       aURL.SetSmartProtocol( INET_PROT_FILE );
+                                       aURL.SetSmartURL( sFile );
+                                       sFile = aURL.GetMainURL( 
INetURLObject::NO_DECODE );
+
+                                       switch( rSh.GetObjCntTypeOfSelection() )
+                                       {
+                                       case OBJCNT_FLY:
+                                       case OBJCNT_GRF:
+                                       case OBJCNT_OLE:
+                                               {
+                                                       SfxItemSet aSet( 
rSh.GetAttrPool(), RES_URL, RES_URL );
+                                                       rSh.GetFlyFrmAttr( aSet 
);
+                                                       SwFmtURL aURL2( 
(SwFmtURL&)aSet.Get( RES_URL ) );
+                                                       aURL2.SetURL( sFile, 
sal_False );
+                                                       if( 
!aURL2.GetName().Len() )
+                                                               aURL2.SetName( 
sFile );
+                                                       aSet.Put( aURL2 );
+                                                       rSh.SetFlyFrmAttr( aSet 
);
+                                               }
+                                               break;
+
+                                       default:
+                                               {
+                                                       rSh.InsertURL( 
SwFmtINetFmt( sFile, aEmptyStr ),
+                                                                               
        sDesc.Len() ? sDesc : sFile );
+                                               }
+                                       }
+                                       nRet = sal_True;
+                               }
+                       }
                }
        }
        return nRet;
@@ -2681,7 +2665,7 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& 
rData,
                                                                : (bLink
                                                                        ? 0
                                                                        : 
FN_QRY_INSERT_FIELD );
-        DataFlavorExVector& rVector = rData.GetDataFlavorExVector();
+               DataFlavorExVector& rVector = rData.GetDataFlavorExVector();
                sal_Bool bHaveColumnDescriptor = 
OColumnTransferable::canExtractColumnDescriptor(rVector, CTF_COLUMN_DESCRIPTOR 
| CTF_CONTROL_EXCHANGE);
                if ( SOT_FORMATSTR_ID_XFORMS == nFmt )
                {
@@ -2690,62 +2674,62 @@ int SwTransferable::_PasteDBData( 
TransferableDataHelper& rData,
                        FmFormView* pFmView = PTR_CAST( FmFormView, 
rSh.GetDrawView() );
                        if(pFmView) {
                                const OXFormsDescriptor &rDesc = 
OXFormsTransferable::extractDescriptor(rData);
-                if(0 != (pObj = pFmView->CreateXFormsControl(rDesc)))
-                {
-                    rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt );
-                }
+                               if(0 != (pObj = 
pFmView->CreateXFormsControl(rDesc)))
+                               {
+                                       rSh.SwFEShell::InsertDrawObj( *pObj, 
*pDragPt );
+                               }
                        }
                }
                else if( nWh )
                {
-            SfxUsrAnyItem* pConnectionItem     = 0;
+                       SfxUsrAnyItem* pConnectionItem  = 0;
                        SfxUsrAnyItem* pCursorItem              = 0;
-            SfxUsrAnyItem* pColumnItem         = 0;
-            SfxUsrAnyItem* pSourceItem         = 0;
-            SfxUsrAnyItem* pCommandItem                = 0;
-            SfxUsrAnyItem* pCommandTypeItem = 0;
-            SfxUsrAnyItem* pColumnNameItem     = 0;
-            SfxUsrAnyItem* pSelectionItem      = 0;
-
-            sal_Bool bDataAvailable = sal_True;
-               ODataAccessDescriptor aDesc;
-            if(bHaveColumnDescriptor)
-                aDesc = OColumnTransferable::extractColumnDescriptor(rData);
-            else 
if(ODataAccessObjectTransferable::canExtractObjectDescriptor(rVector) )
-                aDesc = 
ODataAccessObjectTransferable::extractObjectDescriptor(rData);
-            else
-                bDataAvailable = sal_False;
-
-            if ( bDataAvailable )
-            {
-                pConnectionItem = new SfxUsrAnyItem(FN_DB_CONNECTION_ANY, 
aDesc[daConnection]);
-                pColumnItem = new SfxUsrAnyItem(FN_DB_COLUMN_ANY, 
aDesc[daColumnObject]);
-                pSourceItem = new SfxUsrAnyItem(FN_DB_DATA_SOURCE_ANY, 
makeAny(aDesc.getDataSource()));
-                pCommandItem = new SfxUsrAnyItem(FN_DB_DATA_COMMAND_ANY, 
aDesc[daCommand]);
-                pCommandTypeItem = new 
SfxUsrAnyItem(FN_DB_DATA_COMMAND_TYPE_ANY, aDesc[daCommandType]);
-                pColumnNameItem = new 
SfxUsrAnyItem(FN_DB_DATA_COLUMN_NAME_ANY, aDesc[daColumnName]);
-                pSelectionItem = new SfxUsrAnyItem(FN_DB_DATA_SELECTION_ANY, 
aDesc[daSelection]);
+                       SfxUsrAnyItem* pColumnItem              = 0;
+                       SfxUsrAnyItem* pSourceItem              = 0;
+                       SfxUsrAnyItem* pCommandItem             = 0;
+                       SfxUsrAnyItem* pCommandTypeItem = 0;
+                       SfxUsrAnyItem* pColumnNameItem  = 0;
+                       SfxUsrAnyItem* pSelectionItem   = 0;
+
+                       sal_Bool bDataAvailable = sal_True;
+                       ODataAccessDescriptor aDesc;
+                       if(bHaveColumnDescriptor)
+                               aDesc = 
OColumnTransferable::extractColumnDescriptor(rData);
+                       else 
if(ODataAccessObjectTransferable::canExtractObjectDescriptor(rVector) )
+                               aDesc = 
ODataAccessObjectTransferable::extractObjectDescriptor(rData);
+                       else
+                               bDataAvailable = sal_False;
+
+                       if ( bDataAvailable )
+                       {
+                               pConnectionItem = new 
SfxUsrAnyItem(FN_DB_CONNECTION_ANY, aDesc[daConnection]);
+                               pColumnItem = new 
SfxUsrAnyItem(FN_DB_COLUMN_ANY, aDesc[daColumnObject]);
+                               pSourceItem = new 
SfxUsrAnyItem(FN_DB_DATA_SOURCE_ANY, makeAny(aDesc.getDataSource()));
+                               pCommandItem = new 
SfxUsrAnyItem(FN_DB_DATA_COMMAND_ANY, aDesc[daCommand]);
+                               pCommandTypeItem = new 
SfxUsrAnyItem(FN_DB_DATA_COMMAND_TYPE_ANY, aDesc[daCommandType]);
+                               pColumnNameItem = new 
SfxUsrAnyItem(FN_DB_DATA_COLUMN_NAME_ANY, aDesc[daColumnName]);
+                               pSelectionItem = new 
SfxUsrAnyItem(FN_DB_DATA_SELECTION_ANY, aDesc[daSelection]);
                                pCursorItem = new 
SfxUsrAnyItem(FN_DB_DATA_CURSOR_ANY, aDesc[daCursor]);
-            }
+                       }
 
-            SwView& rView = rSh.GetView();
+                       SwView& rView = rSh.GetView();
                        //force ::SelectShell
                        rView.StopShellTimer();
 
                        SfxStringItem aDataDesc( nWh, sTxt );
                        rView.GetViewFrame()->GetDispatcher()->Execute(
-                                nWh, SFX_CALLMODE_ASYNCHRON, &aDataDesc,
-                                pConnectionItem, pColumnItem,
-                                pSourceItem, pCommandItem, pCommandTypeItem,
-                                pColumnNameItem, pSelectionItem, 
pCursorItem,0L);
-            delete pConnectionItem;
-            delete pColumnItem;
-            delete pSourceItem;
-            delete pCommandItem;
-            delete pCommandTypeItem;
-            delete pColumnNameItem;
-            delete pSelectionItem;
-            delete pCursorItem;
+                                                               nWh, 
SFX_CALLMODE_ASYNCHRON, &aDataDesc,
+                                                               
pConnectionItem, pColumnItem,
+                                                               pSourceItem, 
pCommandItem, pCommandTypeItem,
+                                                               
pColumnNameItem, pSelectionItem, pCursorItem,0L);
+                       delete pConnectionItem;
+                       delete pColumnItem;
+                       delete pSourceItem;
+                       delete pCommandItem;
+                       delete pCommandTypeItem;
+                       delete pColumnNameItem;
+                       delete pSelectionItem;
+                       delete pCursorItem;
                }
                else
                {
@@ -2755,7 +2739,7 @@ int SwTransferable::_PasteDBData( TransferableDataHelper& 
rData,
                        if (pFmView && bHaveColumnDescriptor)
                        {
                                if ( 0 != (pObj = pFmView->CreateFieldControl( 
OColumnTransferable::extractColumnDescriptor(rData) ) ) )
-                    rSh.SwFEShell::InsertDrawObj( *pObj, *pDragPt );
+                                       rSh.SwFEShell::InsertDrawObj( *pObj, 
*pDragPt );
                        }
                }
                nRet = 1;
@@ -2787,7 +2771,7 @@ int SwTransferable::_PasteFileList( 
TransferableDataHelper& rData,
                        pHlp->CopyString( FORMAT_FILE, aFileList.GetFile( n ));
                        TransferableDataHelper aData( pHlp );
 
-            if( SwTransferable::_PasteFileName( aData, rSh, SOT_FORMAT_FILE, 
nAct,
+                       if( SwTransferable::_PasteFileName( aData, rSh, 
SOT_FORMAT_FILE, nAct,
                                                                                
        pPt, sal_False, bMsg ))
                        {
                                if( bLink )
@@ -2842,10 +2826,10 @@ ASSERT( !&rFileName, "how do we read today .URL - 
Files?" );
 sal_Bool SwTransferable::IsPasteSpecial( const SwWrtShell& rWrtShell,
                                                                         const 
TransferableDataHelper& rData )
 {
-    // we can paste-special if there's an entry in the paste-special-format 
list
-    SvxClipboardFmtItem aClipboardFmtItem(0);
-    FillClipFmtItem( rWrtShell, rData, aClipboardFmtItem);
-    return aClipboardFmtItem.Count() > 0;
+       // we can paste-special if there's an entry in the paste-special-format 
list
+       SvxClipboardFmtItem aClipboardFmtItem(0);
+       FillClipFmtItem( rWrtShell, rData, aClipboardFmtItem);
+       return aClipboardFmtItem.Count() > 0;
 }
 
 // -----------------------------------------------------------------------
@@ -2867,7 +2851,7 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
                nRet = pClipboard->PrivatePaste( rSh );
        else if( rData.HasFormat( nFormat ) )
        {
-        uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() 
);
+               uno::Reference<XTransferable> xTransferable( 
rData.GetXTransferable() );
                sal_uInt16 nEventAction,
                           nDestination = SwTransferable::GetSotDestination( 
rSh ),
                           nSourceOptions =
@@ -2880,14 +2864,14 @@ int SwTransferable::PasteFormat( SwWrtShell& rSh,
                           nAction = SotExchange::GetExchangeAction(
                                                                        
rData.GetDataFlavorExVector(),
                                                                        
nDestination,
-                                                                       
nSourceOptions,                         /* ?? */
+                                                                       
nSourceOptions,             /* ?? */
                                                                        
EXCHG_IN_ACTION_DEFAULT,    /* ?? */
                                                                        
nFormat, nEventAction, nFormat,
                                                                        
lcl_getTransferPointer ( xTransferable ) );
 
                if( EXCHG_INOUT_ACTION_NONE != nAction )
                        nRet = SwTransferable::PasteData( rData, rSh, nAction, 
nFormat,
-                                                nDestination, sal_True, 
sal_False );
+                                                                               
                nDestination, sal_True, sal_False );
        }
        return nRet;
 }
@@ -2899,14 +2883,14 @@ int SwTransferable::_TestAllowedFormat( const 
TransferableDataHelper& rData,
 {
        sal_uInt16 nAction = EXCHG_INOUT_ACTION_NONE, nEventAction;
        if( rData.HasFormat( nFormat )) {
-        uno::Reference<XTransferable> xTransferable( rData.GetXTransferable() 
);
+               uno::Reference<XTransferable> xTransferable( 
rData.GetXTransferable() );
                nAction = SotExchange::GetExchangeAction(
                                                rData.GetDataFlavorExVector(),
                                                nDestination, 
EXCHG_IN_ACTION_COPY,
                                                EXCHG_IN_ACTION_COPY, nFormat,
                                                nEventAction, nFormat,
                                                lcl_getTransferPointer ( 
xTransferable ) );
-    }
+       }
        return EXCHG_INOUT_ACTION_NONE != nAction;
 }
 
@@ -2918,26 +2902,25 @@ int SwTransferable::_TestAllowedFormat( const 
TransferableDataHelper& rData,
  */
 static sal_uInt16 aPasteSpecialIds[] =
 {
-    SOT_FORMATSTR_ID_HTML,
-    SOT_FORMATSTR_ID_HTML_SIMPLE,
-    SOT_FORMATSTR_ID_HTML_NO_COMMENT,
-    FORMAT_RTF,
-    FORMAT_STRING,
-    SOT_FORMATSTR_ID_SONLK,
-    SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK,
-    SOT_FORMATSTR_ID_DRAWING,
-    SOT_FORMATSTR_ID_SVXB,
-    FORMAT_GDIMETAFILE,
-    FORMAT_BITMAP,
-    SOT_FORMATSTR_ID_SVIM,
-    SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR,
-    0
+       SOT_FORMATSTR_ID_HTML,
+       SOT_FORMATSTR_ID_HTML_SIMPLE,
+       SOT_FORMATSTR_ID_HTML_NO_COMMENT,
+       FORMAT_RTF,
+       FORMAT_STRING,
+       SOT_FORMATSTR_ID_SONLK,
+       SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK,
+       SOT_FORMATSTR_ID_DRAWING,
+       SOT_FORMATSTR_ID_SVXB,
+       FORMAT_GDIMETAFILE,
+       FORMAT_BITMAP,
+       SOT_FORMATSTR_ID_SVIM,
+       SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR,
+       0
 };
 
-
 int SwTransferable::PasteUnformatted( SwWrtShell& rSh, TransferableDataHelper& 
rData )
 {
-    // Plain text == unformatted
+       // Plain text == unformatted
        return SwTransferable::PasteFormat( rSh, rData, SOT_FORMAT_STRING );
 }
 
@@ -2946,8 +2929,8 @@ int SwTransferable::PasteUnformatted( SwWrtShell& rSh, 
TransferableDataHelper& r
 int SwTransferable::PasteSpecial( SwWrtShell& rSh, TransferableDataHelper& 
rData, sal_uLong& rFormatUsed )
 {
        int nRet = 0;
-    SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
-    SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( 
&rSh.GetView().GetEditWin() );
+       SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
+       SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( 
&rSh.GetView().GetEditWin() );
 
        DataFlavorExVector aFormats( rData.GetDataFlavorExVector() );
        TransferableObjectDescriptor aDesc;
@@ -3002,19 +2985,18 @@ int SwTransferable::PasteSpecial( SwWrtShell& rSh, 
TransferableDataHelper& rData
                if( SwTransferable::_TestAllowedFormat( rData, *pIds, nDest ))
                        pDlg->Insert( *pIds, aEmptyStr );
 
-    sal_uLong nFormat = pDlg->GetFormat( rData.GetTransferable() );
+       sal_uLong nFormat = pDlg->GetFormat( rData.GetTransferable() );
 
        if( nFormat )
                nRet = SwTransferable::PasteFormat( rSh, rData, nFormat );
 
-    if ( nRet )
-        rFormatUsed = nFormat;
+       if ( nRet )
+               rFormatUsed = nFormat;
 
-    delete pDlg;
+       delete pDlg;
        return nRet;
 }
 
-
 void SwTransferable::FillClipFmtItem( const SwWrtShell& rSh,
                                                                const 
TransferableDataHelper& rData,
                                                                
SvxClipboardFmtItem & rToFill )
@@ -3055,7 +3037,7 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& 
rSh,
                if ( rData.HasFormat(nFormat = 
SOT_FORMATSTR_ID_EMBED_SOURCE_OLE) || rData.HasFormat(nFormat = 
SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE) )
                {
                        String sName,sSource;
-            if ( 
SvPasteObjectHelper::GetEmbeddedName(rData,sName,sSource,nFormat) )
+                       if ( 
SvPasteObjectHelper::GetEmbeddedName(rData,sName,sSource,nFormat) )
                                rToFill.AddClipbrdFormat( nFormat, sName );
                }
        }
@@ -3070,20 +3052,20 @@ void SwTransferable::FillClipFmtItem( const SwWrtShell& 
rSh,
 
 void SwTransferable::SetDataForDragAndDrop( const Point& rSttPos )
 {
-    if(!pWrtShell)
-        return;
-    String sGrfNm;
+       if(!pWrtShell)
+               return;
+       String sGrfNm;
        const int nSelection = pWrtShell->GetSelectionType();
        if( nsSelectionType::SEL_GRF == nSelection)
        {
                AddFormat( SOT_FORMATSTR_ID_SVXB );
-        // --> OD 2005-02-09 #119353# - robust
-        const Graphic* pGrf = pWrtShell->GetGraphic();
-        if ( pGrf && pGrf->IsSupportedGraphic() )
-        // <--
+               // --> OD 2005-02-09 #119353# - robust
+               const Graphic* pGrf = pWrtShell->GetGraphic();
+               if ( pGrf && pGrf->IsSupportedGraphic() )
+               // <--
                {
                        AddFormat( FORMAT_GDIMETAFILE );
-            AddFormat( SOT_FORMATSTR_ID_PNG );
+                       AddFormat( SOT_FORMATSTR_ID_PNG );
                        AddFormat( FORMAT_BITMAP );
                }
                eBufferType = TRNSFR_GRAPHIC;
@@ -3092,12 +3074,12 @@ void SwTransferable::SetDataForDragAndDrop( const 
Point& rSttPos )
        else if( nsSelectionType::SEL_OLE == nSelection )
        {
                AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
-        PrepareOLE( aObjDesc );
+               PrepareOLE( aObjDesc );
                AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
                AddFormat( FORMAT_GDIMETAFILE );
                eBufferType = TRNSFR_OLE;
        }
-       //Gibt es ueberhaupt etwas zum bereitstellen?
+       // Gibt es überhaupt etwas zum bereitstellen?
        else if ( pWrtShell->IsSelection() || pWrtShell->IsFrmSelected() ||
                          pWrtShell->IsObjSelected() )
        {
@@ -3117,8 +3099,8 @@ void SwTransferable::SetDataForDragAndDrop( const Point& 
rSttPos )
 
                AddFormat( SOT_FORMATSTR_ID_EMBED_SOURCE );
 
-               //RTF vor das Metafile von OLE stellen, weil mit weniger 
verlusten
-               //behaftet.
+               // RTF vor das Metafile von OLE stellen, weil mit weniger 
Verlusten
+               // behaftet.
                if( !pWrtShell->IsObjSelected() )
                {
                        AddFormat( FORMAT_RTF );
@@ -3133,7 +3115,7 @@ void SwTransferable::SetDataForDragAndDrop( const Point& 
rSttPos )
                        if ( nSelection & nsSelectionType::SEL_DRW )
                        {
                                AddFormat( FORMAT_GDIMETAFILE );
-                AddFormat( SOT_FORMATSTR_ID_PNG );
+                               AddFormat( SOT_FORMATSTR_ID_PNG );
                                AddFormat( FORMAT_BITMAP );
                        }
                        eBufferType = (TransferBufferType)( TRNSFR_GRAPHIC | 
eBufferType );
@@ -3150,24 +3132,24 @@ void SwTransferable::SetDataForDragAndDrop( const 
Point& rSttPos )
                        if( pWrtShell->GetURLFromButton( sURL, sDesc ) )
                        {
                                AddFormat( FORMAT_STRING );
-                               AddFormat( SOT_FORMATSTR_ID_SOLK );
-                               AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
-                               AddFormat( SOT_FORMATSTR_ID_FILECONTENT );
-                               AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR );
-                               AddFormat( 
SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR );
+                               AddFormat( SOT_FORMATSTR_ID_SOLK );
+                               AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
+                               AddFormat( SOT_FORMATSTR_ID_FILECONTENT );
+                               AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR );
+                               AddFormat( 
SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR );
                                eBufferType = (TransferBufferType)( 
TRNSFR_INETFLD | eBufferType );
                        }
                }
 
-               //ObjectDescriptor wurde bereits aus der alten DocShell 
gefuellt.
-               //Jetzt noch anpassen. Dadurch kann im GetData die erste Anfrage
-               //auch noch mit delayed rendering beantwortet werden.
+               // ObjectDescriptor wurde bereits aus der alten DocShell 
gefüllt.
+               // Jetzt noch anpassen. Dadurch kann im GetData die erste 
Anfrage
+               // auch noch mit delayed rendering beantwortet werden.
                aObjDesc.mbCanLink = sal_False;
                aObjDesc.maDragStartPos = rSttPos;
                aObjDesc.maSize = OutputDevice::LogicToLogic( Size( OLESIZE ),
                                                                                
                MAP_TWIP, MAP_100TH_MM );
-        PrepareOLE( aObjDesc );
-        AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
+               PrepareOLE( aObjDesc );
+               AddFormat( SOT_FORMATSTR_ID_OBJECTDESCRIPTOR );
        }
        else if( nSelection & nsSelectionType::SEL_TXT && !pWrtShell->HasMark() 
)
        {
@@ -3178,11 +3160,11 @@ void SwTransferable::SetDataForDragAndDrop( const 
Point& rSttPos )
                if( pWrtShell->GetContentAtPos( aPos, aCntntAtPos ) )
                {
                        AddFormat( FORMAT_STRING );
-                       AddFormat( SOT_FORMATSTR_ID_SOLK );
-                       AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
-                       AddFormat( SOT_FORMATSTR_ID_FILECONTENT );
-                       AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR );
-                       AddFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR );
+                       AddFormat( SOT_FORMATSTR_ID_SOLK );
+                       AddFormat( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK );
+                       AddFormat( SOT_FORMATSTR_ID_FILECONTENT );
+                       AddFormat( SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR );
+                       AddFormat( SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR );
                        eBufferType = TRNSFR_INETFLD;
                }
        }
@@ -3209,9 +3191,9 @@ void SwTransferable::SetDataForDragAndDrop( const Point& 
rSttPos )
 
 void SwTransferable::StartDrag( Window* pWin, const Point& rPos )
 {
-    if(!pWrtShell)
-        return;
-    bOldIdle = pWrtShell->GetViewOptions()->IsIdle();
+       if(!pWrtShell)
+               return;
+       bOldIdle = pWrtShell->GetViewOptions()->IsIdle();
        bCleanUp = sal_True;
 
        ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( sal_False );
@@ -3219,7 +3201,7 @@ void SwTransferable::StartDrag( Window* pWin, const 
Point& rPos )
        if( pWrtShell->IsSelFrmMode() )
                pWrtShell->ShowCrsr();
 
-    SW_MOD()->pDragDrop = this;
+       SW_MOD()->pDragDrop = this;
 
        SetDataForDragAndDrop( rPos );
 
@@ -3233,26 +3215,25 @@ void SwTransferable::StartDrag( Window* pWin, const 
Point& rPos )
 
 void SwTransferable::DragFinished( sal_Int8 nAction )
 {
-       //Und noch die letzten Nacharbeiten damit alle Stati stimmen.
+       // Und noch die letzten Nacharbeiten damit alle Stati stimmen.
        if( DND_ACTION_MOVE == nAction  )
        {
                if( bCleanUp )
                {
-                       //Es wurde auserhalb des Writers gedroped. Wir muessen 
noch
-                       //loeschen.
+                       // Es wurde außerhalb des Writers gedroped. Wir müssen 
noch löschen.
 
                        pWrtShell->StartAllAction();
-            pWrtShell->StartUndo( UNDO_UI_DRAG_AND_MOVE );
+                       pWrtShell->StartUndo( UNDO_UI_DRAG_AND_MOVE );
                        if ( pWrtShell->IsTableMode() )
                                pWrtShell->DeleteTblSel();
                        else
                        {
                                if ( !(pWrtShell->IsSelFrmMode() || 
pWrtShell->IsObjSelected()) )
-                                       //SmartCut, eines der Blanks mitnehmen.
+                                       // SmartCut, eines der Blanks mitnehmen.
                                        pWrtShell->IntelligentCut( 
pWrtShell->GetSelectionType(), sal_True );
                                pWrtShell->DelRight();
                        }
-            pWrtShell->EndUndo( UNDO_UI_DRAG_AND_MOVE );
+                       pWrtShell->EndUndo( UNDO_UI_DRAG_AND_MOVE );
                        pWrtShell->EndAllAction();
                }
                else
@@ -3275,7 +3256,7 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
 //!!           pWrtShell->ShowCrsr();
 //!!   else
 //!!   {
-//!!           //Muss wohl sein weil gescrollt wurde und ?...?
+//!!           // Muss wohl sein weil gescrollt wurde und ?...?
 //!!           pWrtShell->StartAction();
 //!!           pWrtShell->EndAction();
 //!!   }
@@ -3283,9 +3264,6 @@ void SwTransferable::DragFinished( sal_Int8 nAction )
        ((SwViewOption *)pWrtShell->GetViewOptions())->SetIdle( bOldIdle );
 }
 
-
-/* */
-
 int SwTransferable::PrivatePaste( SwWrtShell& rShell )
 {
        // erst den SelectionType erfragen, dann Action-Klammerung !!!!
@@ -3296,21 +3274,21 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
 
        const int nSelection = rShell.GetSelectionType();
 
-    // #111827#
-    SwRewriter aRewriter;
+       // #111827#
+       SwRewriter aRewriter;
 
-    SwTrnsfrActionAndUndo aAction( &rShell, UNDO_PASTE_CLIPBOARD);
+       SwTrnsfrActionAndUndo aAction( &rShell, UNDO_PASTE_CLIPBOARD);
 
-    bool bKillPaMs = false;
+       bool bKillPaMs = false;
 
-       //Selektierten Inhalt loeschen, nicht bei Tabellen-Selektion und
+       //Selektierten Inhalt löschen, nicht bei Tabellen-Selektion und
        //Tabelle im Clipboard
        if( rShell.HasSelection() && !( nSelection & 
nsSelectionType::SEL_TBL_CELLS))
        {
-        bKillPaMs = true;
-        rShell.SetRetainSelection( true );
+               bKillPaMs = true;
+               rShell.SetRetainSelection( true );
                rShell.DelRight();
-               // war ein Fly selektiert, so muss jetzt fuer eine gueltige
+               // war ein Fly selektiert, so muss jetzt für eine gültige
                // Cursor-Position gesorgt werden! (geparkter Cursor!)
                if( ( nsSelectionType::SEL_FRM | nsSelectionType::SEL_GRF |
                        nsSelectionType::SEL_OLE | nsSelectionType::SEL_DRW |
@@ -3320,39 +3298,39 @@ int SwTransferable::PrivatePaste( SwWrtShell& rShell )
                        Point aPt( rShell.GetCharRect().Pos() );
                        rShell.SwCrsrShell::SetCrsr( aPt, sal_True );
                }
-        rShell.SetRetainSelection( false );
+               rShell.SetRetainSelection( false );
        }
 
-    sal_Bool bInWrd = sal_False, bEndWrd = sal_False, bSttWrd = sal_False,
-         bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);
+       sal_Bool bInWrd = sal_False, bEndWrd = sal_False, bSttWrd = sal_False,
+                bSmart = 0 != (TRNSFR_DOCUMENT_WORD & eBufferType);
        if( bSmart )
        {
 // #108491# Why not for other Scripts? If TRNSFR_DOCUMENT_WORD is set, we have
 // a word in the buffer, word in this context means 'something with spaces at
 // beginning and end'. In this case we definitely want these spaces to be 
inserted
 // here.
-//      if( SCRIPTTYPE_LATIN != rShell.GetScriptType() )
-//          bSmart = sal_False;
-//      else
-//      {
+//             if( SCRIPTTYPE_LATIN != rShell.GetScriptType() )
+//                     bSmart = sal_False;
+//             else
+//                     {
                        bInWrd = rShell.IsInWrd();
-                       bEndWrd = rShell.IsEndWrd();
+                       bEndWrd = rShell.IsEndWrd();
                        bSmart = bInWrd || bEndWrd;
                        if( bSmart )
                        {
-                               bSttWrd = rShell.IsSttWrd();
+                               bSttWrd = rShell.IsSttWrd();
                                if( bSmart && !bSttWrd && (bInWrd || bEndWrd) )
                                        rShell.SwEditShell::Insert(' ');
                        }
-//      }
+//             }
        }
 
        int nRet = rShell.Paste( pClpDocFac->GetDoc() );
 
-    if( bKillPaMs )
-        rShell.KillPams();
+       if( bKillPaMs )
+               rShell.KillPams();
 
-       // Wenn Smart Paste dann Leerzeichen einfuegen
+       // Wenn Smart Paste dann Leerzeichen einfügen
        if( nRet && bSmart && ((bInWrd && !bEndWrd )|| bSttWrd) )
                rShell.SwEditShell::Insert(' ');
 
@@ -3392,7 +3370,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
 
                        const int nSelection = rSh.GetSelectionType();
 
-                       // Draw-Objekte erstmal noch nicht beruecksichtigen
+                       // Draw-Objekte erstmal noch nicht berücksichtigen
                        if( nsSelectionType::SEL_GRF & nSelection )
                        {
                                SfxItemSet aSet( rSh.GetAttrPool(), RES_URL, 
RES_URL );
@@ -3420,11 +3398,11 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
                // ReRead auf die Grafik
                String sGrfNm, sFltNm;
                rSrcSh.GetGrfNms( &sGrfNm, &sFltNm );
-        rSh.ReRead( sGrfNm, sFltNm, rSrcSh.GetGraphic() );
+               rSh.ReRead( sGrfNm, sFltNm, rSrcSh.GetGraphic() );
                return 1;
        }
 
-       //Nicht in Selektionen oder selektierten Rahmen
+       // Nicht in Selektionen oder selektierten Rahmen
        if( rSh.ChgCurrPam( rDragPt ) ||
                ( rSh.IsSelFrmMode() && rSh.IsInsideSelectedObj( rDragPt )) )
                return 0;
@@ -3433,7 +3411,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
                bTblSel = sal_True;
        else if( rSrcSh.IsSelFrmMode() || rSrcSh.IsObjSelected() )
        {
-               // keine positionsgeschuetzten Objecte verschieben!
+               // keine positionsgeschützten Objekte verschieben!
                if( bMove && rSrcSh.IsSelObjProtected( FLYPROTECT_POS ) )
                        return 0;
 
@@ -3442,16 +3420,16 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
 
        const int nSel = rSrcSh.GetSelectionType();
 
-    SwUndoId eUndoId = bMove ? UNDO_UI_DRAG_AND_MOVE : UNDO_UI_DRAG_AND_COPY;
+       SwUndoId eUndoId = bMove ? UNDO_UI_DRAG_AND_MOVE : 
UNDO_UI_DRAG_AND_COPY;
 
-    // #111827#
-    SwRewriter aRewriter;
+       // #111827#
+       SwRewriter aRewriter;
 
-    aRewriter.AddRule(UNDO_ARG1, rSrcSh.GetSelDescr());
+       aRewriter.AddRule(UNDO_ARG1, rSrcSh.GetSelDescr());
 
        if(rSrcSh.GetDoc() != rSh.GetDoc())
-        rSrcSh.StartUndo( eUndoId, &aRewriter );
-    rSh.StartUndo( eUndoId, &aRewriter );
+               rSrcSh.StartUndo( eUndoId, &aRewriter );
+       rSh.StartUndo( eUndoId, &aRewriter );
 
        rSh.StartAction();
        rSrcSh.StartAction();
@@ -3465,16 +3443,16 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
        else if( !bTblSel && !bFrmSel )
        {
                if( !rSh.IsAddMode() )
-        {
-            // --> OD 2008-03-19 #i87233#
-            if ( rSh.IsBlockMode() )
-            {
-                // preserve order of cursors for block mode
-                rSh.GoPrevCrsr();
-            }
-            // <--
+               {
+                       // --> OD 2008-03-19 #i87233#
+                       if ( rSh.IsBlockMode() )
+                       {
+                               // preserve order of cursors for block mode
+                               rSh.GoPrevCrsr();
+                       }
+                       // <--
                        rSh.SwCrsrShell::CreateCrsr();
-        }
+               }
                rSh.SwCrsrShell::SetCrsr( rDragPt, sal_True, false );
                rSh.GoPrevCrsr();
                cWord = rSh.IntelligentCut( rSh.GetSelectionType(), sal_False );
@@ -3488,7 +3466,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
 
        Point aSttPt( SwEditWin::GetDDStartPosX(), SwEditWin::GetDDStartPosY() 
);
 
-       //JP 05.03.96: INetFelder erstmal selektieren !
+       //JP 05.03.96: INetFelder erst einmal selektieren !
        if( TRNSFR_INETFLD == eBufferType )
        {
                if( &rSrcSh == &rSh )
@@ -3500,7 +3478,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
                        {
                                // nicht in sich selbst kopieren/verschieben
                                rSh.DestroyCrsr();
-                rSh.EndUndo();
+                               rSh.EndUndo();
                                rSh.EndAction();
                                rSh.EndAction();
                                return 0;
@@ -3513,7 +3491,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
                        rSrcSh.SelectTxtAttr( RES_TXTATR_INETFMT );
                }
 
-               // ist am Einfuege Punkt ein URL-Attribut? Dann das ersetzen,
+               // ist am Einfüge+Punkt ein URL-Attribut? Dann das ersetzen,
                // also einfach eine Selektion aufspannen?
                rSh.DelINetAttrWithText();
                bDDINetAttr = sal_True;
@@ -3534,10 +3512,10 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
                if ( bRet && bMove && !bFrmSel )
                {
                        if ( bTblSel )
-            {
-                /* #109590# delete table contents not cells */
+                       {
+                               /* #109590# delete table contents not cells */
                                rSrcSh.Delete();
-            }
+                       }
                        else
                        {
                                //SmartCut, eines der Blank mitnehmen.
@@ -3552,13 +3530,13 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
                rSrcSh.KillPams();
                rSrcSh.Pop( sal_False );
 
-        /* #109590# after dragging a table selection inside one shell
-            set cursor to the drop position. */
-        if( &rSh == &rSrcSh && ( bTblSel || rSh.IsBlockMode() ) )
-        {
-            rSrcSh.SwCrsrShell::SetCrsr(rDragPt);
-            rSrcSh.GetSwCrsr()->SetMark();
-        }
+               /* #109590# after dragging a table selection inside one shell
+                       set cursor to the drop position. */
+               if( &rSh == &rSrcSh && ( bTblSel || rSh.IsBlockMode() ) )
+               {
+                       rSrcSh.SwCrsrShell::SetCrsr(rDragPt);
+                       rSrcSh.GetSwCrsr()->SetMark();
+               }
        }
 
        if( bRet && !bTblSel && !bFrmSel )
@@ -3567,7 +3545,7 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
                        (cWord == SwWrtShell::WORD_SPACE_AFTER ||
                                cWord == SwWrtShell::WORD_SPACE_BEFORE) )
                {
-            if ( bSttWrd || (bInWrd && !bEndWrd))
+                       if ( bSttWrd || (bInWrd && !bEndWrd))
                                rSh.SwEditShell::Insert(' ', bIsXSelection);
                        if ( !bSttWrd || (bInWrd && !bSttPara) )
                        {
@@ -3608,8 +3586,8 @@ int SwTransferable::PrivateDrop( SwWrtShell& rSh, const 
Point& rDragPt,
                rSrcSh.LeaveSelFrmMode();
 
        if( rSrcSh.GetDoc() != rSh.GetDoc() )
-        rSrcSh.EndUndo();
-    rSh.EndUndo();
+               rSrcSh.EndUndo();
+       rSh.EndUndo();
 
                // Shell in den richtigen Status versetzen
        if( &rSrcSh != &rSh && ( rSh.IsFrmSelected() || rSh.IsObjSelected() ))
@@ -3628,10 +3606,10 @@ void SwTransferable::CreateSelection( SwWrtShell& rSh,
        SwTransferable* pNew = new SwTransferable( rSh );
 
        /* #96392#*/
-       pNew->pCreatorView = _pCreatorView;
+       pNew->pCreatorView = _pCreatorView;
 
-    uno::Reference<
-            datatransfer::XTransferable > xRef( pNew );
+       uno::Reference<
+                       datatransfer::XTransferable > xRef( pNew );
        pMod->pXSelection = pNew;
        pNew->CopyToSelection( rSh.GetWin() );
 }
@@ -3640,10 +3618,10 @@ void SwTransferable::ClearSelection( SwWrtShell& rSh,
                                                                         const 
ViewShell * _pCreatorView)
 {
        SwModule *pMod = SW_MOD();
-    if( pMod->pXSelection &&
-        ((!pMod->pXSelection->pWrtShell) || (pMod->pXSelection->pWrtShell == 
&rSh)) &&
+       if( pMod->pXSelection &&
+               ((!pMod->pXSelection->pWrtShell) || 
(pMod->pXSelection->pWrtShell == &rSh)) &&
                /* #96392# */
-        (!_pCreatorView || (pMod->pXSelection->pCreatorView == _pCreatorView)) 
)
+               (!_pCreatorView || (pMod->pXSelection->pCreatorView == 
_pCreatorView)) )
        {
                TransferableHelper::ClearSelection( rSh.GetWin() );
        }
@@ -3653,105 +3631,103 @@ void SwTransferable::ClearSelection( SwWrtShell& rSh,
  --------------------------------------------------*/
 const Sequence< sal_Int8 >& SwTransferable::getUnoTunnelId()
 {
-    static Sequence< sal_Int8 > aSeq;
-    if( !aSeq.getLength() )
-    {
-        static osl::Mutex           aCreateMutex;
-        osl::Guard< osl::Mutex >    aGuard( aCreateMutex );
-        aSeq.realloc( 16 );
-        rtl_createUuid( reinterpret_cast< sal_uInt8* >( aSeq.getArray() ), 0, 
sal_True );
-    }
-    return aSeq;
+       static Sequence< sal_Int8 > aSeq;
+       if( !aSeq.getLength() )
+       {
+               static osl::Mutex           aCreateMutex;
+               osl::Guard< osl::Mutex >    aGuard( aCreateMutex );
+               aSeq.realloc( 16 );
+               rtl_createUuid( reinterpret_cast< sal_uInt8* >( aSeq.getArray() 
), 0, sal_True );
+       }
+       return aSeq;
 }
 /* -----------------3/31/2003 11:46AM----------------
 
  --------------------------------------------------*/
 sal_Int64 SwTransferable::getSomething( const Sequence< sal_Int8 >& rId ) 
throw( RuntimeException )
 {
-    sal_Int64 nRet;
-    if( ( rId.getLength() == 16 ) &&
-        ( 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), 
rId.getConstArray(), 16 ) ) )
-    {
-        nRet = sal::static_int_cast< sal_Int64 >( reinterpret_cast< sal_IntPtr 
>( this ) );
-    }
-    else
-        nRet = TransferableHelper::getSomething(rId);
-    return nRet;
+       sal_Int64 nRet;
+       if( ( rId.getLength() == 16 ) &&
+               ( 0 == rtl_compareMemory( getUnoTunnelId().getConstArray(), 
rId.getConstArray(), 16 ) ) )
+       {
+               nRet = sal::static_int_cast< sal_Int64 >( reinterpret_cast< 
sal_IntPtr >( this ) );
+       }
+       else
+               nRet = TransferableHelper::getSomething(rId);
+       return nRet;
 }
 
 SwTransferable* SwTransferable::GetSwTransferable( const 
TransferableDataHelper& rData )
 {
-    SwTransferable* pSwTransferable = NULL;
+       SwTransferable* pSwTransferable = NULL;
 
-    uno::Reference<XUnoTunnel> xTunnel( rData.GetTransferable(), UNO_QUERY );
-    if ( xTunnel.is() )
-    {
-        sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() );
-        if ( nHandle )
-            pSwTransferable = (SwTransferable*) (sal_IntPtr) nHandle;
-    }
+       uno::Reference<XUnoTunnel> xTunnel( rData.GetTransferable(), UNO_QUERY 
);
+       if ( xTunnel.is() )
+       {
+               sal_Int64 nHandle = xTunnel->getSomething( getUnoTunnelId() );
+               if ( nHandle )
+                       pSwTransferable = (SwTransferable*) (sal_IntPtr) 
nHandle;
+       }
 
-    return pSwTransferable;
+       return pSwTransferable;
 
 }
 
-/* */
-
 // -----------------------------------------------------------------------
 
 SwTrnsfrDdeLink::SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh )
-    : rTrnsfr( rTrans ), pDocShell( 0 ),
-    bDelBookmrk( sal_False ), bInDisconnect( sal_False )
+       : rTrnsfr( rTrans ), pDocShell( 0 ),
+       bDelBookmrk( sal_False ), bInDisconnect( sal_False )
 {
-    // hier kommen wir nur bei Tabellen- oder Text-Selection an
-    const int nSelection = rSh.GetSelectionType();
-    if( nsSelectionType::SEL_TBL_CELLS & nSelection )
-    {
-        SwFrmFmt* pFmt = rSh.GetTableFmt();
-        if( pFmt )
-            sName = pFmt->GetName();
-    }
-    else
-    {
-        // creating a temp. bookmark without undo
-        sal_Bool bUndo = rSh.DoesUndo();
-        rSh.DoUndo( sal_False );
-        sal_Bool bIsModified = rSh.IsModified();
-
-        ::sw::mark::IMark* pMark = rSh.SetBookmark(
-            KeyCode(),
-            ::rtl::OUString(),
-            ::rtl::OUString(),
-            IDocumentMarkAccess::DDE_BOOKMARK);
-        if(pMark)
-        {
-            sName = pMark->GetName();
-            bDelBookmrk = sal_True;
-            if( !bIsModified )
-                rSh.ResetModified();
-        }
-        else
-            sName.Erase();
-        rSh.DoUndo( bUndo );
-    }
-
-    if( sName.Len() &&
-        0 != ( pDocShell = rSh.GetDoc()->GetDocShell() ) )
-    {
-        // dann erzeugen wir uns mal unseren "Server" und connecten uns
-        // zu diesem
-        refObj = pDocShell->DdeCreateLinkSource( sName );
-        if( refObj.Is() )
-        {
-            refObj->AddConnectAdvise( this );
-            refObj->AddDataAdvise( this,
-//                          SotExchange::GetFormatMimeType( FORMAT_RTF ),
-                            aEmptyStr,
-                            ADVISEMODE_NODATA | ADVISEMODE_ONLYONCE );
-            nOldTimeOut = refObj->GetUpdateTimeout();
-            refObj->SetUpdateTimeout( 0 );
-        }
-    }
+       // hier kommen wir nur bei Tabellen- oder Text-Selection an
+       const int nSelection = rSh.GetSelectionType();
+       if( nsSelectionType::SEL_TBL_CELLS & nSelection )
+       {
+               SwFrmFmt* pFmt = rSh.GetTableFmt();
+               if( pFmt )
+                       sName = pFmt->GetName();
+       }
+       else
+       {
+               // creating a temp. bookmark without undo
+               sal_Bool bUndo = rSh.DoesUndo();
+               rSh.DoUndo( sal_False );
+               sal_Bool bIsModified = rSh.IsModified();
+
+               ::sw::mark::IMark* pMark = rSh.SetBookmark(
+                       KeyCode(),
+                       ::rtl::OUString(),
+                       ::rtl::OUString(),
+                       IDocumentMarkAccess::DDE_BOOKMARK);
+               if(pMark)
+               {
+                       sName = pMark->GetName();
+                       bDelBookmrk = sal_True;
+                       if( !bIsModified )
+                               rSh.ResetModified();
+               }
+               else
+                       sName.Erase();
+               rSh.DoUndo( bUndo );
+       }
+
+       if( sName.Len() &&
+               0 != ( pDocShell = rSh.GetDoc()->GetDocShell() ) )
+       {
+               // dann erzeugen wir uns mal unseren "Server" und connecten uns
+               // zu diesem
+               refObj = pDocShell->DdeCreateLinkSource( sName );
+               if( refObj.Is() )
+               {
+                       refObj->AddConnectAdvise( this );
+                       refObj->AddDataAdvise( this,
+//                                             SotExchange::GetFormatMimeType( 
FORMAT_RTF ),
+                                                       aEmptyStr,
+                                                       ADVISEMODE_NODATA | 
ADVISEMODE_ONLYONCE );
+                       nOldTimeOut = refObj->GetUpdateTimeout();
+                       refObj->SetUpdateTimeout( 0 );
+               }
+       }
 }
 
 // -----------------------------------------------------------------------
@@ -3765,9 +3741,9 @@ SwTrnsfrDdeLink::~SwTrnsfrDdeLink()
 // -----------------------------------------------------------------------
 
 void SwTrnsfrDdeLink::DataChanged( const String& ,
-                                    const uno::Any& )
+                                                                       const 
uno::Any& )
 {
-       // tja das wars dann mit dem Link
+       // tja das war es dann mit dem Link
        if( !bInDisconnect )
        {
                if( FindDocShell() && pDocShell->GetView() )
@@ -3780,123 +3756,123 @@ void SwTrnsfrDdeLink::DataChanged( const String& ,
 
 sal_Bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm )
 {
-    if( !refObj.Is() || !FindDocShell() )
-        return sal_False;
-
-    rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
-    const ByteString aAppNm( GetpApp()->GetAppName(), eEncoding );
-    const ByteString aTopic( pDocShell->GetTitle( SFX_TITLE_FULLNAME ),
-                            eEncoding );
-    const ByteString aName( sName, eEncoding );
-
-    sal_Char* pMem = new char[ aAppNm.Len() + aTopic.Len() + aName.Len() + 4 ];
-
-    xub_StrLen nLen = aAppNm.Len();
-    memcpy( pMem, aAppNm.GetBuffer(), nLen );
-    pMem[ nLen++ ] = 0;
-    memcpy( pMem + nLen, aTopic.GetBuffer(), aTopic.Len() );
-    nLen = nLen + aTopic.Len();
-    pMem[ nLen++ ] = 0;
-    memcpy( pMem + nLen, aName.GetBuffer(), aName.Len() );
-    nLen = nLen + aName.Len();
-    pMem[ nLen++ ] = 0;
-    pMem[ nLen++ ] = 0;
-
-    rStrm.Write( pMem, nLen );
-    delete[] pMem;
-
-    IDocumentMarkAccess* const pMarkAccess = 
pDocShell->GetDoc()->getIDocumentMarkAccess();
-    IDocumentMarkAccess::const_iterator_t ppMark = 
pMarkAccess->findMark(sName);
-    if(ppMark != pMarkAccess->getAllMarksEnd()
-        && IDocumentMarkAccess::GetType(**ppMark) != 
IDocumentMarkAccess::BOOKMARK)
-    {
-        // the mark is still a DdeBookmark
-        // we replace it with a Bookmark, so it will get saved etc.
-        ::sw::mark::IMark* const pMark = ppMark->get();
-        SwServerObject* const pServerObject = dynamic_cast<SwServerObject 
*>(&refObj);
-
-        // collecting state of old mark
-        SwPaM aPaM(pMark->GetMarkStart());
-        *aPaM.GetPoint() = pMark->GetMarkStart();
-        if(pMark->IsExpanded())
-        {
-            aPaM.SetMark();
-            *aPaM.GetMark() = pMark->GetMarkEnd();
-        }
-        ::rtl::OUString sMarkName = pMark->GetName();
-
-        // remove mark
-        pServerObject->SetNoServer(); // this removes the connection between 
SwServerObject and mark
-        // N.B. ppMark was not loaded from file and cannot have xml:id
-        pMarkAccess->deleteMark(ppMark);
-
-        // recreate as Bookmark
-        ::sw::mark::IMark* const pNewMark = pMarkAccess->makeMark(
-            aPaM,
-            sMarkName,
-            IDocumentMarkAccess::BOOKMARK);
-        pServerObject->SetDdeBookmark(*pNewMark);
-    }
-
-    bDelBookmrk = false;
-    return true;
+       if( !refObj.Is() || !FindDocShell() )
+               return sal_False;
+
+       rtl_TextEncoding eEncoding = DDE_TXT_ENCODING;
+       const ByteString aAppNm( GetpApp()->GetAppName(), eEncoding );
+       const ByteString aTopic( pDocShell->GetTitle( SFX_TITLE_FULLNAME ),
+                                                       eEncoding );
+       const ByteString aName( sName, eEncoding );
+
+       sal_Char* pMem = new char[ aAppNm.Len() + aTopic.Len() + aName.Len() + 
4 ];
+
+       xub_StrLen nLen = aAppNm.Len();
+       memcpy( pMem, aAppNm.GetBuffer(), nLen );
+       pMem[ nLen++ ] = 0;
+       memcpy( pMem + nLen, aTopic.GetBuffer(), aTopic.Len() );
+       nLen = nLen + aTopic.Len();
+       pMem[ nLen++ ] = 0;
+       memcpy( pMem + nLen, aName.GetBuffer(), aName.Len() );
+       nLen = nLen + aName.Len();
+       pMem[ nLen++ ] = 0;
+       pMem[ nLen++ ] = 0;
+
+       rStrm.Write( pMem, nLen );
+       delete[] pMem;
+
+       IDocumentMarkAccess* const pMarkAccess = 
pDocShell->GetDoc()->getIDocumentMarkAccess();
+       IDocumentMarkAccess::const_iterator_t ppMark = 
pMarkAccess->findMark(sName);
+       if(ppMark != pMarkAccess->getAllMarksEnd()
+               && IDocumentMarkAccess::GetType(**ppMark) != 
IDocumentMarkAccess::BOOKMARK)
+       {
+               // the mark is still a DdeBookmark
+               // we replace it with a Bookmark, so it will get saved etc.
+               ::sw::mark::IMark* const pMark = ppMark->get();
+               SwServerObject* const pServerObject = 
dynamic_cast<SwServerObject *>(&refObj);
+
+               // collecting state of old mark
+               SwPaM aPaM(pMark->GetMarkStart());
+               *aPaM.GetPoint() = pMark->GetMarkStart();
+               if(pMark->IsExpanded())
+               {
+                       aPaM.SetMark();
+                       *aPaM.GetMark() = pMark->GetMarkEnd();
+               }
+               ::rtl::OUString sMarkName = pMark->GetName();
+
+               // remove mark
+               pServerObject->SetNoServer(); // this removes the connection 
between SwServerObject and mark
+               // N.B. ppMark was not loaded from file and cannot have xml:id
+               pMarkAccess->deleteMark(ppMark);
+
+               // recreate as Bookmark
+               ::sw::mark::IMark* const pNewMark = pMarkAccess->makeMark(
+                       aPaM,
+                       sMarkName,
+                       IDocumentMarkAccess::BOOKMARK);
+               pServerObject->SetDdeBookmark(*pNewMark);
+       }
+
+       bDelBookmrk = false;
+       return true;
 }
 
 // -----------------------------------------------------------------------
 
 void SwTrnsfrDdeLink::Disconnect( sal_Bool bRemoveDataAdvise )
 {
-    //JP 29.01.96 Bug 24432:
-    //         kein DataChanged mehr entgegen nehmen, wenn man
-    //         sich schon im Disconnet befindet!
-    //                 (DTOR vom Bookmark verschickt einen DataChanged!)
-    const sal_Bool bOldDisconnect = bInDisconnect;
-    bInDisconnect = sal_True;
-
-    // den nicht verwendeten Bookmark wieder zerstoeren (ohne Undo!)?
-    if( bDelBookmrk && refObj.Is() && FindDocShell() )
-    {
-        SwDoc* pDoc = pDocShell->GetDoc();
-        ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
-
-        // --> OD, CD, OS 2005-11-25 #i58448#
-        Link aSavedOle2Link( pDoc->GetOle2Link() );
-        pDoc->SetOle2Link( Link() );
-        // <--
-        sal_Bool bIsModified = pDoc->IsModified();
-
-        IDocumentMarkAccess* const pMarkAccess = 
pDoc->getIDocumentMarkAccess();
-        // check, if DdeBookmark is already in its destruction
-        IDocumentMarkAccess::const_iterator_t ppMark = 
pMarkAccess->findMark(sName);
-        if ( ppMark != pMarkAccess->getAllMarksEnd() )
-        {
-            ::sw::mark::DdeBookmark* const pDdeBookmark = dynamic_cast< 
::sw::mark::DdeBookmark* >(ppMark->get());
-            if ( pDdeBookmark && !pDdeBookmark->IsInDestruction() )
-            {
-                pMarkAccess->deleteMark(ppMark);
-            }
-        }
-
-        if( !bIsModified )
-            pDoc->ResetModified();
-        pDoc->SetOle2Link( aSavedOle2Link );
-
-        bDelBookmrk = sal_False;
-    }
-
-    if( refObj.Is() )
-    {
-        refObj->SetUpdateTimeout( nOldTimeOut );
-        refObj->RemoveConnectAdvise( this );
-        if( bRemoveDataAdvise )
-            // in einem DataChanged darf das SelectionObject NIE geloescht
-            // werden; wird schon von der Basisklasse erledigt
-            // (ADVISEMODE_ONLYONCE!!!!)
-            // Im normalen Disconnet aber schon!
-            refObj->RemoveAllDataAdvise( this );
-        refObj.Clear();
-    }
-    bInDisconnect = bOldDisconnect;
+       //JP 29.01.96 Bug 24432:
+       //              kein DataChanged mehr entgegen nehmen, wenn man
+       //              sich schon im Disconnect befindet!
+       //              (DTOR vom Bookmark verschickt einen DataChanged!)
+       const sal_Bool bOldDisconnect = bInDisconnect;
+       bInDisconnect = sal_True;
+
+       // den nicht verwendeten Bookmark wieder zerstören (ohne Undo!)?
+       if( bDelBookmrk && refObj.Is() && FindDocShell() )
+       {
+               SwDoc* pDoc = pDocShell->GetDoc();
+               ::sw::UndoGuard const undoGuard(pDoc->GetIDocumentUndoRedo());
+
+               // --> OD, CD, OS 2005-11-25 #i58448#
+               Link aSavedOle2Link( pDoc->GetOle2Link() );
+               pDoc->SetOle2Link( Link() );
+               // <--
+               sal_Bool bIsModified = pDoc->IsModified();
+
+               IDocumentMarkAccess* const pMarkAccess = 
pDoc->getIDocumentMarkAccess();
+               // check, if DdeBookmark is already in its destruction
+               IDocumentMarkAccess::const_iterator_t ppMark = 
pMarkAccess->findMark(sName);
+               if ( ppMark != pMarkAccess->getAllMarksEnd() )
+               {
+                       ::sw::mark::DdeBookmark* const pDdeBookmark = 
dynamic_cast< ::sw::mark::DdeBookmark* >(ppMark->get());
+                       if ( pDdeBookmark && !pDdeBookmark->IsInDestruction() )
+                       {
+                               pMarkAccess->deleteMark(ppMark);
+                       }
+               }
+
+               if( !bIsModified )
+                       pDoc->ResetModified();
+               pDoc->SetOle2Link( aSavedOle2Link );
+
+               bDelBookmrk = sal_False;
+       }
+
+       if( refObj.Is() )
+       {
+               refObj->SetUpdateTimeout( nOldTimeOut );
+               refObj->RemoveConnectAdvise( this );
+               if( bRemoveDataAdvise )
+                       // in einem DataChanged darf das SelectionObject NIE 
gelöscht
+                       // werden; wird schon von der Basisklasse erledigt
+                       // (ADVISEMODE_ONLYONCE!!!!)
+                       // Im normalen Disconnect aber schon!
+                       refObj->RemoveAllDataAdvise( this );
+               refObj.Clear();
+       }
+       bInDisconnect = bOldDisconnect;
 }
 
 // -----------------------------------------------------------------------
@@ -3907,11 +3883,11 @@ sal_Bool SwTrnsfrDdeLink::FindDocShell()
        SfxObjectShell* pTmpSh = SfxObjectShell::GetFirst( &aType );
        while( pTmpSh )
        {
-               if( pTmpSh == pDocShell )               // die wollen wir haben
+               if( pTmpSh == pDocShell ) // die wollen wir haben
                {
                        if( pDocShell->GetDoc() )
                                return sal_True;
-                       break;          // das Doc ist nicht mehr vorhanden, 
also raus!
+                       break; // das Doc ist nicht mehr vorhanden, also raus!
                }
                pTmpSh = SfxObjectShell::GetNext( *pTmpSh, &aType );
        }
@@ -3931,3 +3907,5 @@ void SwTrnsfrDdeLink::Closed()
                refObj.Clear();
        }
 }
+
+/* vim: set noet sw=4 ts=4: */

Reply via email to