[Libreoffice-commits] core.git: 4 commits - chart2/source

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Mar 25 08:16:27 PDT 2013


 chart2/source/inc/InternalData.hxx                  |    4 ++--
 chart2/source/inc/macros.hxx                        |   10 +++-------
 chart2/source/model/main/ChartModel_Persistence.cxx |    2 +-
 chart2/source/model/template/ChartTypeManager.cxx   |    2 +-
 chart2/source/model/template/DataInterpreter.cxx    |   11 ++++++-----
 chart2/source/tools/InternalData.cxx                |    1 -
 6 files changed, 13 insertions(+), 17 deletions(-)

New commits:
commit 1f211f1cb2cff4f8ec0e8c21a3258b8b4077c883
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Mar 25 06:56:47 2013 +0100

    OSL_FAIL to SAL_WARN in ASSERT_EXCEPTION
    
    Change-Id: I86e50b35fe32d3fdaf2b314e10e582e1b084efa2

diff --git a/chart2/source/inc/macros.hxx b/chart2/source/inc/macros.hxx
index 1e5bc9e..89a0e56 100644
--- a/chart2/source/inc/macros.hxx
+++ b/chart2/source/inc/macros.hxx
@@ -26,11 +26,9 @@
 */
 #if OSL_DEBUG_LEVEL > 0
 #define ASSERT_EXCEPTION(ex)                   \
-  OSL_FAIL( OUStringToOString( \
-    "Exception caught. Type: " +\
-    OUString::createFromAscii( typeid( ex ).name()) +\
-    ", Message: " +\
-    ex.Message, RTL_TEXTENCODING_ASCII_US ).getStr())
+  SAL_WARN("chart2", "Exception caught. Type: " <<\
+    typeid( ex ).name() << ", Message: " << \
+    ex.Message )
 #else
 //avoid compilation warnings
 #define ASSERT_EXCEPTION(ex) (void)(ex)
commit aa463487778e3c04537d6a18f1e29041da4df122
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Mar 25 06:44:31 2013 +0100

    remove C2U in chart2
    
    Change-Id: Id7ebf66319f0891d276a3da95a95658aed59cbc7

diff --git a/chart2/source/inc/macros.hxx b/chart2/source/inc/macros.hxx
index e7554c7..1e5bc9e 100644
--- a/chart2/source/inc/macros.hxx
+++ b/chart2/source/inc/macros.hxx
@@ -36,8 +36,6 @@
 #define ASSERT_EXCEPTION(ex) (void)(ex)
 #endif
 
-#define U2C(ouString) (OUStringToOString(ouString,RTL_TEXTENCODING_ASCII_US).getStr())
-
 // CHART_MACROS_HXX
 #endif
 
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index f2b5e70..2bc5cde 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -173,7 +173,7 @@ Reference< document::XFilter > ChartModel::impl_createFilter(
                     xFilter.set(
                         m_xContext->getServiceManager()->createInstanceWithContext(
                             aFilterServiceName, m_xContext ), uno::UNO_QUERY_THROW );
-                    OSL_TRACE( "Filter found for service %s", U2C( aFilterServiceName ));
+                    SAL_WARN("chart2", "Filter found for service " << aFilterServiceName );
                 }
             }
         }
diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx
index 25aba04..c72abbe 100644
--- a/chart2/source/model/template/ChartTypeManager.cxx
+++ b/chart2/source/model/template/ChartTypeManager.cxx
@@ -257,7 +257,7 @@ uno::Reference< uno::XInterface > SAL_CALL ChartTypeManager::createInstance(
             // createInstance is called with an unknown service-name, this
             // function will just return an empty XInterface.
             ASSERT_EXCEPTION( ex );
-            OSL_TRACE( "Couldn't instantiate service \"%s\"", U2C( aServiceSpecifier ));
+            SAL_WARN("chart2", "Couldn't instantiate service: "<< aServiceSpecifier );
             xResult.set( 0 );
         }
     }
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index 613570f..696e2a1 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -410,7 +410,7 @@ void lcl_ShowDataSource( const Reference< data::XDataSource > & xSource )
     if( ! xSource.is())
         return;
 
-    OSL_TRACE( "DataSource in DataInterpreter:" );
+    SAL_INFO("chart2", "DataSource in DataInterpreter:" );
     Sequence< Reference< data::XLabeledDataSequence > > aSequences( xSource->getDataSequences());
     Reference< beans::XPropertySet > xProp;
     OUString aId;
@@ -426,11 +426,11 @@ void lcl_ShowDataSource( const Reference< data::XDataSource > & xSource )
             if( xProp.is() &&
                 ( xProp->getPropertyValue( "Role") >>= aId ))
             {
-                OSL_TRACE( "  <data sequence %d> Role: %s, Source: %s", k, U2C( aId ), U2C( aSourceRepr ));
+                SAL_INFO("chart2", "  <data sequence " << k << "> Role: " << aId << ", Source: "<< aSourceRepr);
             }
             else
             {
-                OSL_TRACE( "  <data sequence %d> unknown Role, Source: %s", k, U2C( aSourceRepr ) );
+                SAL_INFO("chart2", "  <data sequence " << k << "> unknown Role, Source: " << aSourceRepr );
             }
 
             aSourceRepr = "<none>";
@@ -440,11 +440,12 @@ void lcl_ShowDataSource( const Reference< data::XDataSource > & xSource )
             if( xProp.is() &&
                 ( xProp->getPropertyValue( "Role") >>= aId ))
             {
-                OSL_TRACE( "  <data sequence label %d> Role: %s, Source: %s", k, U2C( aId ), U2C( aSourceRepr ));
+                SAL_INFO("chart2", "  <data sequence label " << k << "> Role: " << aId
+                        << ", Source: " << aSourceRepr );
             }
             else
             {
-                OSL_TRACE( "  <data sequence label %d> unknown Role, Source: %s", k, U2C( aSourceRepr ) );
+                SAL_INFO("chart2", "  <data sequence label " << k << "> unknown Role, Source: " << aSourceRepr );
             }
         }
     }
diff --git a/chart2/source/tools/InternalData.cxx b/chart2/source/tools/InternalData.cxx
index c7458c7..e8d4def 100644
--- a/chart2/source/tools/InternalData.cxx
+++ b/chart2/source/tools/InternalData.cxx
@@ -21,7 +21,6 @@
 #include "InternalData.hxx"
 #include "ResId.hxx"
 #include "Strings.hrc"
-#include "macros.hxx"
 
 #include <rtl/math.hxx>
 #include <algorithm>
commit deae37714cb25c89604ca23138809f08f5ab496c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Mar 25 06:22:18 2013 +0100

    sal_True -> true in comment
    
    Change-Id: I76ad0df3298bf57e679551a1a33153716ff3498e

diff --git a/chart2/source/inc/InternalData.hxx b/chart2/source/inc/InternalData.hxx
index 9c6dc98..7832d91 100644
--- a/chart2/source/inc/InternalData.hxx
+++ b/chart2/source/inc/InternalData.hxx
@@ -84,7 +84,7 @@ private: //methods
     /** resizes the data if at least one of the given dimensions is larger than
         before.  The data is never becoming smaller only larger.
 
-        @return </sal_True>, if the data was enlarged
+        @return </true>, if the data was enlarged
     */
     bool enlargeData( sal_Int32 nColumnCount, sal_Int32 nRowCount );
 
commit 468ab8a4d616ca05d5a23fb4abb66a510ef86311
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Mar 24 17:16:07 2013 +0100

    make this typedef private
    
    Change-Id: Ibcf8c0ad785ea38e43e08ec520fb093e3cfd3cbf

diff --git a/chart2/source/inc/InternalData.hxx b/chart2/source/inc/InternalData.hxx
index 07af17d..9c6dc98 100644
--- a/chart2/source/inc/InternalData.hxx
+++ b/chart2/source/inc/InternalData.hxx
@@ -69,7 +69,6 @@ public:
     sal_Int32 getRowCount() const;
     sal_Int32 getColumnCount() const;
 
-    typedef ::std::valarray< double > tDataType;
     typedef ::std::vector< ::std::vector< ::com::sun::star::uno::Any > > tVecVecAny; //inner index is hierarchical level
 
     void setComplexRowLabels( const tVecVecAny& rNewRowLabels );
@@ -93,6 +92,7 @@ private:
     sal_Int32   m_nColumnCount;
     sal_Int32   m_nRowCount;
 
+    typedef ::std::valarray< double > tDataType;
     tDataType    m_aData;
     tVecVecAny   m_aRowLabels;//outer index is row index, inner index is category level
     tVecVecAny   m_aColumnLabels;//outer index is column index


More information about the Libreoffice-commits mailing list