summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2013-01-23 15:22:28 +0100
committerLuboš Luňák <l.lunak@suse.cz>2013-02-01 14:20:33 +0100
commit32e3ede97ec6bad1b3c19545709b54eff29eafc6 (patch)
treede0ec7ae2e2381da6a1a69b91fb280ae995a1a44
parent65e294e618e077ad6999ef24f9e6047c2a838b7d (diff)
make sure newly created SwDocShell has font info up to date
http://lists.freedesktop.org/archives/libreoffice/2012-September/038163.html Change-Id: I41a195180411800f72b8e251b5c19553a51cde44
-rw-r--r--sw/source/ui/uiview/view.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 44fa0439bcdf..1d27f8d75ed2 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -778,6 +778,12 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
sal_Bool bOldModifyFlag = pDocSh->IsEnableSetModified();
if(bOldModifyFlag)
pDocSh->EnableSetModified( sal_False );
+ // HACK: SwDocShell has some cached font info, VCL informs about font updates,
+ // but loading of docs with embedded fonts happens after SwDocShell is created
+ // but before SwEditWin (which handles the VCL event) is created. So update
+ // manually.
+ if( pDocSh->GetDoc()->get( IDocumentSettingAccess::EMBED_FONTS ))
+ pDocSh->UpdateFontList();
OSL_ENSURE( pDocSh, "view without DocShell." );
SwWebDocShell* pWebDShell = PTR_CAST( SwWebDocShell, pDocSh );