[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - writerperfect/source

2013-03-11 Thread Laurent Alonso
 writerperfect/source/filter/ListStyle.cxx|8 
 writerperfect/source/filter/OdtGenerator.cxx |   14 --
 writerperfect/source/filter/TableStyle.cxx   |6 +-
 writerperfect/source/filter/TextRunStyle.cxx |8 
 4 files changed, 33 insertions(+), 3 deletions(-)

New commits:
commit b6a761a124c36ca97187c95526e7c1a1979454b5
Author: Laurent Alonso laurent.alo...@inria.fr
Date:   Mon Mar 11 08:29:17 2013 +0100

Support some new parameters

Change-Id: I22857f57822bff39ef5fcd576bd29e374f1aa819
(cherry picked from commit d242c4a441964837e6a68343dfef9eb530fb41f7)

Signed-off-by: Fridrich Å trba fridrich.st...@bluewin.ch

diff --git a/writerperfect/source/filter/ListStyle.cxx 
b/writerperfect/source/filter/ListStyle.cxx
index e1e5144..cf5900a 100644
--- a/writerperfect/source/filter/ListStyle.cxx
+++ b/writerperfect/source/filter/ListStyle.cxx
@@ -55,6 +55,8 @@ void OrderedListLevelStyle::write(OdfDocumentHandler 
*pHandler, int iLevel) cons
 else
 listLevelStyleOpen.addAttribute(text:start-value, 1);
 }
+if (mPropList[text:display-levels])
+listLevelStyleOpen.addAttribute(text:display-levels, 
mPropList[text:display-levels]-getStr());
 listLevelStyleOpen.write(pHandler);
 
 TagOpenElement stylePropertiesOpen(style:list-level-properties);
@@ -64,6 +66,8 @@ void OrderedListLevelStyle::write(OdfDocumentHandler 
*pHandler, int iLevel) cons
 stylePropertiesOpen.addAttribute(text:min-label-width, 
mPropList[text:min-label-width]-getStr());
 if (mPropList[text:min-label-distance]  
mPropList[text:min-label-distance]-getDouble()  0.0)
 stylePropertiesOpen.addAttribute(text:min-label-distance, 
mPropList[text:min-label-distance]-getStr());
+if (mPropList[fo:text-align])
+stylePropertiesOpen.addAttribute(fo:text-align, 
mPropList[fo:text-align]-getStr());
 stylePropertiesOpen.write(pHandler);
 
 pHandler-endElement(style:list-level-properties);
@@ -103,6 +107,8 @@ void UnorderedListLevelStyle::write(OdfDocumentHandler 
*pHandler, int iLevel) co
 }
 else
 listLevelStyleOpen.addAttribute(text:bullet-char, .);
+if (mPropList[text:display-levels])
+listLevelStyleOpen.addAttribute(text:display-levels, 
mPropList[text:display-levels]-getStr());
 listLevelStyleOpen.write(pHandler);
 
 TagOpenElement stylePropertiesOpen(style:list-level-properties);
@@ -112,6 +118,8 @@ void UnorderedListLevelStyle::write(OdfDocumentHandler 
*pHandler, int iLevel) co
 stylePropertiesOpen.addAttribute(text:min-label-width, 
mPropList[text:min-label-width]-getStr());
 if (mPropList[text:min-label-distance]  
mPropList[text:min-label-distance]-getDouble()  0.0)
 stylePropertiesOpen.addAttribute(text:min-label-distance, 
mPropList[text:min-label-distance]-getStr());
+if (mPropList[fo:text-align])
+stylePropertiesOpen.addAttribute(fo:text-align, 
mPropList[fo:text-align]-getStr());
 stylePropertiesOpen.addAttribute(style:font-name, OpenSymbol);
 stylePropertiesOpen.write(pHandler);
 
diff --git a/writerperfect/source/filter/OdtGenerator.cxx 
b/writerperfect/source/filter/OdtGenerator.cxx
index fc4ccbb..9ee2f67 100644
--- a/writerperfect/source/filter/OdtGenerator.cxx
+++ b/writerperfect/source/filter/OdtGenerator.cxx
@@ -1196,12 +1196,22 @@ void OdtGenerator::openFrame(const WPXPropertyList 
propList)
 frameAutomaticStylePropertiesElement-addAttribute(fo:max-height, 
propList[fo:max-height]-getStr());
 
 // check if the frame has border, background attributes
-if (propList[fo:border])
-frameAutomaticStylePropertiesElement-addAttribute(fo:border, 
propList[fo:border]-getStr());
+static char const *(bordersString[])=
+
{fo:border,fo:border-top,fo:border-left,fo:border-bottom,fo:border-right};
+for (int b = 0; b  5; b++)
+{
+if (propList[bordersString[b]])
+
frameAutomaticStylePropertiesElement-addAttribute(bordersString[b], 
propList[bordersString[b]]-getStr());
+}
 if (propList[style:border-line-width])
 
frameAutomaticStylePropertiesElement-addAttribute(style:border-line-width, 
propList[style:border-line-width]-getStr());
 if (propList[fo:background-color])
 
frameAutomaticStylePropertiesElement-addAttribute(fo:background-color, 
propList[fo:background-color]-getStr());
+if (propList[style:background-transparency])
+
frameAutomaticStylePropertiesElement-addAttribute(style:background-transparency,
 propList[style:background-transparency]-getStr());
+
+if (propList[fo:clip])
+frameAutomaticStylePropertiesElement-addAttribute(fo:clip, 
propList[fo:clip]-getStr());
 
 frameAutomaticStylePropertiesElement-addAttribute(draw:ole-draw-aspect, 
1);
 
diff --git a/writerperfect/source/filter/TableStyle.cxx 
b/writerperfect/source/filter/TableStyle.cxx
index 18331c4..856f578 100644
--- 

[Libreoffice-commits] core.git: Branch 'libreoffice-4-0' - writerperfect/source

2013-02-22 Thread Fridrich Štrba
 writerperfect/source/filter/OdgGenerator.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 4c0e53e6530c5590f7123f506a1a58bcbd04e13d
Author: Fridrich Å trba fridrich.st...@bluewin.ch
Date:   Tue Feb 19 16:44:51 2013 +0100

Allow specifying of page names

Allow specifying of page names
(cherry picked from commit bee8ed6772f420f9eefc57fee01da29ff466a8e9)

We need to escape special characters in slide names
(cherry picked from commit ea4581a914cb1aad29f16b73e35350f05f8adc1c)

Change-Id: I5f523642b980469afa46e1895cfd39aa08b9941d
Reviewed-on: https://gerrit.libreoffice.org/2333
Reviewed-by: Bosdonnat Cedric cedric.bosdon...@free.fr
Tested-by: Bosdonnat Cedric cedric.bosdon...@free.fr

diff --git a/writerperfect/source/filter/OdgGenerator.cxx 
b/writerperfect/source/filter/OdgGenerator.cxx
index 8661138..1caebdd 100644
--- a/writerperfect/source/filter/OdgGenerator.cxx
+++ b/writerperfect/source/filter/OdgGenerator.cxx
@@ -664,7 +664,10 @@ void OdgGenerator::startGraphics(const ::WPXPropertyList 
propList)
 TagOpenElement *pStylePageLayoutOpenElement = new 
TagOpenElement(style:page-layout);
 
 WPXString sValue;
-sValue.sprintf(page%i, mpImpl-miPageIndex);
+if (propList[draw:name])
+sValue = WPXString(propList[draw:name]-getStr(), true); // escape 
special xml characters
+else
+sValue.sprintf(page%i, mpImpl-miPageIndex);
 pDrawPageOpenElement-addAttribute(draw:name, sValue);
 #ifdef MULTIPAGE_WORKAROUND
 pStyleMasterPageOpenElement-addAttribute(style:page-layout-name, PM0);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits