summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app
diff options
context:
space:
mode:
authorValentin Kettner <vakevk+libreoffice@gmail.com>2014-06-15 20:54:04 +0200
committerValentin Kettner <vakevk+libreoffice@gmail.com>2014-07-15 15:44:03 +0200
commit54ca3a6efa89eb2222abf0a51597074be25ce322 (patch)
tree1bedc9ab1816d9282fba35b2d9c9be007b1f89b1 /sw/source/uibase/app
parenta27e8f6c8dd81d1fa1a34a88890bcd944682146d (diff)
Refactored IDocumentLinksAdministration out of SwDoc.
To the new class DocumentLinksAdministrationManager. Additional to the Interface methods SwDoc::SelectServerObj was also moved and sw/source/core/doc/docdde.cxx was deleted as it became empty. Also fixed OUString usage in IDocumentLinksAdministration.hxx . Change-Id: I1f2bf0881a7d4add9c657b6441851ae14ad8d161
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r--sw/source/uibase/app/docsh.cxx13
-rw-r--r--sw/source/uibase/app/docsh2.cxx11
2 files changed, 17 insertions, 7 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index b2998a10e7cb..145c78722a35 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -70,6 +70,7 @@
#include <doc.hxx>
#include <IDocumentUndoRedo.hxx>
#include <IDocumentSettingAccess.hxx>
+#include <IDocumentLinksAdministration.hxx>
#include <IDocumentDeviceAccess.hxx>
#include <IDocumentDrawModelAccess.hxx>
#include <docstat.hxx>
@@ -1038,7 +1039,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
{
//check if linked content or possibly hidden content is available
//mpDoc->UpdateFlds( NULL, false );
- sfx2::LinkManager& rLnkMgr = mpDoc->GetLinkManager();
+ sfx2::LinkManager& rLnkMgr = mpDoc->getIDocumentLinksAdministration().GetLinkManager();
const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks();
bool bRet = false;
if( !rLnks.empty() )
@@ -1103,7 +1104,11 @@ void SwDocShell::LoadingFinished()
// enables the document modification again.
// Thus, manuell modify the document, if its modified and its links are updated
// before <FinishedLoading(..)> is called.
+<<<<<<< HEAD
const bool bHasDocToStayModified( mpDoc->IsModified() && mpDoc->LinksUpdated() );
+=======
+ const bool bHasDocToStayModified( pDoc->IsModified() && pDoc->getIDocumentLinksAdministration().LinksUpdated() );
+>>>>>>> Refactored IDocumentLinksAdministration out of SwDoc.
FinishedLoading( SFX_LOADED_ALL );
SfxViewFrame* pVFrame = SfxViewFrame::GetFirst(this);
@@ -1126,7 +1131,11 @@ void SwDocShell::CancelTransfers()
{
// Cancel all links from LinkManager
aFinishedTimer.Stop();
+<<<<<<< HEAD
mpDoc->GetLinkManager().CancelTransfers();
+=======
+ pDoc->getIDocumentLinksAdministration().GetLinkManager().CancelTransfers();
+>>>>>>> Refactored IDocumentLinksAdministration out of SwDoc.
SfxObjectShell::CancelTransfers();
}
@@ -1182,7 +1191,7 @@ void SwDocShell::CalcLayoutForOLEObjects()
// read by the binary filter:
void SwDocShell::UpdateLinks()
{
- GetDoc()->UpdateLinks(true);
+ GetDoc()->getIDocumentLinksAdministration().UpdateLinks(true);
// #i50703# Update footnote numbers
SwTxtFtn::SetUniqueSeqRefNo( *GetDoc() );
SwNodeIndex aTmp( GetDoc()->GetNodes() );
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index ad0aed99cdc2..8780c4b7db75 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -76,6 +76,7 @@
#include <IDocumentUndoRedo.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentDeviceAccess.hxx>
+#include <IDocumentLinksAdministration.hxx>
#include <pagedesc.hxx>
#include <shellio.hxx>
#include <pview.hxx>
@@ -826,7 +827,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
if(mpWrtShell)
mpWrtShell->StartAllAction();
mpDoc->UpdateFlds( NULL, false );
- mpDoc->EmbedAllLinks();
+ mpDoc->getIDocumentLinksAdministration().EmbedAllLinks();
mpDoc->RemoveInvisibleContent();
if(mpWrtShell)
mpWrtShell->EndAllAction();
@@ -1164,24 +1165,24 @@ void lcl_processCompatibleSfxHint( const uno::Reference< document::XVbaEventsHel
bool SwDocShell::DdeGetData( const OUString& rItem, const OUString& rMimeType,
uno::Any & rValue )
{
- return mpDoc->GetData( rItem, rMimeType, rValue );
+ return mpDoc->getIDocumentLinksAdministration().GetData( rItem, rMimeType, rValue );
}
bool SwDocShell::DdeSetData( const OUString& rItem, const OUString& rMimeType,
const uno::Any & rValue )
{
- return mpDoc->SetData( rItem, rMimeType, rValue );
+ return mpDoc->getIDocumentLinksAdministration().SetData( rItem, rMimeType, rValue );
}
::sfx2::SvLinkSource* SwDocShell::DdeCreateLinkSource( const OUString& rItem )
{
- return mpDoc->CreateLinkSource( rItem );
+ return mpDoc->getIDocumentLinksAdministration().CreateLinkSource( rItem );
}
void SwDocShell::ReconnectDdeLink(SfxObjectShell& rServer)
{
if ( mpDoc ) {
- ::sfx2::LinkManager& rLinkManager = mpDoc->GetLinkManager();
+ ::sfx2::LinkManager& rLinkManager = mpDoc->getIDocumentLinksAdministration().GetLinkManager();
rLinkManager.ReconnectDdeLink(rServer);
}
}