summaryrefslogtreecommitdiffstats
path: root/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-07-21 19:55:03 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-07-21 20:31:24 -0400
commit9e970303ddcccd9e33641f8f00bbc4c739a58cd7 (patch)
tree8d04e4966c5b38c08e78a010c358a9aab06f9676 /chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
parentCompiler macro in lieu of literal "Label" to make it easier to track it. (diff)
downloadcore-9e970303ddcccd9e33641f8f00bbc4c739a58cd7.tar.gz
core-9e970303ddcccd9e33641f8f00bbc4c739a58cd7.zip
Remove auto_ptr from CharacterPropertyItemConverter.
And adjust all that's necessary. Change-Id: I121e5aa4d117da2e5e6b11e4fd85960a8b3aa727
Diffstat (limited to 'chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx')
-rw-r--r--chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
index 9619f009acc1..97bf8c87123f 100644
--- a/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/CharacterPropertyItemConverter.cxx
@@ -64,10 +64,7 @@ namespace
}
} // anonymous namespace
-namespace chart
-{
-namespace wrapper
-{
+namespace chart { namespace wrapper {
CharacterPropertyItemConverter::CharacterPropertyItemConverter(
const uno::Reference< beans::XPropertySet > & rPropertySet,
@@ -75,19 +72,19 @@ CharacterPropertyItemConverter::CharacterPropertyItemConverter(
ItemConverter( rPropertySet, rItemPool )
{}
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
CharacterPropertyItemConverter::CharacterPropertyItemConverter(
const uno::Reference< beans::XPropertySet > & rPropertySet,
SfxItemPool& rItemPool,
- ::std::auto_ptr< awt::Size > pRefSize,
+ const awt::Size* pRefSize,
const OUString & rRefSizePropertyName,
const uno::Reference< beans::XPropertySet > & rRefSizePropSet ) :
ItemConverter( rPropertySet, rItemPool ),
- m_pRefSize( pRefSize ),
m_aRefSizePropertyName( rRefSizePropertyName ),
m_xRefSizePropSet( rRefSizePropSet.is() ? rRefSizePropSet : rPropertySet )
-{}
-SAL_WNODEPRECATED_DECLARATIONS_POP
+{
+ if (pRefSize)
+ m_pRefSize.reset(*pRefSize);
+}
CharacterPropertyItemConverter::~CharacterPropertyItemConverter()
{}
@@ -268,7 +265,7 @@ void CharacterPropertyItemConverter::FillSpecialItem(
float fHeight;
if( aValue >>= fHeight )
{
- if( m_pRefSize.get())
+ if (m_pRefSize)
{
awt::Size aOldRefSize;
if( GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ) >>= aOldRefSize )
@@ -518,7 +515,7 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
bSetValue = true;
else
{
- if( m_pRefSize.get() )
+ if (m_pRefSize)
{
awt::Size aNewRefSize = *m_pRefSize;
awt::Size aOldRefSize;
@@ -533,11 +530,10 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
if( bSetValue )
{
// set new reference size only if there was a reference size before (auto-scaling on)
- if( m_pRefSize.get() &&
- GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ).hasValue())
+ if (m_pRefSize && GetRefSizePropertySet()->getPropertyValue( m_aRefSizePropertyName ).hasValue())
{
- GetRefSizePropertySet()->setPropertyValue( m_aRefSizePropertyName,
- uno::makeAny( *m_pRefSize ));
+ GetRefSizePropertySet()->setPropertyValue(
+ m_aRefSizePropertyName, uno::makeAny(*m_pRefSize));
}
GetPropertySet()->setPropertyValue( "CharHeight" + aPostfix, aValue );
@@ -556,7 +552,11 @@ bool CharacterPropertyItemConverter::ApplySpecialItem(
return bChanged;
}
-} // namespace wrapper
-} // namespace chart
+uno::Reference<beans::XPropertySet> CharacterPropertyItemConverter::GetRefSizePropertySet() const
+{
+ return m_xRefSizePropSet;
+}
+
+}}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */