[Libreoffice-commits] .: writerperfect/source

Fridrich Strba fridrich at kemper.freedesktop.org
Thu Oct 27 01:25:40 PDT 2011


 writerperfect/source/filter/FontStyle.cxx               |    1 
 writerperfect/source/filter/InternalHandler.cxx         |    2 -
 writerperfect/source/filter/OdtGenerator.cxx            |    6 +++++
 writerperfect/source/filter/TextRunStyle.cxx            |   19 ++++++++++------
 writerperfect/source/filter/TextRunStyle.hxx            |    2 -
 writerperfect/source/filter/libwriterperfect_filter.cxx |    3 +-
 writerperfect/source/filter/libwriterperfect_filter.hxx |    4 ++-
 7 files changed, 26 insertions(+), 11 deletions(-)

New commits:
commit eac87fed20206377c5354eac6beccb90bb43ef20
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Thu Oct 27 08:39:31 2011 +0200

    Syncing with out-of-tree writerperfect

diff --git a/writerperfect/source/filter/FontStyle.cxx b/writerperfect/source/filter/FontStyle.cxx
index 9accf52..de1bd2e 100644
--- a/writerperfect/source/filter/FontStyle.cxx
+++ b/writerperfect/source/filter/FontStyle.cxx
@@ -88,5 +88,4 @@ WPXString FontStyleManager::findOrAdd(const char *psFontFamily)
     return psFontFamily;
 }
 
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/filter/InternalHandler.cxx b/writerperfect/source/filter/InternalHandler.cxx
index 8a1389d..cb68b01 100644
--- a/writerperfect/source/filter/InternalHandler.cxx
+++ b/writerperfect/source/filter/InternalHandler.cxx
@@ -33,7 +33,7 @@ InternalHandler::InternalHandler(std::vector<DocumentElement *> *elements):
 
 void InternalHandler::startElement(const char *psName, const WPXPropertyList &xPropList)
 {
-    TagOpenElement    *element = new TagOpenElement(psName);
+    TagOpenElement *element = new TagOpenElement(psName);
     WPXPropertyList::Iter i(xPropList);
     for (i.rewind(); i.next(); )
     {
diff --git a/writerperfect/source/filter/OdtGenerator.cxx b/writerperfect/source/filter/OdtGenerator.cxx
index 9533803..b597241 100644
--- a/writerperfect/source/filter/OdtGenerator.cxx
+++ b/writerperfect/source/filter/OdtGenerator.cxx
@@ -561,10 +561,16 @@ void OdtGenerator::openSection(const WPXPropertyList &propList, const WPXPropert
     int iNumColumns = columns.count();
     double fSectionMarginLeft = 0.0;
     double fSectionMarginRight = 0.0;
+    double fSectionSpaceAfter = 0.0;
     if (propList["fo:margin-left"])
         fSectionMarginLeft = propList["fo:margin-left"]->getDouble();
     if (propList["fo:margin-right"])
         fSectionMarginRight = propList["fo:margin-right"]->getDouble();
+    if (propList["fo:margin-bottom"])
+        fSectionSpaceAfter = propList["fo:margin-bottom"]->getDouble();
+    else if (propList["libwpd:margin-bottom"])
+        fSectionSpaceAfter =  propList["libwpd:margin-bottom"]->getDouble();
+
 
     if (iNumColumns > 1 || fSectionMarginLeft != 0 || fSectionMarginRight != 0)
     {
diff --git a/writerperfect/source/filter/TextRunStyle.cxx b/writerperfect/source/filter/TextRunStyle.cxx
index 35c6d27..e3ef8bb 100644
--- a/writerperfect/source/filter/TextRunStyle.cxx
+++ b/writerperfect/source/filter/TextRunStyle.cxx
@@ -200,21 +200,23 @@ void ParagraphStyleManager::write(OdfDocumentHandler *pHandler) const
     }
 }
 
-WPXString ParagraphStyleManager::getKey(const WPXPropertyList &xPropList, const WPXPropertyListVector &tabStops) const
+WPXString ParagraphStyleManager::getKey(WPXPropertyList const &xPropList, WPXPropertyListVector const &tabStops) const
 {
     WPXString sKey = propListToStyleKey(xPropList);
 
     WPXString sTabStops;
     sTabStops.sprintf("[num-tab-stops:%i]", tabStops.count());
     WPXPropertyListVector::Iter i(tabStops);
-    for (i.rewind(); i.next(); )
+    for (i.rewind(); i.next();)
+    {
         sTabStops.append(propListToStyleKey(i()));
+    }
     sKey.append(sTabStops);
 
     return sKey;
 }
 
-WPXString ParagraphStyleManager::findOrAdd (const WPXPropertyList &propList, const WPXPropertyListVector &tabStops)
+WPXString ParagraphStyleManager::findOrAdd(WPXPropertyList const &propList, WPXPropertyListVector const &tabStops)
 {
     WPXString hashKey = getKey(propList, tabStops);
     std::map<WPXString, ParagraphStyle *, ltstr>::const_iterator iter = mHash.find(hashKey);
@@ -226,7 +228,8 @@ WPXString ParagraphStyleManager::findOrAdd (const WPXPropertyList &propList, con
 
     WPXString sName;
     sName.sprintf("S%i", mHash.size());
-    ParagraphStyle *pStyle = new ParagraphStyle(propList, tabStops, sName);
+    ParagraphStyle *pStyle =
+        new ParagraphStyle(propList, tabStops, sName);
     mHash[hashKey] = pStyle;
     return sName;
 }
@@ -235,7 +238,9 @@ void SpanStyleManager::clean()
 {
     for (std::map<WPXString, SpanStyle *, ltstr>::iterator iter = mHash.begin();
             iter != mHash.end(); ++iter)
+    {
         delete(iter->second);
+    }
     mHash.clear();
 }
 
@@ -243,10 +248,12 @@ void SpanStyleManager::write(OdfDocumentHandler *pHandler) const
 {
     for (std::map<WPXString, SpanStyle *, ltstr>::const_iterator iter = mHash.begin();
             iter != mHash.end(); ++iter)
-        iter->second->write(pHandler);
+    {
+        (iter->second)->write(pHandler);
+    }
 }
 
-WPXString SpanStyleManager::findOrAdd(const WPXPropertyList &propList)
+WPXString SpanStyleManager::findOrAdd(WPXPropertyList const &propList)
 {
     WPXString hashKey = propListToStyleKey(propList);
     std::map<WPXString, SpanStyle *, ltstr>::const_iterator iter = mHash.find(hashKey);
diff --git a/writerperfect/source/filter/TextRunStyle.hxx b/writerperfect/source/filter/TextRunStyle.hxx
index b990f45..0ae670d 100644
--- a/writerperfect/source/filter/TextRunStyle.hxx
+++ b/writerperfect/source/filter/TextRunStyle.hxx
@@ -80,7 +80,7 @@ public:
     /* create a new style if it does not exists. In all case, returns the name of the style
 
     Note: using S%i as new name*/
-    WPXString findOrAdd(WPXPropertyList const &xPropList, WPXPropertyListVector const &tabStops);
+    WPXString findOrAdd(const WPXPropertyList &xPropList, const WPXPropertyListVector &tabStops);
 
     virtual void clean();
     virtual void write(OdfDocumentHandler *) const;
diff --git a/writerperfect/source/filter/libwriterperfect_filter.cxx b/writerperfect/source/filter/libwriterperfect_filter.cxx
index 700f204..db976ef 100644
--- a/writerperfect/source/filter/libwriterperfect_filter.cxx
+++ b/writerperfect/source/filter/libwriterperfect_filter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* libwriterperfect_filter.hxx: define basic functions for libwriterperfect/fileter
  *
  * Copyright (C) 2002-2004 William Lachance (wrlach at gmail.com)
@@ -44,4 +45,4 @@ WPXString propListToStyleKey(const WPXPropertyList &xPropList)
     return sKey;
 }
 
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/writerperfect/source/filter/libwriterperfect_filter.hxx b/writerperfect/source/filter/libwriterperfect_filter.hxx
index 4f9c722..f99026c 100644
--- a/writerperfect/source/filter/libwriterperfect_filter.hxx
+++ b/writerperfect/source/filter/libwriterperfect_filter.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* libwriterperfect_filter.hxx: define basic functions for libwriterperfect/fileter
  *
  * Copyright (C) 2002-2003 William Lachance (wrlach at gmail.com)
@@ -42,5 +43,6 @@ struct ltstr
     }
 };
 
-
 #endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list