[Libreoffice-commits] .: Branch 'libreoffice-3-3' - 2 commits - filter/source
Thorsten Behrens
thorsten at kemper.freedesktop.org
Tue Feb 1 15:11:35 PST 2011
filter/source/graphicfilter/eps/eps.cxx | 16 +++++++++++++++-
filter/source/graphicfilter/eps/makefile.mk | 2 +-
filter/source/svg/svgreader.cxx | 8 ++++++++
3 files changed, 24 insertions(+), 2 deletions(-)
New commits:
commit ecda6f3b42d84e88d35d4d6bd4ea5cc32b9b8c89
Author: Takeshi Kurosawa <taken.spc at gmail.com>
Date: Thu Jan 27 14:31:57 2011 +0900
Use product name for EPS Creator header
(cherry picked from commit 2d07f1d678dc868687a9ae8c326b766e7def21c2)
Signed-off-by: Thorsten Behrens <tbehrens at novell.com>
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 083e9df..dd127e0 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -44,6 +44,7 @@
#include <vcl/msgbox.hxx>
#include <vcl/cvtgrf.hxx>
#include <vcl/gradient.hxx>
+#include <unotools/configmgr.hxx>
#include <svl/solar.hrc>
#include <svtools/fltcall.hxx>
#include <svtools/FilterConfigItem.hxx>
@@ -54,6 +55,8 @@
#include <math.h>
+using namespace ::com::sun::star::uno;
+
#define POSTSCRIPT_BOUNDINGSEARCH 0x1000 // we only try to get the BoundingBox
// in the first 4096 bytes
@@ -459,7 +462,18 @@ void PSWriter::ImplWriteProlog( const Graphic* pPreview )
ImplWriteLong( aSizePoint.Width() );
ImplWriteLong( aSizePoint.Height() ,PS_RET );
ImplWriteLine( "%%Pages: 0" );
- ImplWriteLine( "%%Creator: Sun Microsystems, Inc." );
+ ::rtl::OUStringBuffer aCreator;
+ aCreator.appendAscii( RTL_CONSTASCII_STRINGPARAM( "%%Creator: " ) );
+ ::utl::ConfigManager& rMgr = ::utl::ConfigManager::GetConfigManager();
+ Any aProductName = rMgr.GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
+ ::rtl::OUString sProductName;
+ aProductName >>= sProductName;
+ aCreator.append( sProductName );
+ aProductName = rMgr.GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION );
+ aProductName >>= sProductName;
+ aCreator.appendAscii( RTL_CONSTASCII_STRINGPARAM( " " ) );
+ aCreator.append( sProductName );
+ ImplWriteLine( ::rtl::OUStringToOString( aCreator.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ).getStr() );
ImplWriteLine( "%%Title: none" );
ImplWriteLine( "%%CreationDate: none" );
diff --git a/filter/source/graphicfilter/eps/makefile.mk b/filter/source/graphicfilter/eps/makefile.mk
index 34c87f1..1c58e61 100644
--- a/filter/source/graphicfilter/eps/makefile.mk
+++ b/filter/source/graphicfilter/eps/makefile.mk
@@ -60,7 +60,7 @@ RESLIB1SRSFILES=$(SRS)$/$(TARGET).srs
.IF "$(L10N_framework)"==""
SHL1TARGET= eps$(DLLPOSTFIX)
SHL1IMPLIB= eps
-SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(VCLLIB) $(SVTOOLLIB) $(CPPULIB) $(SALLIB)
+SHL1STDLIBS= $(TOOLSLIB) $(VCLLIB) $(VCLLIB) $(SVTOOLLIB) $(CPPULIB) $(SALLIB) $(UNOTOOLSLIB)
SHL1LIBS= $(SLB)$/eps.lib
commit dd73734f0440787d84ddbe5737e7f996803dacf2
Author: Takeshi Kurosawa <taken.spc at gmail.com>
Date: Thu Jan 27 13:45:16 2011 +0900
Parse 'color' property (fdo#33551)
Parse 'color' property and store the value as currentColor.
(cherry picked from commit d4bac116d0c35d8811a048fdd991363a32df14ca)
Signed-off-by: Thorsten Behrens <tbehrens at novell.com>
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 60f7bf4..cae3e10 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -990,6 +990,14 @@ struct AnnotatingVisitor
rParent.maStrokeGradient );
break;
}
+ case XML_COLOR:
+ {
+ if( aValueUtf8 == "inherit" )
+ maCurrState.maCurrentColor = maParentStates.back().maCurrentColor;
+ else
+ parseColor(aValueUtf8, maCurrState.maCurrentColor);
+ break;
+ }
case XML_TRANSFORM:
{
basegfx::B2DHomMatrix aTransform;
More information about the Libreoffice-commits
mailing list