[Libreoffice-commits] core.git: oox/Library_oox.mk oox/source xmloff/inc xmloff/Package_inc.mk xmloff/source

Peter Foley pefoley2 at verizon.net
Thu Mar 21 16:43:08 PDT 2013


 oox/Library_oox.mk                           |    1 
 oox/source/export/SchXMLSeriesHelper.cxx     |  251 ---------------------------
 oox/source/export/SchXMLSeriesHelper.hxx     |   71 -------
 oox/source/export/chartexport.cxx            |    2 
 xmloff/Package_inc.mk                        |    1 
 xmloff/inc/xmloff/SchXMLSeriesHelper.hxx     |   73 +++++++
 xmloff/source/chart/SchXMLChartContext.cxx   |    2 
 xmloff/source/chart/SchXMLExport.cxx         |    2 
 xmloff/source/chart/SchXMLSeries2Context.cxx |    2 
 xmloff/source/chart/SchXMLSeriesHelper.cxx   |   21 --
 xmloff/source/chart/SchXMLSeriesHelper.hxx   |   70 -------
 11 files changed, 86 insertions(+), 410 deletions(-)

New commits:
commit 630ccf5b3be084916065409033c182a91b418850
Author: Peter Foley <pefoley2 at verizon.net>
Date:   Wed Mar 20 18:08:22 2013 -0400

    remove duplicate copy of SchXMLSeriesHelper: take 2
    
    This allows oox to be added to Library_merged
    
    Change-Id: I62b437ca99f1b9df9662eb3a8b9e301ed704f850

diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk
index e468256..2bcbdf5 100644
--- a/oox/Library_oox.mk
+++ b/oox/Library_oox.mk
@@ -216,7 +216,6 @@ $(eval $(call gb_Library_add_exception_objects,oox,\
     oox/source/export/chartexport \
     oox/source/export/ColorPropertySet \
     oox/source/export/drawingml \
-    oox/source/export/SchXMLSeriesHelper \
     oox/source/export/shapes \
     oox/source/export/vmlexport \
     oox/source/helper/attributelist \
diff --git a/oox/source/export/SchXMLSeriesHelper.cxx b/oox/source/export/SchXMLSeriesHelper.cxx
deleted file mode 100644
index 802fc01..0000000
--- a/oox/source/export/SchXMLSeriesHelper.cxx
+++ /dev/null
@@ -1,251 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "SchXMLSeriesHelper.hxx"
-#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <com/sun/star/chart2/XChartTypeContainer.hpp>
-#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
-#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-#include <rtl/ustring.h>
-// header for define DBG_ERROR1
-#include <tools/debug.hxx>
-
-#include <typeinfo>
-
-using namespace ::com::sun::star;
-
-using ::com::sun::star::uno::Reference;
-using ::com::sun::star::uno::Sequence;
-
-// ----------------------------------------
-
-::std::vector< Reference< chart2::XDataSeries > >
-    SchXMLSeriesHelper::getDataSeriesFromDiagram(
-        const Reference< chart2::XDiagram > & xDiagram )
-{
-    ::std::vector< Reference< chart2::XDataSeries > > aResult;
-
-    try
-    {
-        Reference< chart2::XCoordinateSystemContainer > xCooSysCnt(
-            xDiagram, uno::UNO_QUERY_THROW );
-        Sequence< Reference< chart2::XCoordinateSystem > > aCooSysSeq(
-            xCooSysCnt->getCoordinateSystems());
-        for( sal_Int32 i=0; i<aCooSysSeq.getLength(); ++i )
-        {
-            Reference< chart2::XChartTypeContainer > xCTCnt( aCooSysSeq[i], uno::UNO_QUERY_THROW );
-            Sequence< Reference< chart2::XChartType > > aChartTypeSeq( xCTCnt->getChartTypes());
-            for( sal_Int32 j=0; j<aChartTypeSeq.getLength(); ++j )
-            {
-                Reference< chart2::XDataSeriesContainer > xDSCnt( aChartTypeSeq[j], uno::UNO_QUERY_THROW );
-                Sequence< Reference< chart2::XDataSeries > > aSeriesSeq( xDSCnt->getDataSeries() );
-                ::std::copy( aSeriesSeq.getConstArray(), aSeriesSeq.getConstArray() + aSeriesSeq.getLength(),
-                             ::std::back_inserter( aResult ));
-            }
-        }
-    }
-    catch( const uno::Exception & ex )
-    {
-        (void)ex; // avoid warning for pro build
-
-        OSL_FAIL( OUStringToOString( "Exception caught. Type: " +
-                        OUString::createFromAscii( typeid( ex ).name() ) +
-                        ", Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
-    }
-
-    return aResult;
-}
-
-::std::map< Reference< chart2::XDataSeries >, sal_Int32 > SchXMLSeriesHelper::getDataSeriesIndexMapFromDiagram(
-        const Reference< chart2::XDiagram > & xDiagram )
-{
-    ::std::map< Reference< chart2::XDataSeries >, sal_Int32 > aRet;
-
-    sal_Int32 nIndex=0;
-
-    ::std::vector< Reference< chart2::XDataSeries > > aSeriesVector( SchXMLSeriesHelper::getDataSeriesFromDiagram( xDiagram ));
-    for( ::std::vector< Reference< chart2::XDataSeries > >::const_iterator aSeriesIt( aSeriesVector.begin() )
-        ; aSeriesIt != aSeriesVector.end()
-        ; aSeriesIt++, nIndex++ )
-    {
-        Reference< chart2::XDataSeries > xSeries( *aSeriesIt );
-        if( xSeries.is() )
-        {
-            if( aRet.end() == aRet.find(xSeries) )
-                aRet[xSeries]=nIndex;
-        }
-    }
-    return aRet;
-}
-
-namespace {
-uno::Reference< chart2::XChartType > lcl_getChartTypeOfSeries(
-                                const uno::Reference< chart2::XDiagram >&   xDiagram
-                              , const Reference< chart2::XDataSeries >& xSeries )
-{
-    if(!xDiagram.is())
-        return 0;
-
-    //iterate through the model to find the given xSeries
-    //the found parent indicates the charttype
-
-    //iterate through all coordinate systems
-    uno::Reference< chart2::XCoordinateSystemContainer > xCooSysContainer( xDiagram, uno::UNO_QUERY );
-    if( !xCooSysContainer.is())
-        return 0;
-
-    uno::Sequence< uno::Reference< chart2::XCoordinateSystem > > aCooSysList( xCooSysContainer->getCoordinateSystems() );
-    for( sal_Int32 nCS = 0; nCS < aCooSysList.getLength(); ++nCS )
-    {
-        uno::Reference< chart2::XCoordinateSystem > xCooSys( aCooSysList[nCS] );
-
-        //iterate through all chart types in the current coordinate system
-        uno::Reference< chart2::XChartTypeContainer > xChartTypeContainer( xCooSys, uno::UNO_QUERY );
-        OSL_ASSERT( xChartTypeContainer.is());
-        if( !xChartTypeContainer.is() )
-            continue;
-        uno::Sequence< uno::Reference< chart2::XChartType > > aChartTypeList( xChartTypeContainer->getChartTypes() );
-        for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
-        {
-            uno::Reference< chart2::XChartType > xChartType( aChartTypeList[nT] );
-
-            //iterate through all series in this chart type
-            uno::Reference< chart2::XDataSeriesContainer > xDataSeriesContainer( xChartType, uno::UNO_QUERY );
-            OSL_ASSERT( xDataSeriesContainer.is());
-            if( !xDataSeriesContainer.is() )
-                continue;
-
-            uno::Sequence< uno::Reference< chart2::XDataSeries > > aSeriesList( xDataSeriesContainer->getDataSeries() );
-            for( sal_Int32 nS = 0; nS < aSeriesList.getLength(); ++nS )
-            {
-                Reference< chart2::XDataSeries > xCurrentSeries( aSeriesList[nS] );
-
-                if( xSeries == xCurrentSeries )
-                    return xChartType;
-            }
-        }
-    }
-    return 0;
-}
-}
-
-bool SchXMLSeriesHelper::isCandleStickSeries(
-                  const Reference< chart2::XDataSeries >& xSeries
-                , const Reference< frame::XModel >& xChartModel )
-{
-    bool bRet = false;
-
-    uno::Reference< chart2::XChartDocument > xNewDoc( xChartModel, uno::UNO_QUERY );
-    if( xNewDoc.is() )
-    {
-        uno::Reference< chart2::XDiagram > xNewDiagram( xNewDoc->getFirstDiagram() );
-        if( xNewDiagram.is() )
-        {
-            uno::Reference< chart2::XChartType > xChartType( lcl_getChartTypeOfSeries(
-                                        xNewDiagram, xSeries ) );
-            if( xChartType.is() )
-            {
-                OUString aServiceName( xChartType->getChartType() );
-                if( aServiceName == "com.sun.star.chart2.CandleStickChartType" )
-                    bRet = true;
-            }
-        }
-    }
-    return bRet;
-}
-
-//static
-uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesPropertySet(
-            const uno::Reference< chart2::XDataSeries >& xSeries
-            , const uno::Reference< frame::XModel >& xChartModel )
-{
-    uno::Reference< beans::XPropertySet > xRet;
-
-    if( xSeries.is() )
-    {
-        try
-        {
-            uno::Reference< lang::XMultiServiceFactory > xFactory( xChartModel, uno::UNO_QUERY );
-            if( xFactory.is() )
-            {
-                xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
-                    "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
-                Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
-                if(xInit.is())
-                {
-                    Sequence< uno::Any > aArguments(1);
-                    aArguments[0]=uno::makeAny(xSeries);
-                    xInit->initialize(aArguments);
-                }
-            }
-        }
-        catch( const uno::Exception & rEx )
-        {
-            (void)rEx; // avoid warning for pro build
-            OSL_TRACE( "Exception caught SchXMLSeriesHelper::createOldAPISeriesPropertySet: %s",
-                        OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
-        }
-    }
-
-    return xRet;
-}
-
-//static
-uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointPropertySet(
-            const uno::Reference< chart2::XDataSeries >& xSeries
-            , sal_Int32 nPointIndex
-            , const uno::Reference< frame::XModel >& xChartModel )
-{
-    uno::Reference< beans::XPropertySet > xRet;
-
-    if( xSeries.is() )
-    {
-        try
-        {
-            uno::Reference< lang::XMultiServiceFactory > xFactory( xChartModel, uno::UNO_QUERY );
-            if( xFactory.is() )
-            {
-                xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
-                     "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
-                Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
-                if(xInit.is())
-                {
-                    Sequence< uno::Any > aArguments(2);
-                    aArguments[0]=uno::makeAny(xSeries);
-                    aArguments[1]=uno::makeAny(nPointIndex);
-                    xInit->initialize(aArguments);
-                }
-            }
-        }
-        catch( const uno::Exception & rEx )
-        {
-            (void)rEx; // avoid warning for pro build
-
-            OSL_TRACE( "Exception caught SchXMLSeriesHelper::createOldAPIDataPointPropertySet: %s",
-                        OUStringToOString( rEx.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
-        }
-    }
-
-    return xRet;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/export/SchXMLSeriesHelper.hxx b/oox/source/export/SchXMLSeriesHelper.hxx
deleted file mode 100644
index 08e8770..0000000
--- a/oox/source/export/SchXMLSeriesHelper.hxx
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _XMLOFF_SCH_XML_SERIESHELPER_HXX
-#define _XMLOFF_SCH_XML_SERIESHELPER_HXX
-
-#include <com/sun/star/chart2/data/XDataSequence.hpp>
-#include <com/sun/star/chart2/data/XDataSource.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-
-#include <vector>
-#include <map>
-#include <iterator>
-
-class SchXMLSeriesHelper
-{
-public:
-    static ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > >
-            getDataSeriesFromDiagram(
-                const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XDiagram > & xDiagram );
-    static ::std::map< ::com::sun::star::uno::Reference<
-                ::com::sun::star::chart2::XDataSeries >, sal_Int32 >
-            getDataSeriesIndexMapFromDiagram(
-                const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XDiagram > & xDiagram );
-
-    static bool isCandleStickSeries(
-                  const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XDataSeries >& xSeries
-                , const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::frame::XModel >& xChartModel  );
-
-    static ::com::sun::star::uno::Reference<
-                ::com::sun::star::beans::XPropertySet > createOldAPISeriesPropertySet(
-                    const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::chart2::XDataSeries >& xSeries
-                    , const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::frame::XModel >& xChartModel );
-
-    static ::com::sun::star::uno::Reference<
-                ::com::sun::star::beans::XPropertySet > createOldAPIDataPointPropertySet(
-                    const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::chart2::XDataSeries >& xSeries
-                    , sal_Int32 nPointIndex
-                    , const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::frame::XModel >& xChartModel );
-};
-
-// _XMLOFF_SCH_XML_SERIESHELPER_HXX
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index 2d24717..ef3c014 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -79,7 +79,7 @@
 #include <com/sun/star/container/XNamed.hpp>
 
 #include <comphelper/processfactory.hxx>
-#include "SchXMLSeriesHelper.hxx"
+#include <xmloff/SchXMLSeriesHelper.hxx>
 #include "ColorPropertySet.hxx"
 #include <set>
 #include <time.h>
diff --git a/xmloff/Package_inc.mk b/xmloff/Package_inc.mk
index 9b3628b..cc4a1ce 100644
--- a/xmloff/Package_inc.mk
+++ b/xmloff/Package_inc.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PropertySetInfoHash.hxx,
 $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/PropertySetInfoKey.hxx,xmloff/PropertySetInfoKey.hxx))
 $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SchXMLExportHelper.hxx,xmloff/SchXMLExportHelper.hxx))
 $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SchXMLImportHelper.hxx,xmloff/SchXMLImportHelper.hxx))
+$(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SchXMLSeriesHelper.hxx,xmloff/SchXMLSeriesHelper.hxx))
 $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SettingsExportHelper.hxx,xmloff/SettingsExportHelper.hxx))
 $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/SinglePropertySetInfoCache.hxx,xmloff/SinglePropertySetInfoCache.hxx))
 $(eval $(call gb_Package_add_file,xmloff_inc,inc/xmloff/WordWrapPropertyHdl.hxx,xmloff/WordWrapPropertyHdl.hxx))
diff --git a/xmloff/inc/xmloff/SchXMLSeriesHelper.hxx b/xmloff/inc/xmloff/SchXMLSeriesHelper.hxx
new file mode 100644
index 0000000..7f47295
--- /dev/null
+++ b/xmloff/inc/xmloff/SchXMLSeriesHelper.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef _XMLOFF_SCH_XML_SERIESHELPER_HXX
+#define _XMLOFF_SCH_XML_SERIESHELPER_HXX
+
+#include <com/sun/star/chart2/data/XDataSequence.hpp>
+#include <com/sun/star/chart2/data/XDataSource.hpp>
+#include <com/sun/star/chart2/XDataSeries.hpp>
+#include <com/sun/star/chart2/XDiagram.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+
+#include "xmloff/dllapi.h"
+
+#include <vector>
+#include <map>
+#include <iterator>
+
+class XMLOFF_DLLPUBLIC SchXMLSeriesHelper
+{
+public:
+    static ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > >
+            getDataSeriesFromDiagram(
+                const ::com::sun::star::uno::Reference<
+                    ::com::sun::star::chart2::XDiagram > & xDiagram );
+    static ::std::map< ::com::sun::star::uno::Reference<
+                ::com::sun::star::chart2::XDataSeries >, sal_Int32 >
+            getDataSeriesIndexMapFromDiagram(
+                const ::com::sun::star::uno::Reference<
+                    ::com::sun::star::chart2::XDiagram > & xDiagram );
+
+    static bool isCandleStickSeries(
+                  const ::com::sun::star::uno::Reference<
+                    ::com::sun::star::chart2::XDataSeries >& xSeries
+                , const ::com::sun::star::uno::Reference<
+                    ::com::sun::star::frame::XModel >& xChartModel  );
+
+    static ::com::sun::star::uno::Reference<
+                ::com::sun::star::beans::XPropertySet > createOldAPISeriesPropertySet(
+                    const ::com::sun::star::uno::Reference<
+                        ::com::sun::star::chart2::XDataSeries >& xSeries
+                    , const ::com::sun::star::uno::Reference<
+                        ::com::sun::star::frame::XModel >& xChartModel );
+
+    static ::com::sun::star::uno::Reference<
+                ::com::sun::star::beans::XPropertySet > createOldAPIDataPointPropertySet(
+                    const ::com::sun::star::uno::Reference<
+                        ::com::sun::star::chart2::XDataSeries >& xSeries
+                    , sal_Int32 nPointIndex
+                    , const ::com::sun::star::uno::Reference<
+                        ::com::sun::star::frame::XModel >& xChartModel );
+};
+
+// _XMLOFF_SCH_XML_SERIESHELPER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index cf3d3cc..6dbf23c 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -24,7 +24,6 @@
 #include "SchXMLPlotAreaContext.hxx"
 #include "SchXMLParagraphContext.hxx"
 #include "SchXMLTableContext.hxx"
-#include "SchXMLSeriesHelper.hxx"
 #include "SchXMLSeries2Context.hxx"
 #include "SchXMLTools.hxx"
 #include <comphelper/mediadescriptor.hxx>
@@ -36,6 +35,7 @@
 #include <xmloff/xmluconv.hxx>
 #include <xmloff/xmlstyle.hxx>
 #include <xmloff/prstylei.hxx>
+#include <xmloff/SchXMLSeriesHelper.hxx>
 
 #include "vector"
 #include <com/sun/star/chart/XChartDocument.hpp>
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index c3c38ec..11cac87 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -24,7 +24,6 @@
 
 #include "SchXMLExport.hxx"
 #include "XMLChartPropertySetMapper.hxx"
-#include "SchXMLSeriesHelper.hxx"
 #include "ColorPropertySet.hxx"
 #include "SchXMLTools.hxx"
 #include "SchXMLEnumConverter.hxx"
@@ -42,6 +41,7 @@
 #include <xmloff/xmlaustp.hxx>
 #include <xmloff/xmluconv.hxx>
 #include <xmloff/xmlmetae.hxx>
+#include <xmloff/SchXMLSeriesHelper.hxx>
 #include "xexptran.hxx"
 #include <rtl/math.hxx>
 // header for any2enum
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 222a365..5f4bf11 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -20,7 +20,6 @@
 
 #include "SchXMLSeries2Context.hxx"
 #include "SchXMLPlotAreaContext.hxx"
-#include "SchXMLSeriesHelper.hxx"
 #include "SchXMLTools.hxx"
 #include "PropertyMap.hxx"
 
@@ -45,6 +44,7 @@
 #include "xmloff/xmlnmspe.hxx"
 #include <xmloff/xmlimp.hxx>
 #include <xmloff/nmspmap.hxx>
+#include <xmloff/SchXMLSeriesHelper.hxx>
 #include "SchXMLImport.hxx"
 // header for class XMLPropStyleContext
 #include <xmloff/prstylei.hxx>
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.cxx b/xmloff/source/chart/SchXMLSeriesHelper.cxx
index c68856d..c50ac86 100644
--- a/xmloff/source/chart/SchXMLSeriesHelper.cxx
+++ b/xmloff/source/chart/SchXMLSeriesHelper.cxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-#include "SchXMLSeriesHelper.hxx"
+#include <xmloff/SchXMLSeriesHelper.hxx>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
@@ -26,14 +25,13 @@
 #include <com/sun/star/lang/XInitialization.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 
+#include <rtl/ustring.h>
 // header for define DBG_ERROR1
 #include <tools/debug.hxx>
 
 #include <typeinfo>
 
 using namespace ::com::sun::star;
-using ::rtl::OUString;
-using ::rtl::OUStringToOString;
 
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Sequence;
@@ -69,12 +67,9 @@ using ::com::sun::star::uno::Sequence;
     {
         (void)ex; // avoid warning for pro build
 
-        OSL_FAIL( OUStringToOString( OUString(
-                        OUString(  "Exception caught. Type: " ) +
-                        OUString::createFromAscii( typeid( ex ).name()) +
-                        OUString(  ", Message: " ) +
-                        ex.Message), RTL_TEXTENCODING_ASCII_US ).getStr());
-
+        OSL_FAIL( OUStringToOString( "Exception caught. Type: " +
+                        OUString::createFromAscii( typeid( ex ).name() ) +
+                        ", Message: " + ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr());
     }
 
     return aResult;
@@ -169,7 +164,7 @@ bool SchXMLSeriesHelper::isCandleStickSeries(
                                         xNewDiagram, xSeries ) );
             if( xChartType.is() )
             {
-                rtl::OUString aServiceName( xChartType->getChartType() );
+                OUString aServiceName( xChartType->getChartType() );
                 if( aServiceName == "com.sun.star.chart2.CandleStickChartType" )
                     bRet = true;
             }
@@ -193,7 +188,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPISeriesProp
             if( xFactory.is() )
             {
                 xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
-                    OUString( "com.sun.star.comp.chart2.DataSeriesWrapper" ) ), uno::UNO_QUERY );
+                    "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
                 Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
                 if(xInit.is())
                 {
@@ -230,7 +225,7 @@ uno::Reference< beans::XPropertySet > SchXMLSeriesHelper::createOldAPIDataPointP
             if( xFactory.is() )
             {
                 xRet = uno::Reference< beans::XPropertySet >( xFactory->createInstance(
-                    OUString( "com.sun.star.comp.chart2.DataSeriesWrapper" ) ), uno::UNO_QUERY );
+                     "com.sun.star.comp.chart2.DataSeriesWrapper" ), uno::UNO_QUERY );
                 Reference< lang::XInitialization > xInit( xRet, uno::UNO_QUERY );
                 if(xInit.is())
                 {
diff --git a/xmloff/source/chart/SchXMLSeriesHelper.hxx b/xmloff/source/chart/SchXMLSeriesHelper.hxx
deleted file mode 100644
index 1071387..0000000
--- a/xmloff/source/chart/SchXMLSeriesHelper.hxx
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _XMLOFF_SCH_XML_SERIESHELPER_HXX
-#define _XMLOFF_SCH_XML_SERIESHELPER_HXX
-
-#include <com/sun/star/chart2/data/XDataSequence.hpp>
-#include <com/sun/star/chart2/data/XDataSource.hpp>
-#include <com/sun/star/chart2/XDataSeries.hpp>
-#include <com/sun/star/chart2/XDiagram.hpp>
-#include <com/sun/star/frame/XModel.hpp>
-
-#include <vector>
-#include <map>
-#include <iterator>
-
-class SchXMLSeriesHelper
-{
-public:
-    static ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > >
-            getDataSeriesFromDiagram(
-                const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XDiagram > & xDiagram );
-    static ::std::map< ::com::sun::star::uno::Reference<
-                ::com::sun::star::chart2::XDataSeries >, sal_Int32 >
-            getDataSeriesIndexMapFromDiagram(
-                const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XDiagram > & xDiagram );
-
-    static bool isCandleStickSeries(
-                  const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XDataSeries >& xSeries
-                , const ::com::sun::star::uno::Reference<
-                    ::com::sun::star::frame::XModel >& xChartModel  );
-
-    static ::com::sun::star::uno::Reference<
-                ::com::sun::star::beans::XPropertySet > createOldAPISeriesPropertySet(
-                    const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::chart2::XDataSeries >& xSeries
-                    , const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::frame::XModel >& xChartModel );
-
-    static ::com::sun::star::uno::Reference<
-                ::com::sun::star::beans::XPropertySet > createOldAPIDataPointPropertySet(
-                    const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::chart2::XDataSeries >& xSeries
-                    , sal_Int32 nPointIndex
-                    , const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::frame::XModel >& xChartModel );
-};
-
-// _XMLOFF_SCH_XML_SERIESHELPER_HXX
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list