summaryrefslogtreecommitdiff
path: root/xmloff/source/style/XMLFontAutoStylePool.cxx
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2013-02-21 23:33:10 +0100
committerDavid Ostrovsky <david@ostrovsky.org>2013-02-21 23:34:47 +0100
commitcad65120c6da901bf9fe33ab16ad22217efed0c0 (patch)
tree1689b74b1ca068d5d4e06b57ab9d35d0e009ee7d /xmloff/source/style/XMLFontAutoStylePool.cxx
parenta07dd698bf8044db1c13dbd81a5bc6e62225788c (diff)
Revert "embed also system fonts when embedding fonts in a document"
that's enouph breakage for now. This reverts commit 596bd0f61f8cfc957410148ae221c62331067bdd. Change-Id: I992f439a9a099e47115a30b3d745848f3af09e5e
Diffstat (limited to 'xmloff/source/style/XMLFontAutoStylePool.cxx')
-rw-r--r--xmloff/source/style/XMLFontAutoStylePool.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/xmloff/source/style/XMLFontAutoStylePool.cxx b/xmloff/source/style/XMLFontAutoStylePool.cxx
index e8c33aafdd71..9163ef593476 100644
--- a/xmloff/source/style/XMLFontAutoStylePool.cxx
+++ b/xmloff/source/style/XMLFontAutoStylePool.cxx
@@ -25,7 +25,7 @@
#include "fonthdl.hxx"
#include <xmloff/xmlexp.hxx>
#include <xmloff/XMLFontAutoStylePool.hxx>
-#include <vcl/embeddedfontshelper.hxx>
+#include <vcl/temporaryfonts.hxx>
#include <osl/file.hxx>
#include <com/sun/star/embed/ElementModes.hpp>
@@ -276,25 +276,18 @@ void XMLFontAutoStylePool::exportXML()
{
std::vector< OUString > fileUrls;
static const char* const styles[] = { "", "b", "i", "bi" };
- static const FontWeight weight[] = { WEIGHT_NORMAL, WEIGHT_BOLD, WEIGHT_NORMAL, WEIGHT_BOLD };
- static const FontItalic italic[] = { ITALIC_NONE, ITALIC_NONE, ITALIC_NORMAL, ITALIC_NORMAL };
- assert( SAL_N_ELEMENTS( styles ) == SAL_N_ELEMENTS( italic ));
- assert( SAL_N_ELEMENTS( styles ) == SAL_N_ELEMENTS( weight ));
for( unsigned int j = 0;
j < SAL_N_ELEMENTS( styles );
++j )
{
- OUString fileUrl = EmbeddedFontsHelper::fontFileUrl( pEntry->GetFamilyName(), pEntry->GetFamily(),
- italic[ j ], weight[ j ], pEntry->GetPitch(), pEntry->GetEncoding());
- if( fileUrl.isEmpty())
- continue;
+ OUString fileUrl = TemporaryFonts::fileUrlForFont( pEntry->GetFamilyName(), styles[ j ] );
if( !fontFilesMap.count( fileUrl ))
{
OUString docUrl = embedFontFile( fileUrl, styles[ j ] );
if( !docUrl.isEmpty())
fontFilesMap[ fileUrl ] = docUrl;
else
- continue; // --> failed to embed
+ continue; // --> failed (most probably this font is not embedded)
}
fileUrls.push_back( fileUrl );
}