[Libreoffice-commits] core.git: 2 commits - chart2/source
Kohei Yoshida
kohei.yoshida at collabora.com
Wed Jun 25 17:11:34 PDT 2014
chart2/source/controller/dialogs/DataBrowserModel.cxx | 22 ++++++++----------
chart2/source/inc/CachedDataSequence.hxx | 3 ++
chart2/source/inc/UncachedDataSequence.hxx | 10 ++++++++
3 files changed, 23 insertions(+), 12 deletions(-)
New commits:
commit 94c56f6a76ca55f21df9d58a88fc6061bf8c89af
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Wed Jun 25 20:09:58 2014 -0400
Tuck this anonymous namespace inside chart namespace.
This way we can eliminate those explicit '::chart' qualifications.
Change-Id: I764e0ca57c8e10f7eac47f48a4cabf28d0562113
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 15e0cdd..b41d02e 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -61,8 +61,10 @@ using namespace ::com::sun::star;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
-namespace
-{
+namespace chart {
+
+namespace {
+
OUString lcl_getRole(
const Reference< chart2::data::XDataSequence > & xSeq )
{
@@ -85,9 +87,9 @@ OUString lcl_getRole(
OUString lcl_getUIRoleName(
const Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
- OUString aResult = ::chart::DataSeriesHelper::getRole(xLSeq);
+ OUString aResult = DataSeriesHelper::getRole(xLSeq);
if( !aResult.isEmpty())
- aResult = ::chart::DialogModel::ConvertRoleFromInternalToUI( aResult );
+ aResult = DialogModel::ConvertRoleFromInternalToUI(aResult);
return aResult;
}
@@ -114,8 +116,7 @@ bool lcl_SequenceOfSeriesIsShared(
Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY_THROW );
Sequence< Reference< chart2::data::XLabeledDataSequence > > aLSeq( xSource->getDataSequences());
for( sal_Int32 i=0; i<aLSeq.getLength(); ++i )
- if( aLSeq[i].is() &&
- ::chart::DataSeriesHelper::getRole(aLSeq[i]).equals( aValuesRole ))
+ if (aLSeq[i].is() && DataSeriesHelper::getRole(aLSeq[i]).equals(aValuesRole))
{
// getValues().is(), because lcl_getRole checked that already
bResult = (aValuesRep == aLSeq[i]->getValues()->getSourceRangeRepresentation());
@@ -196,11 +197,11 @@ private:
struct lcl_RolesOfLSeqMatch : public ::std::unary_function< Reference< chart2::data::XLabeledDataSequence >, bool >
{
lcl_RolesOfLSeqMatch( const Reference< chart2::data::XLabeledDataSequence > & xLSeq ) :
- m_aRole(::chart::DataSeriesHelper::getRole(xLSeq)) {}
+ m_aRole(DataSeriesHelper::getRole(xLSeq)) {}
bool operator() ( const Reference< chart2::data::XLabeledDataSequence > & xLSeq )
{
- return ::chart::DataSeriesHelper::getRole(xLSeq).equals(m_aRole);
+ return DataSeriesHelper::getRole(xLSeq).equals(m_aRole);
}
private:
OUString m_aRole;
@@ -214,14 +215,11 @@ bool lcl_ShowCategories( const Reference< chart2::XDiagram > & /* xDiagram */ )
bool lcl_ShowCategoriesAsDataLabel( const Reference< chart2::XDiagram > & xDiagram )
{
- return ! ::chart::DiagramHelper::isCategoryDiagram( xDiagram );
+ return !DiagramHelper::isCategoryDiagram(xDiagram);
}
} // anonymous namespace
-namespace chart
-{
-
struct DataBrowserModel::tDataColumn
{
::com::sun::star::uno::Reference<
commit 78751ce780f18811fe2e878ba10be18d55c58e4d
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Wed Jun 25 20:02:59 2014 -0400
Add class descriptions. These two classes' roles were not very clear.
Change-Id: Ib45c9037f2c4b3ee5bfed79f3c93e5020bac477b
diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx
index e4c9d80..243eea5 100644
--- a/chart2/source/inc/CachedDataSequence.hxx
+++ b/chart2/source/inc/CachedDataSequence.hxx
@@ -56,6 +56,9 @@ typedef ::cppu::WeakComponentImplHelper7<
CachedDataSequence_Base;
}
+/**
+ * This sequence object does store actual values within, hence "cached".
+ */
class CachedDataSequence :
public ::comphelper::OMutexAndBroadcastHelper,
public ::comphelper::OPropertyContainer,
diff --git a/chart2/source/inc/UncachedDataSequence.hxx b/chart2/source/inc/UncachedDataSequence.hxx
index 2d31d97..a87b798 100644
--- a/chart2/source/inc/UncachedDataSequence.hxx
+++ b/chart2/source/inc/UncachedDataSequence.hxx
@@ -61,6 +61,16 @@ typedef ::cppu::WeakComponentImplHelper8<
UncachedDataSequence_Base;
}
+/**
+ * This sequence object does NOT store actual sequence data. Instead, it
+ * references a column inside the internal data table (represented by class
+ * InternalData) via range representation string. The range representation
+ * string ends with a numeric value that indicates the column index within
+ * the internal data table.
+ *
+ * <p>A range representation can be either '0', '1', '2', ..., or 'label 1',
+ * 'label 2', ....</p>
+ */
class UncachedDataSequence :
public ::comphelper::OMutexAndBroadcastHelper,
public ::comphelper::OPropertyContainer,
More information about the Libreoffice-commits
mailing list