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

Tor Lillqvist tml at collabora.com
Mon Feb 17 13:49:10 CET 2014


 chart2/source/controller/dialogs/DialogModel.cxx   |    2 +-
 chart2/source/controller/dialogs/DialogModel.hxx   |    8 ++++----
 chart2/source/controller/dialogs/tp_DataSource.cxx |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 1113c243b100fa5258d7fc1e72e3afd5d9f871e8
Author: Tor Lillqvist <tml at collabora.com>
Date:   Mon Feb 17 14:31:47 2014 +0200

    Don't violate the One Definition Rule
    
    There were two different struct types called chart::TimeBasedInfo,
    which caused problems at least in statically linked iOS app.
    
    Rename the other struct to chart::DialogModelTimeBasedInfo for now.
    
    Change-Id: Ib95736b1046c5bd9001d7aeba2b8bbd22a18f8c2

diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index c7903f0..b88581f 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -367,7 +367,7 @@ struct lcl_addSeriesNumber : public ::std::binary_function<
 namespace chart
 {
 
-TimeBasedInfo::TimeBasedInfo():
+DialogModelTimeBasedInfo::DialogModelTimeBasedInfo():
     bTimeBased(false),
     nStart(0),
     nEnd(0)
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index 244dd82..99a92b8 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -47,9 +47,9 @@ namespace chart
 
 class RangeSelectionHelper;
 
-struct TimeBasedInfo
+struct DialogModelTimeBasedInfo
 {
-    TimeBasedInfo();
+    DialogModelTimeBasedInfo();
 
     bool bTimeBased;
     sal_Int32 nStart;
@@ -153,7 +153,7 @@ public:
 
     void setTimeBasedRange( bool bTimeBased, sal_Int32 nStart, sal_Int32 nEnd) const;
 
-    const TimeBasedInfo& getTimeBasedInfo() const { return maTimeBasedInfo; }
+    const DialogModelTimeBasedInfo& getTimeBasedInfo() const { return maTimeBasedInfo; }
 
     void startControllerLockTimer();
 
@@ -194,7 +194,7 @@ private:
     sal_Int32 countSeries() const;
 
     ChartModel& getModel() const;
-    mutable TimeBasedInfo maTimeBasedInfo;
+    mutable DialogModelTimeBasedInfo maTimeBasedInfo;
 };
 
 } //  namespace chart
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 2f18449..60cf54b 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -986,7 +986,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
             Reference< util::XModifiable > xModifiable( m_rDialogModel.getChartModel(), uno::UNO_QUERY );
             if( xModifiable.is() )
                 xModifiable->setModified( sal_True );
-            const TimeBasedInfo& rInfo = m_rDialogModel.getTimeBasedInfo();
+            const DialogModelTimeBasedInfo& rInfo = m_rDialogModel.getTimeBasedInfo();
             if(rInfo.bTimeBased)
             {
                 m_rDialogModel.setTimeBasedRange(rInfo.bTimeBased, rInfo.nStart, rInfo.nEnd);


More information about the Libreoffice-commits mailing list