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

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Feb 27 03:18:27 PST 2013


 xmloff/source/chart/SchXMLPlotAreaContext.cxx |   22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

New commits:
commit 160c0f4c1fd381a91a7443088c7222ae4cc5b6a2
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Tue Feb 26 22:35:57 2013 +0100

    one more fix for error bar import, fdo#60083
    
    This makes it finally possible to import the original test document.
    
    Change-Id: I5941f2ce303a28674dcf04aeabbbbc2d178c0913
    Reviewed-on: https://gerrit.libreoffice.org/2434
    Reviewed-by: Petr Mladek <pmladek at suse.cz>
    Tested-by: Petr Mladek <pmladek at suse.cz>
    Reviewed-on: https://gerrit.libreoffice.org/2438
    Reviewed-by: Michael Meeks <michael.meeks at suse.com>
    Reviewed-by: Noel Power <noel.power at suse.com>
    Tested-by: Noel Power <noel.power at suse.com>

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 @@ static void lcl_setErrorBarSequence ( const uno::Reference< chart2::XChartDocume
         else
             aRoleBuffer.append( sal_Unicode( 'x' ));
 
-        rtl::OUString aPlainRole = aRoleBuffer.makeStringAndClear();
-        aRoleBuffer.append( aPlainRole );
         aRoleBuffer.append( sal_Unicode( '-' ));
 
         if( bPositiveValue )
@@ -1040,7 +1038,7 @@ SchXMLStatisticsObjectContext::~SchXMLStatisticsObjectContext()
 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(),
@@ -1098,6 +1096,20 @@ void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, uno::Refere
                 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)
         {
             case com::sun::star::chart::ErrorBarStyle::ERROR_MARGIN:
@@ -1183,8 +1195,8 @@ void SchXMLStatisticsObjectContext::StartElement( const uno::Reference< xml::sax
 
 
                     // 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);
 


More information about the Libreoffice-commits mailing list