[Libreoffice-commits] .: sw/inc sw/source

Kohei Yoshida kohei at kemper.freedesktop.org
Wed May 25 12:52:28 PDT 2011


 sw/inc/swbaslnk.hxx                 |    4 ++--
 sw/source/core/docnode/section.cxx  |   13 ++++++++-----
 sw/source/core/docnode/swbaslnk.cxx |   12 +++++++-----
 sw/source/core/fields/ddefld.cxx    |   10 ++++++----
 sw/source/core/ole/ndole.cxx        |    9 +++++----
 sw/source/ui/dochdl/swdtflvr.cxx    |    7 ++++---
 6 files changed, 32 insertions(+), 23 deletions(-)

New commits:
commit b1b3fa5b0acc78c5aef1e1a144f828e4cab81773
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Wed May 25 14:58:03 2011 -0400

    Adjusted for SvBaseLink change.

diff --git a/sw/inc/swbaslnk.hxx b/sw/inc/swbaslnk.hxx
index e593ed2..bc21f95 100644
--- a/sw/inc/swbaslnk.hxx
+++ b/sw/inc/swbaslnk.hxx
@@ -65,8 +65,8 @@ public:
     {}
     virtual ~SwBaseLink();
 
-    virtual void DataChanged( const String& rMimeType,
-                                const ::com::sun::star::uno::Any & rValue );
+    virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+        const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
 
     virtual void Closed();
 
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 21f02e4..ca4b4f2 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -86,8 +86,8 @@ public:
     {}
 
     virtual void Closed();
-    virtual void DataChanged( const String& rMimeType,
-                                const uno::Any & rValue );
+    virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+        const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
 
     virtual const SwNode* GetAnchor() const;
     virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
@@ -1336,8 +1336,9 @@ int lcl_FindDocShell( SfxObjectShellRef& xDocSh,
 }
 
 
-void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
-                                const uno::Any & rValue )
+
+::sfx2::SvBaseLink::UpdateResult SwIntrnlSectRefLink::DataChanged(
+    const String& rMimeType, const uno::Any & rValue )
 {
     SwSectionNode* pSectNd = rSectFmt.GetSectionNode( sal_False );
     SwDoc* pDoc = rSectFmt.GetDoc();
@@ -1348,7 +1349,7 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
         sfx2::LinkManager::RegisterStatusInfoId() == nDataFormat )
     {
         // sollten wir schon wieder im Undo stehen?
-        return ;
+        return SUCCESS;
     }
 
     //  #i38810# - Due to possible existing signatures, the
@@ -1609,6 +1610,8 @@ void SwIntrnlSectRefLink::DataChanged( const String& rMimeType,
     else if( pVSh )
         pVSh->EndAction();
     delete pPam;			// wurde am Anfang angelegt
+
+    return SUCCESS;
 }
 
 
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index 515559b..90e8c4e 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -94,20 +94,20 @@ void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
 }
 
 
-void SwBaseLink::DataChanged( const String& rMimeType,
-                            const uno::Any & rValue )
+::sfx2::SvBaseLink::UpdateResult SwBaseLink::DataChanged(
+    const String& rMimeType, const uno::Any & rValue )
 {
     if( !pCntntNode )
     {
         OSL_ENSURE(!this, "DataChanged ohne ContentNode" );
-        return ;
+        return ERROR_GENERAL;
     }
 
     SwDoc* pDoc = pCntntNode->GetDoc();
     if( pDoc->IsInDtor() || ChkNoDataFlag() || bIgnoreDataChanged )
     {
         bIgnoreDataChanged = sal_False;
-        return ;
+        return SUCCESS;
     }
 
     sal_uLong nFmt = SotExchange::GetFormatIdFromMimeType( rMimeType );
@@ -135,7 +135,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
                 pDoc->CallEvent( nEvent, aCallEvent );
             }
         }
-        return;			// das wars!
+        return SUCCESS;         // das wars!
     }
 
     sal_Bool bUpdate = sal_False;
@@ -297,6 +297,8 @@ void SwBaseLink::DataChanged( const String& rMimeType,
         if( pSh && !bLockView )
             pSh->LockView( sal_False );
     }
+
+    return SUCCESS;
 }
 
 sal_Bool SetGrfFlySize( const Size& rGrfSz, const Size& rFrmSz, SwGrfNode* pGrfNd )
diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx
index 50ef41f..1bf5974 100644
--- a/sw/source/core/fields/ddefld.cxx
+++ b/sw/source/core/fields/ddefld.cxx
@@ -62,8 +62,8 @@ public:
     {}
 
     virtual void Closed();
-    virtual void DataChanged( const String& rMimeType,
-                                const uno::Any & rValue );
+    virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+        const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
 
     virtual const SwNode* GetAnchor() const;
     virtual sal_Bool IsInRange( sal_uLong nSttNd, sal_uLong nEndNd, xub_StrLen nStt = 0,
@@ -71,7 +71,7 @@ public:
 };
 
 
-void SwIntrnlRefLink::DataChanged( const String& rMimeType,
+::sfx2::SvBaseLink::UpdateResult SwIntrnlRefLink::DataChanged( const String& rMimeType,
                                 const uno::Any & rValue )
 {
     switch( SotExchange::GetFormatIdFromMimeType( rMimeType ) )
@@ -105,7 +105,7 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
 
     // weitere Formate ...
     default:
-        return;
+        return SUCCESS;
     }
 
     OSL_ENSURE( rFldType.GetDoc(), "Kein pDoc" );
@@ -155,6 +155,8 @@ void SwIntrnlRefLink::DataChanged( const String& rMimeType,
                 pSh->GetDoc()->SetModified();
         }
     }
+
+    return SUCCESS;
 }
 
 void SwIntrnlRefLink::Closed()
diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx
index 394c691..19f6a48 100644
--- a/sw/source/core/ole/ndole.cxx
+++ b/sw/source/core/ole/ndole.cxx
@@ -169,8 +169,8 @@ public:
     virtual				~SwEmbedObjectLink();
 
     virtual void		Closed();
-    virtual void		DataChanged( const String& rMimeType,
-                                const uno::Any & rValue );
+    virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+        const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
 
     sal_Bool			Connect() { return GetRealObject() != NULL; }
 };
@@ -192,8 +192,8 @@ SwEmbedObjectLink::~SwEmbedObjectLink()
 
 // -----------------------------------------------------------------------------
 
-void SwEmbedObjectLink::DataChanged( const String& ,
-                                const uno::Any & )
+::sfx2::SvBaseLink::UpdateResult SwEmbedObjectLink::DataChanged(
+    const String&, const uno::Any& )
 {
     if ( !pOleNode->UpdateLinkURL_Impl() )
     {
@@ -222,6 +222,7 @@ void SwEmbedObjectLink::DataChanged( const String& ,
     }
 
     pOleNode->GetNewReplacement();
+    return SUCCESS;
 }
 
 // -----------------------------------------------------------------------------
diff --git a/sw/source/ui/dochdl/swdtflvr.cxx b/sw/source/ui/dochdl/swdtflvr.cxx
index 6d9434f..877c695 100644
--- a/sw/source/ui/dochdl/swdtflvr.cxx
+++ b/sw/source/ui/dochdl/swdtflvr.cxx
@@ -193,8 +193,8 @@ protected:
 public:
     SwTrnsfrDdeLink( SwTransferable& rTrans, SwWrtShell& rSh );
 
-    virtual void DataChanged( const String& rMimeType,
-                              const uno::Any & rValue );
+    virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
+        const String& rMimeType, const ::com::sun::star::uno::Any & rValue );
     virtual void Closed();
 
     sal_Bool WriteData( SvStream& rStrm );
@@ -3500,7 +3500,7 @@ SwTrnsfrDdeLink::~SwTrnsfrDdeLink()
         Disconnect( sal_True );
 }
 
-void SwTrnsfrDdeLink::DataChanged( const String& ,
+::sfx2::SvBaseLink::UpdateResult SwTrnsfrDdeLink::DataChanged( const String& ,
                                     const uno::Any& )
 {
     // well, that's it with the link
@@ -3510,6 +3510,7 @@ void SwTrnsfrDdeLink::DataChanged( const String& ,
             rTrnsfr.RemoveDDELinkFormat( pDocShell->GetView()->GetEditWin() );
         Disconnect( sal_False );
     }
+    return SUCCESS;
 }
 
 sal_Bool SwTrnsfrDdeLink::WriteData( SvStream& rStrm )


More information about the Libreoffice-commits mailing list