[PATCH libreoffice-4-0] one more fix for error bar import, fdo#60083

Markus Mohrhard (via Code Review) gerrit at gerrit.libreoffice.org
Tue Feb 26 21:51:16 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2434

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/34/2434/1

one more fix for error bar import, fdo#60083

This makes it finally possible to import the original test document.

Change-Id: I5941f2ce303a28674dcf04aeabbbbc2d178c0913
---
M xmloff/source/chart/SchXMLPlotAreaContext.cxx
1 file changed, 17 insertions(+), 5 deletions(-)



diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index e5b16fd..4463ebf 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -980,8 +980,6 @@
         else
             aRoleBuffer.append( sal_Unicode( 'x' ));
 
-        rtl::OUString aPlainRole = aRoleBuffer.makeStringAndClear();
-        aRoleBuffer.append( aPlainRole );
         aRoleBuffer.append( sal_Unicode( '-' ));
 
         if( bPositiveValue )
@@ -1040,7 +1038,7 @@
 namespace {
 
 void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, uno::Reference< beans::XPropertySet> xBarProp,
-                                            SchXMLImportHelper& rImportHelper)
+                                            SchXMLImportHelper& rImportHelper, OUString& aPosRange, OUString& aNegRange)
 {
     const SvXMLStylesContext* pStylesCtxt = rImportHelper.GetAutoStylesContext();
     const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(rImportHelper.GetChartFamilyID(),
@@ -1096,6 +1094,20 @@
 
             if(aAny.hasValue())
                 xBarProp->setPropertyValue("NegativeError", aAny);
+        }
+
+        aAny = SchXMLTools::getPropertyFromContext("ErrorBarRangePositive",
+                pSeriesStyleContext, pStylesCtxt);
+        if( aAny.hasValue() )
+        {
+            aAny >>= aPosRange;
+        }
+
+        aAny = SchXMLTools::getPropertyFromContext("ErrorBarRangeNegative",
+                pSeriesStyleContext, pStylesCtxt);
+        if( aAny.hasValue() )
+        {
+            aAny >>= aNegRange;
         }
 
         switch(aBarStyle)
@@ -1183,8 +1195,8 @@
 
 
                     // first import defaults from parent style
-                    SetErrorBarPropertiesFromStyleName( maSeriesStyleName, xBarProp, mrImportHelper );
-                    SetErrorBarPropertiesFromStyleName( sAutoStyleName, xBarProp, mrImportHelper );
+                    SetErrorBarPropertiesFromStyleName( maSeriesStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
+                    SetErrorBarPropertiesFromStyleName( sAutoStyleName, xBarProp, mrImportHelper, aPosRange, aNegRange );
 
                     uno::Reference< chart2::XChartDocument > xDoc(GetImport().GetModel(),uno::UNO_QUERY);
 

-- 
To view, visit https://gerrit.libreoffice.org/2434
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5941f2ce303a28674dcf04aeabbbbc2d178c0913
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Markus Mohrhard <markus.mohrhard at googlemail.com>



More information about the LibreOffice mailing list