[Libreoffice-commits] .: writerperfect/source

Fridrich Strba fridrich at kemper.freedesktop.org
Sun Jan 30 01:22:47 PST 2011


 writerperfect/source/filter/DocumentCollector.cxx |    2 +-
 writerperfect/source/filter/DocumentCollector.hxx |    2 +-
 writerperfect/source/filter/FilterInternal.hxx    |    6 +++---
 writerperfect/source/filter/ListStyle.cxx         |   12 ++++++------
 writerperfect/source/filter/SectionStyle.cxx      |    2 +-
 writerperfect/source/filter/TextRunStyle.cxx      |    6 +++---
 writerperfect/source/filter/WriterProperties.hxx  |    4 ++--
 7 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit c90c5d503543a960a05b43752a5dff9ccf4bcd30
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Sun Jan 30 10:22:38 2011 +0100

    Use double instead of float

diff --git a/writerperfect/source/filter/DocumentCollector.cxx b/writerperfect/source/filter/DocumentCollector.cxx
index 6f618d8..b4066e2 100644
--- a/writerperfect/source/filter/DocumentCollector.cxx
+++ b/writerperfect/source/filter/DocumentCollector.cxx
@@ -82,7 +82,7 @@ DocumentCollector::DocumentCollector(WPXInputStream *pInput, DocumentHandlerInte
     mbUsed(false),
     mWriterDocumentStates(),
     mWriterListStates(),
-    mfSectionSpaceAfter(0.0f),
+    mfSectionSpaceAfter(0.0),
     miNumListStyles(0),
     mpCurrentContentElements(&mBodyElements),
     mpCurrentPageSpan(NULL),
diff --git a/writerperfect/source/filter/DocumentCollector.hxx b/writerperfect/source/filter/DocumentCollector.hxx
index 619bc1d..6d0d353 100644
--- a/writerperfect/source/filter/DocumentCollector.hxx
+++ b/writerperfect/source/filter/DocumentCollector.hxx
@@ -204,7 +204,7 @@ private:
 
     // section styles
     std::vector<SectionStyle *> mSectionStyles;
-    float mfSectionSpaceAfter;
+    double mfSectionSpaceAfter;
 
     // table styles
     std::vector<TableStyle *> mTableStyles;
diff --git a/writerperfect/source/filter/FilterInternal.hxx b/writerperfect/source/filter/FilterInternal.hxx
index c53e83e..fcac328 100644
--- a/writerperfect/source/filter/FilterInternal.hxx
+++ b/writerperfect/source/filter/FilterInternal.hxx
@@ -31,9 +31,9 @@
 #define WRITER_DEBUG_MSG(M)
 #endif
 
-const float fDefaultSideMargin = 1.0f; // inches
-const float fDefaultPageWidth = 8.5f; // inches (OOo required default: we will handle this later)
-const float fDefaultPageHeight = 11.0f; // inches
+const double fDefaultSideMargin = 1.0; // inches
+const double fDefaultPageWidth = 8.5; // inches (OOo required default: we will handle this later)
+const double fDefaultPageHeight = 11.0; // inches
 
 #endif
 
diff --git a/writerperfect/source/filter/ListStyle.cxx b/writerperfect/source/filter/ListStyle.cxx
index 248ea7d..a5c1780 100644
--- a/writerperfect/source/filter/ListStyle.cxx
+++ b/writerperfect/source/filter/ListStyle.cxx
@@ -73,11 +73,11 @@ void OrderedListLevelStyle::write(DocumentHandlerInterface *pHandler, int iLevel
     listLevelStyleOpen.write(pHandler);
 
     TagOpenElement stylePropertiesOpen("style:list-level-properties");
-    if (mPropList["text:space-before"] && mPropList["text:space-before"]->getDouble() > 0.0f)
+    if (mPropList["text:space-before"] && mPropList["text:space-before"]->getDouble() > 0.0)
                 stylePropertiesOpen.addAttribute("text:space-before", mPropList["text:space-before"]->getStr());
-    if (mPropList["text:min-label-width"] && mPropList["text:min-label-width"]->getDouble() > 0.0f)
+    if (mPropList["text:min-label-width"] && mPropList["text:min-label-width"]->getDouble() > 0.0)
         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.0f)
+    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());
     stylePropertiesOpen.write(pHandler);
 
@@ -120,11 +120,11 @@ void UnorderedListLevelStyle::write(DocumentHandlerInterface *pHandler, int iLev
     listLevelStyleOpen.write(pHandler);
 
     TagOpenElement stylePropertiesOpen("style:list-level-properties");
-    if (mPropList["text:space-before"] && mPropList["text:space-before"]->getDouble() > 0.0f)
+    if (mPropList["text:space-before"] && mPropList["text:space-before"]->getDouble() > 0.0)
                 stylePropertiesOpen.addAttribute("text:space-before", mPropList["text:space-before"]->getStr());
-    if (mPropList["text:min-label-width"] && mPropList["text:min-label-width"]->getDouble() > 0.0f)
+    if (mPropList["text:min-label-width"] && mPropList["text:min-label-width"]->getDouble() > 0.0)
         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.0f)
+    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());
     stylePropertiesOpen.addAttribute("style:font-name", "OpenSymbol");
     stylePropertiesOpen.write(pHandler);
diff --git a/writerperfect/source/filter/SectionStyle.cxx b/writerperfect/source/filter/SectionStyle.cxx
index 5900549..f88b800 100644
--- a/writerperfect/source/filter/SectionStyle.cxx
+++ b/writerperfect/source/filter/SectionStyle.cxx
@@ -74,7 +74,7 @@ void SectionStyle::write(DocumentHandlerInterface *pHandler) const
     else
     {
         columnProps.insert("fo:column-count", 0);
-        columnProps.insert("fo:column-gap", 0.0f);
+        columnProps.insert("fo:column-gap", 0.0);
         pHandler->startElement("style:columns", columnProps);
     }
 
diff --git a/writerperfect/source/filter/TextRunStyle.cxx b/writerperfect/source/filter/TextRunStyle.cxx
index 740c2ce..7ee21ff 100644
--- a/writerperfect/source/filter/TextRunStyle.cxx
+++ b/writerperfect/source/filter/TextRunStyle.cxx
@@ -81,10 +81,10 @@ void ParagraphStyle::write(DocumentHandlerInterface *pHandler) const
             propList.insert("fo:margin-top", i()->getStr());
         if (strcmp(i.key(), "fo:margin-bottom") == 0)
         {
-            if (i()->getDouble() > 0.0f)
+            if (i()->getDouble() > 0.0)
                 propList.insert("fo:margin-bottom", i()->getStr());
             else
-                propList.insert("fo:margin-bottom", 0.0f);
+                propList.insert("fo:margin-bottom", 0.0);
         }
         if (strcmp(i.key(), "fo:line-height") == 0)
             propList.insert("fo:line-height", i()->getStr());
@@ -149,7 +149,7 @@ void SpanStyle::write(DocumentHandlerInterface *pHandler) const
 
     if (mPropList["fo:font-size"])
     {
-        if (mPropList["fo:font-size"]->getDouble() > 0.0f)
+        if (mPropList["fo:font-size"]->getDouble() > 0.0)
         {
         propList.insert("style:font-size-asian", mPropList["fo:font-size"]->getStr());
         propList.insert("style:font-size-complex", mPropList["fo:font-size"]->getStr());
diff --git a/writerperfect/source/filter/WriterProperties.hxx b/writerperfect/source/filter/WriterProperties.hxx
index 757807e..3889b21 100644
--- a/writerperfect/source/filter/WriterProperties.hxx
+++ b/writerperfect/source/filter/WriterProperties.hxx
@@ -29,9 +29,9 @@
 #define _WRITER_PROPERTIES_H
 
 #define IMP_DEFAULT_SUPER_SUB_SCRIPT "58%"
-#define IMP_NUM_CENTIMETERES_PER_INCH 2.54f
+#define IMP_NUM_CENTIMETERES_PER_INCH 2.54
 #define IMP_DEFAULT_FONT_NAME "Times New Roman"
-#define IMP_DEFAULT_FONT_SIZE 12.0f
+#define IMP_DEFAULT_FONT_SIZE 12.0
 #define IMP_DEFAULT_FONT_PITCH "variable"
 #endif
 


More information about the Libreoffice-commits mailing list