diff options
author | os <os@openoffice.org> | 2010-10-05 09:47:37 +0200 |
---|---|---|
committer | os <os@openoffice.org> | 2010-10-05 09:47:37 +0200 |
commit | 741b92c15a133ddbc343916d913e35ddd2e4d91b (patch) | |
tree | 6445ec0b669b9e8fd44e078f1ee520b53a67c469 | |
parent | c7ecdf195bd546b08191de4aeef94820183c4227 (diff) |
#i114081# SID_MAIL_PREPAREEXPORT re-implemented
-rw-r--r-- | sw/sdi/_docsh.sdi | 5 | ||||
-rwxr-xr-x | sw/source/ui/app/docsh.cxx | 17 | ||||
-rw-r--r-- | sw/source/ui/app/docsh2.cxx | 14 |
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(); |