Kaydet (Commit) 8f14c8a6 authored tarafından Olivier Hallot's avatar Olivier Hallot Kaydeden (comit) Muthu Subramanian

OUString cleanup in Chart2

Include C2U macro and rtl prefix

Change-Id: If930f77179dbf24d43f10a344b68edcf968f7304
üst 33bea955
......@@ -252,12 +252,12 @@ void RangeChooserTabPage::changeDialogModelAccordingToControls()
m_aRB_Columns.IsChecked(), bFirstCellAsLabel, bHasCategories ) );
// only if range is valid
if( m_aLastValidRangeString.equals( m_aED_Range.GetText()))
if( m_aLastValidRangeString.equals(m_aED_Range.GetText()))
{
m_rDialogModel.setTemplate( m_xCurrentChartTypeTemplate );
aArguments.realloc( aArguments.getLength() + 1 );
aArguments[aArguments.getLength() - 1] =
beans::PropertyValue( C2U("CellRangeRepresentation"), -1,
beans::PropertyValue( "CellRangeRepresentation" , -1,
uno::makeAny( m_aLastValidRangeString ),
beans::PropertyState_DIRECT_VALUE );
m_rDialogModel.setData( aArguments );
......@@ -271,7 +271,7 @@ void RangeChooserTabPage::changeDialogModelAccordingToControls()
bool RangeChooserTabPage::isValid()
{
::rtl::OUString aRange( m_aED_Range.GetText());
OUString aRange( m_aED_Range.GetText());
sal_Bool bFirstCellAsLabel = ( m_aCB_FirstColumnAsLabel.IsChecked() && !m_aRB_Columns.IsChecked() )
|| ( m_aCB_FirstRowAsLabel.IsChecked() && !m_aRB_Rows.IsChecked() );
sal_Bool bHasCategories = ( m_aCB_FirstColumnAsLabel.IsChecked() && m_aRB_Columns.IsChecked() )
......@@ -352,9 +352,9 @@ IMPL_LINK_NOARG(RangeChooserTabPage, ControlChangedHdl)
IMPL_LINK_NOARG(RangeChooserTabPage, ChooseRangeHdl)
{
rtl::OUString aRange = m_aED_Range.GetText();
OUString aRange = m_aED_Range.GetText();
// using assignment for broken gcc 3.3
rtl::OUString aTitle = String( SchResId( STR_PAGE_DATA_RANGE ) );
OUString aTitle = String( SchResId( STR_PAGE_DATA_RANGE ) );
lcl_enableRangeChoosing( true, m_pParentDialog );
m_rDialogModel.getRangeSelectionHelper()->chooseRange( aRange, aTitle, *this );
......@@ -363,11 +363,11 @@ IMPL_LINK_NOARG(RangeChooserTabPage, ChooseRangeHdl)
}
void RangeChooserTabPage::listeningFinished( const ::rtl::OUString & rNewRange )
void RangeChooserTabPage::listeningFinished( const OUString & rNewRange )
{
//user has selected a new range
rtl::OUString aRange( rNewRange );
OUString aRange( rNewRange );
m_rDialogModel.startControllerLockTimer();
......
......@@ -100,7 +100,7 @@ protected: //member
::com::sun::star::uno::Reference<
::com::sun::star::chart2::data::XDataProvider > m_xDataProvider;
rtl::OUString m_aLastValidRangeString;
OUString m_aLastValidRangeString;
::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartTypeTemplate > m_xCurrentChartTypeTemplate;
ChartTypeTemplateProvider* m_pTemplateProvider;
......
......@@ -192,8 +192,8 @@ SdrObject* DrawViewWrapper::getHitObject( const Point& rPnt ) const
if( pRet )
{
//ignore some special shapes
rtl::OUString aShapeName = pRet->GetName();
if( aShapeName.match(C2U("PlotAreaIncludingAxes")) || aShapeName.match(C2U("PlotAreaExcludingAxes")) )
OUString aShapeName = pRet->GetName();
if( aShapeName.match("PlotAreaIncludingAxes") || aShapeName.match("PlotAreaExcludingAxes") )
{
pRet->SetMarkProtect( true );
return getHitObject( rPnt );
......@@ -300,7 +300,7 @@ SfxItemSet DrawViewWrapper::getPositionAndSizeItemSetFromMarkedObject() const
return aFullSet;
}
SdrObject* DrawViewWrapper::getNamedSdrObject( const rtl::OUString& rName ) const
SdrObject* DrawViewWrapper::getNamedSdrObject( const OUString& rName ) const
{
if(rName.isEmpty())
return 0;
......
......@@ -56,8 +56,8 @@ void lcl_getErrorValues( const uno::Reference< beans::XPropertySet > & xErrorBar
try
{
xErrorBarProp->getPropertyValue( C2U( "PositiveError" )) >>= rOutPosError;
xErrorBarProp->getPropertyValue( C2U( "NegativeError" )) >>= rOutNegError;
xErrorBarProp->getPropertyValue( "PositiveError" ) >>= rOutPosError;
xErrorBarProp->getPropertyValue( "NegativeError" ) >>= rOutNegError;
}
catch( const uno::Exception & ex )
{
......@@ -74,8 +74,8 @@ void lcl_getErrorIndicatorValues(
try
{
xErrorBarProp->getPropertyValue( C2U( "ShowPositiveError" )) >>= rOutShowPosError;
xErrorBarProp->getPropertyValue( C2U( "ShowNegativeError" )) >>= rOutShowNegError;
xErrorBarProp->getPropertyValue( "ShowPositiveError" ) >>= rOutShowPosError;
xErrorBarProp->getPropertyValue( "ShowNegativeError" ) >>= rOutShowNegError;
}
catch( const uno::Exception & ex )
{
......@@ -184,8 +184,7 @@ bool ErrorBarItemConverter::ApplySpecialItem(
nStyle = ::com::sun::star::chart::ErrorBarStyle::FROM_DATA; break;
}
xErrorBarProp->setPropertyValue( C2U( "ErrorBarStyle" ),
uno::makeAny( nStyle ));
xErrorBarProp->setPropertyValue( "ErrorBarStyle" , uno::makeAny( nStyle ));
bChanged = true;
}
}
......@@ -194,7 +193,7 @@ bool ErrorBarItemConverter::ApplySpecialItem(
case SCHATTR_STAT_PERCENT:
case SCHATTR_STAT_BIGERROR:
{
OSL_FAIL( "Deprectaed item" );
OSL_FAIL( "Deprecated item" );
uno::Reference< beans::XPropertySet > xErrorBarProp( GetPropertySet());
double fValue =
......@@ -206,10 +205,8 @@ bool ErrorBarItemConverter::ApplySpecialItem(
if( ! ( ::rtl::math::approxEqual( fPos, fValue ) &&
::rtl::math::approxEqual( fNeg, fValue )))
{
xErrorBarProp->setPropertyValue( C2U( "PositiveError" ),
uno::makeAny( fValue ));
xErrorBarProp->setPropertyValue( C2U( "NegativeError" ),
uno::makeAny( fValue ));
xErrorBarProp->setPropertyValue( "PositiveError" , uno::makeAny( fValue ));
xErrorBarProp->setPropertyValue( "NegativeError" , uno::makeAny( fValue ));
bChanged = true;
}
}
......@@ -225,7 +222,7 @@ bool ErrorBarItemConverter::ApplySpecialItem(
if( ! ::rtl::math::approxEqual( fPos, fValue ))
{
GetPropertySet()->setPropertyValue( C2U( "PositiveError" ), uno::makeAny( fValue ));
GetPropertySet()->setPropertyValue( "PositiveError" , uno::makeAny( fValue ));
bChanged = true;
}
}
......@@ -243,7 +240,7 @@ bool ErrorBarItemConverter::ApplySpecialItem(
if( ! ::rtl::math::approxEqual( fNeg, fValue ))
{
xErrorBarProp->setPropertyValue( C2U( "NegativeError" ), uno::makeAny( fValue ));
xErrorBarProp->setPropertyValue( "NegativeError" , uno::makeAny( fValue ));
bChanged = true;
}
}
......@@ -266,8 +263,8 @@ bool ErrorBarItemConverter::ApplySpecialItem(
if( ( bShowPos != bNewIndPos ||
bShowNeg != bNewIndNeg ))
{
xErrorBarProp->setPropertyValue( C2U( "ShowPositiveError" ), uno::makeAny( bNewIndPos ));
xErrorBarProp->setPropertyValue( C2U( "ShowNegativeError" ), uno::makeAny( bNewIndNeg ));
xErrorBarProp->setPropertyValue( "ShowPositiveError" , uno::makeAny( bNewIndPos ));
xErrorBarProp->setPropertyValue( "ShowNegativeError" , uno::makeAny( bNewIndNeg ));
bChanged = true;
}
}
......@@ -288,7 +285,7 @@ bool ErrorBarItemConverter::ApplySpecialItem(
xDataProvider.set( xChartDoc->getDataProvider());
if( xErrorBarSource.is() && xDataProvider.is())
{
::rtl::OUString aNewRange( static_cast< const SfxStringItem & >( rItemSet.Get( nWhichId )).GetValue());
OUString aNewRange( static_cast< const SfxStringItem & >( rItemSet.Get( nWhichId )).GetValue());
bool bApplyNewRange = false;
bool bIsPositiveValue( nWhichId == SCHATTR_STAT_RANGE_POS );
......@@ -307,7 +304,7 @@ bool ErrorBarItemConverter::ApplySpecialItem(
if( xIntDataProvider.is())
{
xIntDataProvider->appendSequence();
aNewRange = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("last"));
aNewRange = "last";
bApplyNewRange = true;
}
}
......@@ -319,7 +316,7 @@ bool ErrorBarItemConverter::ApplySpecialItem(
StatisticsHelper::getErrorDataSequenceFromDataSource(
xErrorBarSource, bIsPositiveValue, bYError ));
bApplyNewRange =
! ( xSeq.is() && aNewRange.equals( xSeq->getSourceRangeRepresentation()));
! ( xSeq.is() && (aNewRange == xSeq->getSourceRangeRepresentation()));
}
if( bApplyNewRange )
......@@ -345,7 +342,7 @@ void ErrorBarItemConverter::FillSpecialItem(
uno::Reference< beans::XPropertySet > xErrorBarProp( GetPropertySet());
sal_Int32 nStyle = 0;
if( xErrorBarProp->getPropertyValue( C2U( "ErrorBarStyle" )) >>= nStyle )
if( xErrorBarProp->getPropertyValue( "ErrorBarStyle" ) >>= nStyle )
{
switch( nStyle )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment