summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/sdi/_docsh.sdi5
-rwxr-xr-xsw/source/ui/app/docsh.cxx17
-rw-r--r--sw/source/ui/app/docsh2.cxx14
3 files changed, 35 insertions, 1 deletions
diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi
index cd2d1f850090..1c5b0db4f062 100644
--- a/sw/sdi/_docsh.sdi
+++ b/sw/sdi/_docsh.sdi
@@ -132,6 +132,11 @@ interface BaseTextDocument
ExecMethod = Execute;
StateMethod = GetState;
]
+ SID_MAIL_PREPAREEXPORT
+ [
+ ExecMethod = Execute ;
+ StateMethod = GetState;
+ ]
}
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index c7ee43255f3b..e606c2284acf 100755
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -1147,6 +1147,23 @@ void SwDocShell::GetState(SfxItemSet& rSet)
rSet.Put( SvxFontListItem( pFontList, SID_ATTR_CHAR_FONTLIST ) );
}
break;
+ case SID_MAIL_PREPAREEXPORT:
+ {
+ //check if linked content or possibly hidden content is available
+ //pDoc->UpdateFlds( NULL, false );
+ sfx2::LinkManager& rLnkMgr = pDoc->GetLinkManager();
+ const ::sfx2::SvBaseLinks& rLnks = rLnkMgr.GetLinks();
+ sal_Bool bRet = sal_False;
+ if( rLnks.Count() )
+ bRet = sal_True;
+ else
+ {
+ //sections with hidden flag, hidden character attribute, hidden paragraph/text or conditional text fields
+ bRet = pDoc->HasInvisibleContent();
+ }
+ rSet.Put( SfxBoolItem( nWhich, bRet ) );
+ }
+ break;
default: DBG_ASSERT(!this,"Hier darfst Du nicht hinein!");
diff --git a/sw/source/ui/app/docsh2.cxx b/sw/source/ui/app/docsh2.cxx
index 9cb3caffa7cc..cb21c8939bd1 100644
--- a/sw/source/ui/app/docsh2.cxx
+++ b/sw/source/ui/app/docsh2.cxx
@@ -1169,7 +1169,19 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
break;
- case SID_MAIL_EXPORT_FINISHED:
+ case SID_MAIL_PREPAREEXPORT:
+ {
+ //pWrtShell is not set in page preview
+ if(pWrtShell)
+ pWrtShell->StartAllAction();
+ pDoc->UpdateFlds( NULL, false );
+ pDoc->EmbedAllLinks();
+ pDoc->RemoveInvisibleContent();
+ if(pWrtShell)
+ pWrtShell->EndAllAction();
+ }
+ break;
+ case SID_MAIL_EXPORT_FINISHED:
{
if(pWrtShell)
pWrtShell->StartAllAction();