[Libreoffice-commits] core.git: Changes to 'refs/changes/44/6144/3'

2014-09-29 Thread Brennan Vincent

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/44/6144/2'

2014-09-29 Thread Brennan Vincent

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Changes to 'refs/changes/44/6144/4'

2014-09-29 Thread Brennan Vincent

___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: include/vcl include/xmloff vcl/Library_vcl.mk vcl/source xmloff/source

2013-11-13 Thread Brennan Vincent
 include/vcl/embeddedfontshelper.hxx   |5 -
 include/xmloff/xmltoken.hxx   |1 
 vcl/Library_vcl.mk|1 
 vcl/source/gdi/embeddedfontshelper.cxx|   63 ++--
 vcl/source/gdi/pdfwriter_impl.cxx |6 +
 xmloff/source/core/xmltoken.cxx   |1 
 xmloff/source/style/XMLFontStylesContext.cxx  |   67 +-
 xmloff/source/style/XMLFontStylesContext_impl.hxx |   33 ++
 8 files changed, 165 insertions(+), 12 deletions(-)

New commits:
commit 5ce50b8d171c9d86d2175dd35b1e7ef23255e895
Author: Brennan Vincent 
Date:   Sat Oct 5 16:50:24 2013 -0700

Respect svg:font-face-format element.

Call libeot to parse font if value "embedded-opentype" is found.

Change-Id: I03a072fd4db47d151a3934e959ad17c1e24fcf09
Reviewed-on: https://gerrit.libreoffice.org/6144
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/include/vcl/embeddedfontshelper.hxx 
b/include/vcl/embeddedfontshelper.hxx
index 2250aa3..b02431e 100644
--- a/include/vcl/embeddedfontshelper.hxx
+++ b/include/vcl/embeddedfontshelper.hxx
@@ -44,10 +44,11 @@ public:
   @param fontName name of the font (e.g. 'Times New Roman')
   @param extra additional text to use for name (e.g. to distinguish 
regular from bold, italic,...), "?" for unique
   @param key key to xor the data with, from the start until the key's 
length (not repeated)
+  @param eot whether the data is compressed in Embedded OpenType format
 */
 static bool addEmbeddedFont( com::sun::star::uno::Reference< 
com::sun::star::io::XInputStream > stream,
 const OUString& fontName, const char* extra,
-std::vector< unsigned char > key = std::vector< unsigned char >());
+std::vector< unsigned char > key = std::vector< unsigned char >(), 
bool eot = false);
 
 /**
   Returns an URL for a file where to store contents of a given temporary 
font.
@@ -75,7 +76,7 @@ public:
   @param size size of the font data
   @param rights type of operation to be allowed for the font
 */
-static bool sufficientFontRights( const void* data, long size, FontRights 
rights );
+static bool sufficientTTFRights( const void* data, long size, FontRights 
rights );
 
 /**
   Removes all temporary fonts in the path used by 
fileUrlForTemporaryFont().
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 33f2bee..bb585c6 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -2482,6 +2482,7 @@ namespace xmloff { namespace token {
 XML_FONT_FACE,
 XML_FONT_FACE_SRC,
 XML_FONT_FACE_URI,
+XML_FONT_FACE_FORMAT,
 XML_FONT_ADORNMENTS,
 XML_INCH,
 XML_SPACE_AFTER,
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index fd24589..38cf55a 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -58,6 +58,7 @@ $(eval $(call gb_Library_use_custom_headers,vcl,\
 $(eval $(call gb_Library_use_externals,vcl,\
jpeg \
nss3 \
+   libeot \
 ))
 
 $(eval $(call gb_Library_use_libraries,vcl,\
diff --git a/vcl/source/gdi/embeddedfontshelper.cxx 
b/vcl/source/gdi/embeddedfontshelper.cxx
index 3460f78..c3101df 100644
--- a/vcl/source/gdi/embeddedfontshelper.cxx
+++ b/vcl/source/gdi/embeddedfontshelper.cxx
@@ -18,16 +18,29 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 
+#include 
+
+#if ENABLE_EOT
+extern "C"
+{
+namespace libeot
+{
+#include 
+} // namespace libeot
+} // extern "C"
+#endif
+
 using namespace com::sun::star;
 using namespace vcl;
 
 static void clearDir( const OUString& path )
-{
+{
 osl::Directory dir( path );
 if( dir.reset() == osl::Directory::E_None )
 {
@@ -53,7 +66,7 @@ void EmbeddedFontsHelper::clearTemporaryFontFiles()
 }
 
 bool EmbeddedFontsHelper::addEmbeddedFont( uno::Reference< io::XInputStream > 
stream, const OUString& fontName,
-const char* extra, std::vector< unsigned char > key )
+const char* extra, std::vector< unsigned char > key, bool eot )
 {
 OUString fileUrl = EmbeddedFontsHelper::fileUrlForTemporaryFont( fontName, 
extra );
 osl::File file( fileUrl );
@@ -78,7 +91,8 @@ bool EmbeddedFontsHelper::addEmbeddedFont( uno::Reference< 
io::XInputStream > st
  pos < read && keyPos < key.size();
  ++pos )
 buffer[ pos ] ^= key[ keyPos++ ];
-if( read > 0 )
+// if eot, don't write the file out yet, since we need to unpack it 
first.
+if( !eot && read > 0 )
 {
 sal_uInt64 writtenTotal = 0;
 while( writtenTotal < read )
@@ -92,13 +106,50 @@ bool EmbeddedFontsHelper::addEmbeddedFont( uno::Reference< 
i

[Libreoffice-commits] .: writerperfect/source

2012-08-07 Thread Brennan Vincent
 writerperfect/source/filter/OdgGenerator.cxx |   30 +++
 1 file changed, 30 insertions(+)

New commits:
commit 1386ccc8edf467d69ebb4a06ea5f55940cf4024f
Author: Brennan Vincent 
Date:   Mon Aug 6 12:08:52 2012 -0700

Pass rgb/contrast/brightness filters through writerperfect to ODG

Change-Id: I2881e1b3439e52c1008d9d50d00c897ddc81071f

diff --git a/writerperfect/source/filter/OdgGenerator.cxx 
b/writerperfect/source/filter/OdgGenerator.cxx
index 1d333c7..f873343 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -1084,6 +1084,21 @@ void OdgGenerator::drawGraphicObject(const 
::WPXPropertyList &propList, const ::
 mpImpl->mxStyle.insert("style:mirror", "horizontal");
 else
 mpImpl->mxStyle.insert("style:mirror", "none");
+if (propList["draw:color-mode"])
+mpImpl->mxStyle.insert("draw:color-mode", 
propList["draw:color-mode"]->getStr());
+if (propList["draw:luminance"])
+mpImpl->mxStyle.insert("draw:luminance", 
propList["draw:luminance"]->getStr());
+if (propList["draw:contrast"])
+mpImpl->mxStyle.insert("draw:contrast", 
propList["draw:contrast"]->getStr());
+if (propList["draw:gamma"])
+mpImpl->mxStyle.insert("draw:gamma", propList["draw:gamma"]->getStr());
+if (propList["draw:red"])
+mpImpl->mxStyle.insert("draw:red", propList["draw:red"]->getStr());
+if (propList["draw:green"])
+mpImpl->mxStyle.insert("draw:green", propList["draw:green"]->getStr());
+if (propList["draw:blue"])
+mpImpl->mxStyle.insert("draw:blue", propList["draw:blue"]->getStr());
+
 
 mpImpl->_writeGraphicsStyle();
 
@@ -1380,6 +1395,21 @@ void OdgGeneratorPrivate::_writeGraphicsStyle()
 
 TagOpenElement *pStyleGraphicsPropertiesElement = new 
TagOpenElement("style:graphic-properties");
 
+if (mxStyle["draw:color-mode"] && 
mxStyle["draw:color-mode"]->getStr().len() > 0)
+pStyleGraphicsPropertiesElement->addAttribute("draw:color-mode", 
mxStyle["draw:color-mode"]->getStr());
+if (mxStyle["draw:luminance"] && mxStyle["draw:luminance"]->getStr().len() 
> 0)
+pStyleGraphicsPropertiesElement->addAttribute("draw:luminance", 
mxStyle["draw:luminance"]->getStr());
+if (mxStyle["draw:contrast"] && mxStyle["draw:contrast"]->getStr().len() > 
0)
+pStyleGraphicsPropertiesElement->addAttribute("draw:contrast", 
mxStyle["draw:contrast"]->getStr());
+if (mxStyle["draw:gamma"] && mxStyle["draw:gamma"]->getStr().len() > 0)
+pStyleGraphicsPropertiesElement->addAttribute("draw:gamma", 
mxStyle["draw:gamma"]->getStr());
+if (mxStyle["draw:red"] && mxStyle["draw:red"]->getStr().len() > 0)
+pStyleGraphicsPropertiesElement->addAttribute("draw:red", 
mxStyle["draw:red"]->getStr());
+if (mxStyle["draw:green"] && mxStyle["draw:green"]->getStr().len() > 0)
+pStyleGraphicsPropertiesElement->addAttribute("draw:green", 
mxStyle["draw:green"]->getStr());
+if (mxStyle["draw:blue"] && mxStyle["draw:blue"]->getStr().len() > 0)
+pStyleGraphicsPropertiesElement->addAttribute("draw:blue", 
mxStyle["draw:blue"]->getStr());
+
 if (mxStyle["draw:stroke"] && mxStyle["draw:stroke"]->getStr() == "none")
 pStyleGraphicsPropertiesElement->addAttribute("draw:stroke", "none");
 else
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[GSoC] Introducing myself

2012-04-24 Thread Brennan Vincent

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all,

I'm very excited to announce that I've been chosen as one of the 
participants in this year's Google Summer of Code program. As such, I will 
be working with Fridrich and Valek to write an import filter for the 
Microsoft Publisher format. Before I start coding and while I wait for the 
semester to end, I will be working on familiarizing myself with the 
existing import filters to get a feel for how they work -- I am already 
somewhat familiar with the RTF filter, but would like to read and 
understand one or two of the more complicated ones. I will also be looking 
at what code my mentors have already created for working with Publisher 
files. That said, I hope to begin actual coding as soon as possible.


As for me, I'm in my 3rd year out of 4 in a degree in Mathematics at the 
University of Arizona. After I get my degree, I hope to either become a 
full-time programmer or go to graduate school in mathematics.


I look forward to being a part of the LibreOffice team! :)

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJPlnYeAAoJEDwHOuRReN7WH+oIAIhvq0TGmKZJ1O4VlQ6jN/Q9
4/O0h1XtvXbUibo2Gfqp2TJf5UHzxBNYQRZFuo+wvRi70DfS3hTggJUW+/BaC1QV
8QCfFpQJ5OsvFUUA9cDV3ghvl2qicdOpvGrUqygATGJCzX1J0VJHb7Rfv+B5q3eo
hx5bxcdKKQ0WroK5kirmNAPbjLfAcbFj8szmhVEkO7Hl0K/pAldWUdI0FhwkPTjZ
beXoKE6EL9o7QM8EOjMIzscu4v1oP/HOrveiowZgeeoaWOOKvE5MRWDWU6dVCM3i
8/YyJFswqwrki0M5o4GqJAbQmpdkYA5GzqwbRzY1T+gaFbEcPOpYebAshh7UBcU=
=zzlo
-END PGP SIGNATURE-
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice