summaryrefslogtreecommitdiff
path: root/chart2/source/controller/chartapiwrapper
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/chartapiwrapper')
-rw-r--r--chart2/source/controller/chartapiwrapper/AreaWrapper.cxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.cxx24
-rw-r--r--chart2/source/controller/chartapiwrapper/AxisWrapper.hxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx88
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx24
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx24
-rw-r--r--chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx95
-rw-r--r--chart2/source/controller/chartapiwrapper/GridWrapper.cxx5
-rw-r--r--chart2/source/controller/chartapiwrapper/LegendWrapper.cxx20
-rw-r--r--chart2/source/controller/chartapiwrapper/LegendWrapper.hxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx7
-rw-r--r--chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.cxx18
-rw-r--r--chart2/source/controller/chartapiwrapper/TitleWrapper.hxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx33
-rw-r--r--chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx8
-rw-r--r--chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx159
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx52
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedNamedProperty.cxx154
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedNamedProperty.hxx115
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx170
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx57
-rw-r--r--chart2/source/controller/chartapiwrapper/makefile.mk7
27 files changed, 602 insertions, 498 deletions
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
index 888cc4477548..de6a2ed33838 100644
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: AreaWrapper.cxx,v $
- * $Revision: 1.5 $
+ * $Revision: 1.5.16.1 $
*
* This file is part of OpenOffice.org.
*
@@ -42,8 +42,6 @@
#include "LineProperties.hxx"
#include "FillProperties.hxx"
#include "UserDefinedProperties.hxx"
-// #include "NamedProperties.hxx"
-// #include "WrappedNamedProperty.hxx"
#include <algorithm>
@@ -189,8 +187,6 @@ const std::vector< WrappedProperty* > AreaWrapper::createWrappedProperties()
aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U("LineStyle"), C2U("LineStyle") ) );
-// WrappedNamedProperty::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
-
return aWrappedProperties;
}
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index 350d51b2bfa6..96eb55f5f369 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: AxisWrapper.cxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.11.8.3 $
*
* This file is part of OpenOffice.org.
*
@@ -43,15 +43,14 @@
#include "CharacterProperties.hxx"
#include "LineProperties.hxx"
-// #include "NamedLineProperties.hxx"
#include "UserDefinedProperties.hxx"
#include "WrappedCharacterHeightProperty.hxx"
#include "WrappedTextRotationProperty.hxx"
-// #include "WrappedNamedProperty.hxx"
#include "WrappedGapwidthProperty.hxx"
#include "WrappedScaleProperty.hxx"
#include "WrappedDefaultProperty.hxx"
#include "WrappedNumberFormatProperty.hxx"
+#include "WrappedScaleTextProperties.hxx"
#include <algorithm>
#include <rtl/ustrbuf.hxx>
@@ -306,6 +305,7 @@ const Sequence< Property > & lcl_GetPropertySequence()
::chart::LineProperties::AddPropertiesToVector( aProperties );
// ::chart::NamedLineProperties::AddPropertiesToVector( aProperties );
::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
// and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
@@ -440,26 +440,27 @@ void SAL_CALL AxisWrapper::removeEventListener(
// ================================================================================
//ReferenceSizePropertyProvider
-void AxisWrapper::setCurrentSizeAsReference()
+void AxisWrapper::updateReferenceSize()
{
- /*
Reference< beans::XPropertySet > xProp( this->getAxis(), uno::UNO_QUERY );
if( xProp.is() )
- xProp->setPropertyValue( C2U("ReferenceDiagramSize"), uno::makeAny(
- m_spChart2ModelContact->GetDiagramSize() ));
- */
+ {
+ if( xProp->getPropertyValue( C2U("ReferencePageSize") ).hasValue() )
+ xProp->setPropertyValue( C2U("ReferencePageSize"), uno::makeAny(
+ m_spChart2ModelContact->GetPageSize() ));
+ }
}
Any AxisWrapper::getReferenceSize()
{
Any aRet;
Reference< beans::XPropertySet > xProp( this->getAxis(), uno::UNO_QUERY );
if( xProp.is() )
- aRet = xProp->getPropertyValue( C2U("ReferenceDiagramSize") );
+ aRet = xProp->getPropertyValue( C2U("ReferencePageSize") );
return aRet;
}
awt::Size AxisWrapper::getCurrentSizeForReference()
{
- return m_spChart2ModelContact->GetDiagramSize();
+ return m_spChart2ModelContact->GetPageSize();
}
// ================================================================================
@@ -534,9 +535,8 @@ const std::vector< WrappedProperty* > AxisWrapper::createWrappedProperties()
WrappedScaleProperty::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
- //aWrappedProperties.push_back( new WrappedStackedTextProperty() );
-// WrappedNamedProperty::addWrappedLineProperties( aWrappedProperties, m_spChart2ModelContact );
WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this );
+ WrappedScaleTextProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
return aWrappedProperties;
}
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
index 4d18df938b66..b7708dcf2ac2 100644
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: AxisWrapper.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.8.1 $
*
* This file is part of OpenOffice.org.
*
@@ -82,7 +82,7 @@ public:
APPHELPER_XSERVICEINFO_DECL()
//ReferenceSizePropertyProvider
- virtual void setCurrentSizeAsReference();
+ virtual void updateReferenceSize();
virtual ::com::sun::star::uno::Any getReferenceSize();
virtual ::com::sun::star::awt::Size getCurrentSizeForReference();
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index 609a451ec7bb..4b44b2e0593d 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: Chart2ModelContact.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.44.2 $
*
* This file is part of OpenOffice.org.
*
@@ -178,87 +178,12 @@ sal_Int32 Chart2ModelContact::getExplicitNumberFormatKeyForAxis(
}
//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-uno::Any Chart2ModelContact::GetListElementByName(
- const rtl::OUString& rElementName, const rtl::OUString& rTableTypePropertyName )
-{
- uno::Any aResult;
- try
- {
- tTableMap::iterator aIter( m_aTableMap.find(rTableTypePropertyName) );
- if( aIter == m_aTableMap.end() )
- {
- DBG_ERROR("no container found for the given type (gradient/hatch etc)");
- return aResult;
- }
-
- if( !aIter->second->hasByName(rElementName) )
- {
- DBG_ERROR("no element with the given name found");
- return aResult;
- }
-
- aResult = aIter->second->getByName(rElementName);
- }
- catch( uno::Exception& e)
- {
- ASSERT_EXCEPTION( e );
- }
- return aResult;
-}
-
-::rtl::OUString Chart2ModelContact::GetNameOfListElement(
- const uno::Any& rElementValue, const ::rtl::OUString& rTableTypePropertyName )
-{
- try
- {
- tTableMap::iterator aIter( m_aTableMap.find(rTableTypePropertyName) );
- if( aIter == m_aTableMap.end() )
- {
- DBG_ERROR("no container found for the given type (gradient/hatch etc)");
- return ::rtl::OUString();
- }
-
- uno::Reference< container::XNameContainer > xTable( aIter->second, uno::UNO_QUERY );
- if( xTable.is() )
- {
- uno::Sequence< rtl::OUString > aNames( xTable->getElementNames() );
- for( sal_Int32 nN = aNames.getLength(); nN--; )
- {
- if( xTable->getByName( aNames[nN] ) == rElementValue )
- {
- return aNames[nN];
- }
- }
- }
- }
- catch( uno::Exception& e)
- {
- ASSERT_EXCEPTION( e );
- }
- return ::rtl::OUString();
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
awt::Size Chart2ModelContact::GetPageSize() const
{
return ChartModelHelper::getPageSize(m_xChartModel);
}
-awt::Size Chart2ModelContact::GetDiagramSize() const
-{
- awt::Size aSize;
- ExplicitValueProvider* pProvider( getExplicitValueProvider() );
- if( pProvider )
- {
- aSize = ToSize( pProvider->getRectangleOfObject( lcl_getCIDForDiagram( m_xChartModel ) ) );
- }
- return aSize;
-}
-
awt::Rectangle Chart2ModelContact::GetDiagramRectangleInclusive() const
{
awt::Rectangle aRect;
@@ -285,17 +210,6 @@ awt::Point Chart2ModelContact::GetDiagramPositionInclusive() const
return ToPoint( this->GetDiagramRectangleInclusive() );
}
-awt::Point Chart2ModelContact::GetDiagramPosition() const
-{
- awt::Point aPoint;
- ExplicitValueProvider* pProvider( getExplicitValueProvider() );
- if( pProvider )
- {
- aPoint = ToPoint( pProvider->getRectangleOfObject( lcl_getCIDForDiagram( m_xChartModel ) ) );
- }
- return aPoint;
-}
-
awt::Size Chart2ModelContact::GetLegendSize() const
{
awt::Size aSize;
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
index 82257d63b544..b8ce668dff28 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: Chart2ModelContact.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.44.2 $
*
* This file is part of OpenOffice.org.
*
@@ -87,38 +87,16 @@ public:
sal_Int32 getExplicitNumberFormatKeyForAxis(
const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis );
- /** returns an element with name rElementName found in the list corresponding to the type PropertyName
- (e.g. if rTableTypePropertyName == "FillGradientName" and rElementName == "Gradient 3", then this method will return the corresponding gradient )
- */
- ::com::sun::star::uno::Any GetListElementByName(
- const ::rtl::OUString & rElementName, const ::rtl::OUString & rTableTypePropertyName );
-
- /** search the list corresponding to rTableTypePropertyName for an element that has the same values as rElement.
- returns the found name.
- */
- ::rtl::OUString GetNameOfListElement(
- const ::com::sun::star::uno::Any& rElementValue, const ::rtl::OUString & rTableTypePropertyName );
-
-
/** Returns the size of the page in logic coordinates. This value is used
for setting an appropriate "ReferencePageSize" for FontHeights.
*/
::com::sun::star::awt::Size GetPageSize() const;
- /** Returns the size of the diagram object in logic coordinates. This value
- is used for setting an appropriate "ReferenceDiagramSize" for FontHeights.
- */
- ::com::sun::star::awt::Size GetDiagramSize() const;
-
/** Returns the size of the diagram object in logic coordinates inclusive
the space reserved for axis titles.
*/
::com::sun::star::awt::Size GetDiagramSizeInclusive() const;
- /** Returns the position of the object in logic coordinates.
- */
- ::com::sun::star::awt::Point GetDiagramPosition() const;
-
/** Returns the position of the diagram in logic coordinates inclusive
the space reserved for axis titles.
*/
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index 5b3a7a977ff1..fc62b3b77223 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: DataSeriesPointWrapper.cxx,v $
- * $Revision: 1.15 $
+ * $Revision: 1.15.44.3 $
*
* This file is part of OpenOffice.org.
*
@@ -49,6 +49,7 @@
#include "WrappedSymbolProperties.hxx"
#include "WrappedDataCaptionProperties.hxx"
#include "WrappedSeriesAreaOrLineProperty.hxx"
+#include "WrappedScaleTextProperties.hxx"
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
// header for define DBG_ASSERT
@@ -184,6 +185,7 @@ const uno::Sequence< Property > & lcl_GetPropertySequence( DataSeriesPointWrappe
::chart::LineProperties::AddPropertiesToVector( aProperties );
::chart::CharacterProperties::AddPropertiesToVector( aProperties );
::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
// and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() );
@@ -582,26 +584,27 @@ Reference< beans::XPropertySet > DataSeriesPointWrapper::getDataPointProperties(
// ================================================================================
//ReferenceSizePropertyProvider
-void DataSeriesPointWrapper::setCurrentSizeAsReference()
+void DataSeriesPointWrapper::updateReferenceSize()
{
- /*
Reference< beans::XPropertySet > xProp( this->getInnerPropertySet(), uno::UNO_QUERY );
if( xProp.is() )
- xProp->setPropertyValue( C2U("ReferenceDiagramSize"), uno::makeAny(
- m_spChart2ModelContact->GetDiagramSize() ));
- */
+ {
+ if( xProp->getPropertyValue( C2U("ReferencePageSize") ).hasValue() )
+ xProp->setPropertyValue( C2U("ReferencePageSize"), uno::makeAny(
+ m_spChart2ModelContact->GetPageSize() ));
+ }
}
Any DataSeriesPointWrapper::getReferenceSize()
{
Any aRet;
Reference< beans::XPropertySet > xProp( this->getInnerPropertySet(), uno::UNO_QUERY );
if( xProp.is() )
- aRet = xProp->getPropertyValue( C2U("ReferenceDiagramSize") );
+ aRet = xProp->getPropertyValue( C2U("ReferencePageSize") );
return aRet;
}
awt::Size DataSeriesPointWrapper::getCurrentSizeForReference()
{
- return m_spChart2ModelContact->GetDiagramSize();
+ return m_spChart2ModelContact->GetPageSize();
}
// ================================================================================
@@ -705,6 +708,7 @@ const std::vector< WrappedProperty* > DataSeriesPointWrapper::createWrappedPrope
WrappedSymbolProperties::addWrappedPropertiesForSeries( aWrappedProperties, m_spChart2ModelContact );
WrappedDataCaptionProperties::addWrappedPropertiesForSeries( aWrappedProperties, m_spChart2ModelContact );
+ WrappedScaleTextProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
//add unnamed fill properties (different inner names here)
// aWrappedProperties.push_back( new WrappedUnnamedProperty( C2U( "FillGradient" ), C2U( "GradientName" ) ) );
@@ -742,10 +746,6 @@ const std::vector< WrappedProperty* > DataSeriesPointWrapper::createWrappedPrope
aWrappedProperties.push_back( new WrappedProperty( C2U( "FillBitmapPositionOffsetX" ), C2U( "FillBitmapPositionOffsetX" ) ) );
aWrappedProperties.push_back( new WrappedProperty( C2U( "FillBitmapPositionOffsetY" ), C2U( "FillBitmapPositionOffsetY" ) ) );
- //aWrappedProperties.push_back( new WrappedNamedProperty( C2U( "FillBitmapName" ), C2U( "FillBitmap" ), m_spChart2ModelContact ) );
- //[optional, property] com::sun::star::awt::XBitmap FillBitmap;
- //[optional, property] string FillBitmapURL;
-
aWrappedProperties.push_back( new WrappedProperty( C2U( "SolidType" ), C2U( "Geometry3D" ) ) );
aWrappedProperties.push_back( new WrappedSegmentOffsetProperty() );
aWrappedProperties.push_back( new WrappedProperty( C2U( "D3DPercentDiagonal" ), C2U( "PercentDiagonal" ) ) );
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
index b43c34988d44..0e3b87605b77 100644
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: DataSeriesPointWrapper.hxx,v $
- * $Revision: 1.7 $
+ * $Revision: 1.7.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -92,7 +92,7 @@ public:
throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
//ReferenceSizePropertyProvider
- virtual void setCurrentSizeAsReference();
+ virtual void updateReferenceSize();
virtual ::com::sun::star::uno::Any getReferenceSize();
virtual ::com::sun::star::awt::Size getCurrentSizeForReference();
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index f7a2abebb8da..c8220254d94e 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: DiagramWrapper.cxx,v $
- * $Revision: 1.18 $
+ * $Revision: 1.17.32.3 $
*
* This file is part of OpenOffice.org.
*
@@ -61,6 +61,7 @@
#include "ModifyListenerHelper.hxx"
#include "DisposeHelper.hxx"
#include <comphelper/InlineContainer.hxx>
+#include "WrappedAutomaticPositionProperties.hxx"
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/chart2/XTitled.hpp>
@@ -73,8 +74,6 @@
#include "FillProperties.hxx"
#include "UserDefinedProperties.hxx"
#include "SceneProperties.hxx"
-// #include "WrappedNamedProperty.hxx"
-// #include "WrappedSceneProperty.hxx"
#include <map>
#include <algorithm>
@@ -150,7 +149,9 @@ enum
PROP_DIAGRAM_HAS_SECOND_Y_AXIS_DESCR,
PROP_DIAGRAM_HAS_SECOND_X_AXIS_TITLE,
- PROP_DIAGRAM_HAS_SECOND_Y_AXIS_TITLE
+ PROP_DIAGRAM_HAS_SECOND_Y_AXIS_TITLE,
+
+ PROP_DIAGRAM_AUTOMATIC_SIZE
};
void lcl_AddPropertiesToVector(
@@ -418,6 +419,13 @@ void lcl_AddPropertiesToVector(
::getCppuType( reinterpret_cast< const sal_Int32 * >(0)),
beans::PropertyAttribute::BOUND
| beans::PropertyAttribute::MAYBEVOID ));
+
+ rOutProperties.push_back(
+ Property( C2U( "AutomaticSize" ),
+ PROP_DIAGRAM_AUTOMATIC_SIZE,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
}
const uno::Sequence< Property > & lcl_GetPropertySequence()
@@ -440,6 +448,7 @@ const uno::Sequence< Property > & lcl_GetPropertySequence()
WrappedDataCaptionProperties::addProperties( aProperties );
WrappedSplineProperties::addProperties( aProperties );
WrappedStockProperties::addProperties( aProperties );
+ WrappedAutomaticPositionProperties::addProperties( aProperties );
// and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
@@ -1886,6 +1895,81 @@ Any WrappedSolidTypeProperty::getPropertyDefault( const Reference< beans::XPrope
//-----------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------
+class WrappedAutomaticSizeProperty : public WrappedProperty
+{
+public:
+ WrappedAutomaticSizeProperty();
+ virtual ~WrappedAutomaticSizeProperty();
+
+ virtual void setPropertyValue( const ::com::sun::star::uno::Any& rOuterValue, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
+ throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any getPropertyValue( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xInnerPropertySet ) const
+ throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ virtual ::com::sun::star::uno::Any getPropertyDefault( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyState >& xInnerPropertyState ) const
+ throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+};
+
+WrappedAutomaticSizeProperty::WrappedAutomaticSizeProperty()
+ : WrappedProperty( C2U( "AutomaticSize" ), OUString() )
+{
+}
+
+WrappedAutomaticSizeProperty::~WrappedAutomaticSizeProperty()
+{
+}
+
+void WrappedAutomaticSizeProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( xInnerPropertySet.is() )
+ {
+ bool bNewValue = true;
+ if( ! (rOuterValue >>= bNewValue) )
+ throw lang::IllegalArgumentException( C2U("Property AutomaticSize requires value of type boolean"), 0, 0 );
+
+ try
+ {
+ if( bNewValue )
+ {
+ Any aRelativeSize( xInnerPropertySet->getPropertyValue( C2U( "RelativeSize" ) ) );
+ if( aRelativeSize.hasValue() )
+ xInnerPropertySet->setPropertyValue( C2U( "RelativeSize" ), Any() );
+ }
+ }
+ catch( uno::Exception & ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+ }
+}
+
+Any WrappedAutomaticSizeProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) );
+ if( xInnerPropertySet.is() )
+ {
+ Any aRelativeSize( xInnerPropertySet->getPropertyValue( C2U( "RelativeSize" ) ) );
+ if( !aRelativeSize.hasValue() )
+ aRet <<= true;
+ }
+ return aRet;
+}
+
+Any WrappedAutomaticSizeProperty::getPropertyDefault( const Reference< beans::XPropertyState >& /*xInnerPropertyState*/ ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ Any aRet;
+ aRet <<= false;
+ return aRet;
+}
+
+//-----------------------------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------------------------
+
// ____ XDiagramProvider ____
Reference< chart2::XDiagram > SAL_CALL DiagramWrapper::getDiagram()
throw (uno::RuntimeException)
@@ -1917,7 +2001,6 @@ const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties()
{
::std::vector< ::chart::WrappedProperty* > aWrappedProperties;
- //WrappedNamedProperty::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
WrappedAxisAndGridExistenceProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
WrappedAxisTitleExistenceProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
WrappedAxisLabelExistenceProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
@@ -1929,6 +2012,7 @@ const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties()
WrappedDataCaptionProperties::addWrappedPropertiesForDiagram( aWrappedProperties, m_spChart2ModelContact );
WrappedSplineProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
WrappedStockProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
+ WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties );
aWrappedProperties.push_back( new WrappedDataRowSourceProperty( m_spChart2ModelContact ) );
aWrappedProperties.push_back( new WrappedStackingProperty( StackMode_Y_STACKED,m_spChart2ModelContact ) );
@@ -1940,6 +2024,7 @@ const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties()
aWrappedProperties.push_back( new WrappedAttributedDataPointsProperty( m_spChart2ModelContact ) );
aWrappedProperties.push_back( new WrappedProperty( C2U( "StackedBarsConnected" ), C2U( "ConnectBars" ) ) );
aWrappedProperties.push_back( new WrappedSolidTypeProperty( m_spChart2ModelContact ) );
+ aWrappedProperties.push_back( new WrappedAutomaticSizeProperty() );
return aWrappedProperties;
}
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index 30ea7d1ecfa4..11cf4cbb3102 100644
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: GridWrapper.cxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -42,9 +42,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include "LineProperties.hxx"
-// #include "NamedLineProperties.hxx"
#include "UserDefinedProperties.hxx"
-// #include "WrappedNamedProperty.hxx"
#include "WrappedDefaultProperty.hxx"
#include <algorithm>
@@ -192,7 +190,6 @@ const std::vector< WrappedProperty* > GridWrapper::createWrappedProperties()
{
::std::vector< ::chart::WrappedProperty* > aWrappedProperties;
-// WrappedNamedProperty::addWrappedLineProperties( aWrappedProperties, m_spChart2ModelContact );
aWrappedProperties.push_back( new WrappedDefaultProperty( C2U("LineColor"), C2U("LineColor"), uno::makeAny( sal_Int32( 0x000000) ) ) ); // black
return aWrappedProperties;
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index 93a8b3533eab..e6b63308b01d 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: LegendWrapper.cxx,v $
- * $Revision: 1.9 $
+ * $Revision: 1.9.16.4 $
*
* This file is part of OpenOffice.org.
*
@@ -48,11 +48,11 @@
#include "LineProperties.hxx"
#include "FillProperties.hxx"
#include "UserDefinedProperties.hxx"
-// #include "NamedProperties.hxx"
-// #include "WrappedNamedProperty.hxx"
#include "WrappedCharacterHeightProperty.hxx"
#include "PositionAndSizeHelper.hxx"
#include "WrappedDirectStateProperty.hxx"
+#include "WrappedAutomaticPositionProperties.hxx"
+#include "WrappedScaleTextProperties.hxx"
#include <algorithm>
#include <rtl/ustrbuf.hxx>
@@ -265,6 +265,8 @@ const Sequence< Property > & lcl_GetPropertySequence()
::chart::FillProperties::AddPropertiesToVector( aProperties );
// ::chart::NamedProperties::AddPropertiesToVector( aProperties );
::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ ::chart::wrapper::WrappedAutomaticPositionProperties::addProperties( aProperties );
+ ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
// and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
@@ -380,12 +382,15 @@ void SAL_CALL LegendWrapper::removeEventListener(
// ================================================================================
//ReferenceSizePropertyProvider
-void LegendWrapper::setCurrentSizeAsReference()
+void LegendWrapper::updateReferenceSize()
{
Reference< beans::XPropertySet > xProp( this->getInnerPropertySet(), uno::UNO_QUERY );
if( xProp.is() )
- xProp->setPropertyValue( C2U("ReferencePageSize"), uno::makeAny(
- m_spChart2ModelContact->GetPageSize() ));
+ {
+ if( xProp->getPropertyValue( C2U("ReferencePageSize") ).hasValue() )
+ xProp->setPropertyValue( C2U("ReferencePageSize"), uno::makeAny(
+ m_spChart2ModelContact->GetPageSize() ));
+ }
}
Any LegendWrapper::getReferenceSize()
{
@@ -424,11 +429,12 @@ const std::vector< WrappedProperty* > LegendWrapper::createWrappedProperties()
::std::vector< ::chart::WrappedProperty* > aWrappedProperties;
aWrappedProperties.push_back( new WrappedLegendAlignmentProperty() );
-// WrappedNamedProperty::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this );
//same problem as for wall: thje defaults ion the old chart are different for different charttypes, so we need to export explicitly
aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U("FillStyle"), C2U("FillStyle") ) );
aWrappedProperties.push_back( new WrappedDirectStateProperty( C2U("FillColor"), C2U("FillColor") ));
+ WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties );
+ WrappedScaleTextProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
return aWrappedProperties;
}
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
index 6d92c70de4a7..85483ec6c59c 100644
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: LegendWrapper.hxx,v $
- * $Revision: 1.5 $
+ * $Revision: 1.5.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -69,7 +69,7 @@ public:
APPHELPER_XSERVICEINFO_DECL()
//ReferenceSizePropertyProvider
- virtual void setCurrentSizeAsReference();
+ virtual void updateReferenceSize();
virtual ::com::sun::star::uno::Any getReferenceSize();
virtual ::com::sun::star::awt::Size getCurrentSizeForReference();
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index cb5661e75d1a..f545e54f872b 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: MinMaxLineWrapper.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -98,7 +98,6 @@ MinMaxLineWrapper::MinMaxLineWrapper( ::boost::shared_ptr< Chart2ModelContact >
: m_spChart2ModelContact( spChart2ModelContact )
, m_aEventListenerContainer( m_aMutex )
, m_pPropertyArrayHelper()
- //, m_aWrappedLineDashNameProperty( spChart2ModelContact )
, m_aWrappedLineJointProperty( C2U("LineJoint"), uno::makeAny( drawing::LineJoint_NONE ))
{
}
@@ -192,8 +191,6 @@ void SAL_CALL MinMaxLineWrapper::setPropertyValue( const ::rtl::OUString& rPrope
xPropSet->setPropertyValue( C2U("Transparency"), rValue );
else if( rPropertyName.equals( m_aWrappedLineJointProperty.getOuterName() ) )
m_aWrappedLineJointProperty.setPropertyValue( rValue, xPropSet );
- //else if( rPropertyName.equals( m_aWrappedLineDashNameProperty.getOuterName() ) )
- // m_aWrappedLineDashNameProperty.setPropertyValue( rValue, xPropSet );
else
xPropSet->setPropertyValue( rPropertyName, rValue );
return;
@@ -238,8 +235,6 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyValue( const ::rtl::OUString& rP
aRet = xPropSet->getPropertyValue( C2U("Transparency") );
else if( rPropertyName.equals( m_aWrappedLineJointProperty.getOuterName() ) )
aRet = m_aWrappedLineJointProperty.getPropertyValue( xPropSet );
- //else if( rPropertyName.equals( m_aWrappedLineDashNameProperty.getOuterName() ) )
- // aRet = m_aWrappedLineDashNameProperty.getPropertyValue( xPropSet );
else
aRet = xPropSet->getPropertyValue( rPropertyName );
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
index 04379894a69f..411c97e71a5e 100644
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: MinMaxLineWrapper.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -33,7 +33,6 @@
#include "ServiceMacros.hxx"
#include "MutexContainer.hxx"
#include "WrappedIgnoreProperty.hxx"
-//#include "WrappedNamedProperty.hxx"
#include <cppuhelper/interfacecontainer.hxx>
@@ -133,7 +132,6 @@ private: //member
::boost::shared_ptr< ::cppu::OPropertyArrayHelper > m_pPropertyArrayHelper;
-// WrappedLineDashNameProperty m_aWrappedLineDashNameProperty;
WrappedIgnoreProperty m_aWrappedLineJointProperty;
};
diff --git a/chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx b/chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx
index 5e5616a3b3ca..c9199bcadaff 100644
--- a/chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx
+++ b/chart2/source/controller/chartapiwrapper/ReferenceSizePropertyProvider.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: ReferenceSizePropertyProvider.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -39,7 +39,7 @@ namespace wrapper
class ReferenceSizePropertyProvider
{
public:
- virtual void setCurrentSizeAsReference() = 0;
+ virtual void updateReferenceSize() = 0;
virtual ::com::sun::star::uno::Any getReferenceSize() = 0;
virtual ::com::sun::star::awt::Size getCurrentSizeForReference() = 0;
};
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index d715ddc661e3..e0e9511cf71d 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: TitleWrapper.cxx,v $
- * $Revision: 1.8 $
+ * $Revision: 1.8.44.4 $
*
* This file is part of OpenOffice.org.
*
@@ -41,10 +41,10 @@
#include "LineProperties.hxx"
#include "FillProperties.hxx"
#include "UserDefinedProperties.hxx"
-// #include "NamedProperties.hxx"
-// #include "WrappedNamedProperty.hxx"
#include "WrappedCharacterHeightProperty.hxx"
#include "WrappedTextRotationProperty.hxx"
+#include "WrappedAutomaticPositionProperties.hxx"
+#include "WrappedScaleTextProperties.hxx"
#include <algorithm>
#include <rtl/ustrbuf.hxx>
@@ -199,6 +199,8 @@ const Sequence< Property > & lcl_GetPropertySequence()
::chart::FillProperties::AddPropertiesToVector( aProperties );
// ::chart::NamedProperties::AddPropertiesToVector( aProperties );
::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ ::chart::wrapper::WrappedAutomaticPositionProperties::addProperties( aProperties );
+ ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
// and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
@@ -455,12 +457,15 @@ Any SAL_CALL TitleWrapper::getPropertyDefault( const OUString& rPropertyName )
// ================================================================================
//ReferenceSizePropertyProvider
-void TitleWrapper::setCurrentSizeAsReference()
+void TitleWrapper::updateReferenceSize()
{
Reference< beans::XPropertySet > xProp( this->getTitleObject(), uno::UNO_QUERY );
if( xProp.is() )
- xProp->setPropertyValue( C2U("ReferencePageSize"), uno::makeAny(
+ {
+ if( xProp->getPropertyValue( C2U("ReferencePageSize") ).hasValue() )
+ xProp->setPropertyValue( C2U("ReferencePageSize"), uno::makeAny(
m_spChart2ModelContact->GetPageSize() ));
+ }
}
Any TitleWrapper::getReferenceSize()
{
@@ -502,8 +507,9 @@ const std::vector< WrappedProperty* > TitleWrapper::createWrappedProperties()
aWrappedProperties.push_back( new WrappedTitleStringProperty( m_spChart2ModelContact->m_xContext ) );
aWrappedProperties.push_back( new WrappedTextRotationProperty() );
aWrappedProperties.push_back( new WrappedStackedTextProperty() );
-// WrappedNamedProperty::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
WrappedCharacterHeightProperty::addWrappedProperties( aWrappedProperties, this );
+ WrappedAutomaticPositionProperties::addWrappedProperties( aWrappedProperties );
+ WrappedScaleTextProperties::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
return aWrappedProperties;
}
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
index 8c0d87bd440b..3e0db1ed1e42 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: TitleWrapper.hxx,v $
- * $Revision: 1.6 $
+ * $Revision: 1.6.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -68,7 +68,7 @@ public:
APPHELPER_XSERVICEINFO_DECL()
//ReferenceSizePropertyProvider
- virtual void setCurrentSizeAsReference();
+ virtual void updateReferenceSize();
virtual ::com::sun::star::uno::Any getReferenceSize();
virtual ::com::sun::star::awt::Size getCurrentSizeForReference();
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 48186e173df1..e2a74834d249 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: UpDownBarWrapper.cxx,v $
- * $Revision: 1.4 $
+ * $Revision: 1.4.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -103,11 +103,6 @@ UpDownBarWrapper::UpDownBarWrapper(
, m_aPropertySetName( bUp ? C2U("WhiteDay") : C2U("BlackDay") )
, m_xInfo(0)
, m_pPropertyArrayHelper()
-// , m_aWrappedFillGradientNameProperty( m_spChart2ModelContact )
-// , m_aWrappedFillHatchNameProperty( m_spChart2ModelContact )
-// , m_aWrappedFillBitmapNameProperty( m_spChart2ModelContact )
-// , m_aWrappedFillTransparenceGradientNameProperty( m_spChart2ModelContact )
-// , m_aWrappedLineDashNameProperty( m_spChart2ModelContact )
{
}
@@ -192,20 +187,7 @@ void SAL_CALL UpDownBarWrapper::setPropertyValue( const ::rtl::OUString& rProper
}
}
if(xPropSet.is())
- {
-// if( rPropertyName.equals( m_aWrappedFillGradientNameProperty.getOuterName() ) )
-// m_aWrappedFillGradientNameProperty.setPropertyValue( rValue, xPropSet );
-// else if( rPropertyName.equals( m_aWrappedFillHatchNameProperty.getOuterName() ) )
-// m_aWrappedFillHatchNameProperty.setPropertyValue( rValue, xPropSet );
-// else if( rPropertyName.equals( m_aWrappedFillBitmapNameProperty.getOuterName() ) )
-// m_aWrappedFillBitmapNameProperty.setPropertyValue( rValue, xPropSet );
-// else if( rPropertyName.equals( m_aWrappedFillTransparenceGradientNameProperty.getOuterName() ) )
-// m_aWrappedFillTransparenceGradientNameProperty.setPropertyValue( rValue, xPropSet );
-// else if( rPropertyName.equals( m_aWrappedLineDashNameProperty.getOuterName() ) )
-// m_aWrappedLineDashNameProperty.setPropertyValue( rValue, xPropSet );
-// else
xPropSet->setPropertyValue( rPropertyName, rValue );
- }
}
uno::Any SAL_CALL UpDownBarWrapper::getPropertyValue( const ::rtl::OUString& rPropertyName )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
@@ -229,20 +211,7 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyValue( const ::rtl::OUString& rPr
}
}
if(xPropSet.is())
- {
-// if( rPropertyName.equals( m_aWrappedFillGradientNameProperty.getOuterName() ) )
-// aRet = m_aWrappedFillGradientNameProperty.getPropertyValue( xPropSet );
-// else if( rPropertyName.equals( m_aWrappedFillHatchNameProperty.getOuterName() ) )
-// aRet = m_aWrappedFillHatchNameProperty.getPropertyValue( xPropSet );
-// else if( rPropertyName.equals( m_aWrappedFillBitmapNameProperty.getOuterName() ) )
-// aRet = m_aWrappedFillBitmapNameProperty.getPropertyValue( xPropSet );
-// else if( rPropertyName.equals( m_aWrappedFillTransparenceGradientNameProperty.getOuterName() ) )
-// aRet = m_aWrappedFillTransparenceGradientNameProperty.getPropertyValue( xPropSet );
-// else if( rPropertyName.equals( m_aWrappedLineDashNameProperty.getOuterName() ) )
-// aRet = m_aWrappedLineDashNameProperty.getPropertyValue( xPropSet );
-// else
aRet = xPropSet->getPropertyValue( rPropertyName );
- }
return aRet;
}
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
index 0fac6a278e05..ce83ece0a4bf 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: UpDownBarWrapper.hxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -32,7 +32,6 @@
#include "ServiceMacros.hxx"
#include "MutexContainer.hxx"
-// #include "WrappedNamedProperty.hxx"
#include <cppuhelper/interfacecontainer.hxx>
@@ -132,11 +131,6 @@ private: //member
m_xInfo;//outer PropertySetInfo
::boost::shared_ptr< ::cppu::OPropertyArrayHelper > m_pPropertyArrayHelper;
-// WrappedFillGradientNameProperty m_aWrappedFillGradientNameProperty;
-// WrappedFillHatchNameProperty m_aWrappedFillHatchNameProperty;
-// WrappedFillBitmapNameProperty m_aWrappedFillBitmapNameProperty;
-// WrappedFillTransparenceGradientNameProperty m_aWrappedFillTransparenceGradientNameProperty;
-// WrappedLineDashNameProperty m_aWrappedLineDashNameProperty;
};
} // namespace wrapper
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index 740ad4a0959b..7e9aa4c6aeb9 100644
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: WallFloorWrapper.cxx,v $
- * $Revision: 1.3 $
+ * $Revision: 1.3.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -39,11 +39,9 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
-// #include "NamedProperties.hxx"
#include "FillProperties.hxx"
#include "LineProperties.hxx"
#include "UserDefinedProperties.hxx"
-// #include "WrappedNamedProperty.hxx"
#include "WrappedDirectStateProperty.hxx"
#include <algorithm>
@@ -168,8 +166,6 @@ const std::vector< WrappedProperty* > WallFloorWrapper::createWrappedProperties(
{
::std::vector< ::chart::WrappedProperty* > aWrappedProperties;
-// WrappedNamedProperty::addWrappedProperties( aWrappedProperties, m_spChart2ModelContact );
-
// use direct state always, so that in XML the value is always
// exported. Because in the old chart the defaults is as follows:
// Floor: SOLID (new and old model default), Wall: NONE, except for some chart types (line, scatter)
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
new file mode 100644
index 000000000000..dfba4f0cf5ab
--- /dev/null
+++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
@@ -0,0 +1,159 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: WrappedAutomaticPositionProperties.cxx,v $
+ * $Revision: 1.1.2.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_chart2.hxx"
+
+#include "WrappedAutomaticPositionProperties.hxx"
+#include "FastPropertyIdRanges.hxx"
+#include "macros.hxx"
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/chart2/RelativePosition.hpp>
+
+using namespace ::com::sun::star;
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::beans::Property;
+using ::rtl::OUString;
+
+//.............................................................................
+namespace chart
+{
+namespace wrapper
+{
+
+class WrappedAutomaticPositionProperty : public WrappedProperty
+{
+public:
+ WrappedAutomaticPositionProperty();
+ virtual ~WrappedAutomaticPositionProperty();
+
+ virtual void setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual Any getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual Any getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
+};
+
+WrappedAutomaticPositionProperty::WrappedAutomaticPositionProperty()
+ : ::chart::WrappedProperty( C2U( "AutomaticPosition" ), rtl::OUString() )
+{
+}
+WrappedAutomaticPositionProperty::~WrappedAutomaticPositionProperty()
+{
+}
+
+void WrappedAutomaticPositionProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ if( xInnerPropertySet.is() )
+ {
+ bool bNewValue = true;
+ if( ! (rOuterValue >>= bNewValue) )
+ throw lang::IllegalArgumentException( C2U("Property AutomaticPosition requires value of type boolean"), 0, 0 );
+
+ try
+ {
+ if( bNewValue )
+ {
+ Any aRelativePosition( xInnerPropertySet->getPropertyValue( C2U( "RelativePosition" ) ) );
+ if( aRelativePosition.hasValue() )
+ xInnerPropertySet->setPropertyValue( C2U( "RelativePosition" ), Any() );
+ }
+ }
+ catch( uno::Exception & ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+ }
+}
+
+Any WrappedAutomaticPositionProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) );
+ if( xInnerPropertySet.is() )
+ {
+ Any aRelativePosition( xInnerPropertySet->getPropertyValue( C2U( "RelativePosition" ) ) );
+ if( !aRelativePosition.hasValue() )
+ aRet <<= true;
+ }
+ return aRet;
+}
+
+Any WrappedAutomaticPositionProperty::getPropertyDefault( const Reference< beans::XPropertyState >& /*xInnerPropertyState*/ ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ Any aRet;
+ aRet <<= false;
+ return aRet;
+}
+
+namespace
+{
+enum
+{
+ PROP_CHART_AUTOMATIC_POSITION = FAST_PROPERTY_ID_START_CHART_AUTOPOSITION_PROP
+};
+
+void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList )
+{
+ rList.push_back( new WrappedAutomaticPositionProperty() );
+}
+
+}//anonymous namespace
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//static
+void WrappedAutomaticPositionProperties::addProperties( ::std::vector< Property > & rOutProperties )
+{
+ rOutProperties.push_back(
+ Property( C2U( "AutomaticPosition" ),
+ PROP_CHART_AUTOMATIC_POSITION,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
+//static
+void WrappedAutomaticPositionProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList )
+{
+ lcl_addWrappedProperties( rList );
+}
+
+} //namespace wrapper
+} //namespace chart
+//.............................................................................
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx
new file mode 100644
index 000000000000..edb9127fcd31
--- /dev/null
+++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.hxx
@@ -0,0 +1,52 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: WrappedAutomaticPositionProperties.hxx,v $
+ * $Revision: 1.1.2.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CHART_WRAPPED_AUTOMATICPOSITION_PROPERTIES_HXX
+#define CHART_WRAPPED_AUTOMATICPOSITION_PROPERTIES_HXX
+
+#include "WrappedProperty.hxx"
+#include <vector>
+
+//.............................................................................
+namespace chart
+{
+namespace wrapper
+{
+
+class WrappedAutomaticPositionProperties
+{
+public:
+ static void addProperties( ::std::vector< ::com::sun::star::beans::Property >& rOutProperties );
+ static void addWrappedProperties( std::vector< WrappedProperty* >& rList );
+};
+
+} //namespace wrapper
+} //namespace chart
+#endif
diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
index eeca8936727b..94f1c58fe27a 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: WrappedCharacterHeightProperty.cxx,v $
- * $Revision: 1.5 $
+ * $Revision: 1.5.44.1 $
*
* This file is part of OpenOffice.org.
*
@@ -80,7 +80,7 @@ void WrappedCharacterHeightProperty_Base::setPropertyValue( const Any& rOuterVal
if(xInnerPropertySet.is())
{
if( m_pRefSizePropProvider )
- m_pRefSizePropProvider->setCurrentSizeAsReference();
+ m_pRefSizePropProvider->updateReferenceSize();
xInnerPropertySet->setPropertyValue( m_aInnerName, rOuterValue );
}
}
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNamedProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedNamedProperty.cxx
index e84cfbfd27d4..e69de29bb2d1 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNamedProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNamedProperty.cxx
@@ -1,154 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: WrappedNamedProperty.cxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-// MARKER(update_precomp.py): autogen include statement, do not remove
-#include "precompiled_chart2.hxx"
-
-#include "WrappedNamedProperty.hxx"
-#include "macros.hxx"
-
-using ::com::sun::star::uno::Any;
-using ::rtl::OUString;
-
-
-//.............................................................................
-namespace chart
-{
-namespace wrapper
-{
-
-WrappedNamedProperty::WrappedNamedProperty(
- const OUString& rOuterName
- , const OUString& rInnerName
- , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
- : WrappedProperty( rOuterName, rInnerName )
- , m_spChart2ModelContact( spChart2ModelContact )
-{
-}
-WrappedNamedProperty::~WrappedNamedProperty()
-{
-}
-
-//static
-void WrappedNamedProperty::addWrappedProperties( std::vector< WrappedProperty* >& rList, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
-{
- addWrappedFillProperties( rList, spChart2ModelContact );
- addWrappedLineProperties( rList, spChart2ModelContact );
-}
-
-//static
-void WrappedNamedProperty::addWrappedFillProperties( std::vector< WrappedProperty* >& rList, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
-{
- rList.push_back( new WrappedFillGradientNameProperty( spChart2ModelContact ) );
- rList.push_back( new WrappedFillHatchNameProperty( spChart2ModelContact ) );
- rList.push_back( new WrappedFillBitmapNameProperty( spChart2ModelContact ) );
- rList.push_back( new WrappedFillTransparenceGradientNameProperty( spChart2ModelContact ) );
-}
-
-//static
-void WrappedNamedProperty::addWrappedLineProperties( std::vector< WrappedProperty* >& rList, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
-{
- rList.push_back( new WrappedLineDashNameProperty( spChart2ModelContact ) );
-}
-
-::com::sun::star::uno::Any WrappedNamedProperty::convertInnerToOuterValue( const Any& rInnerValue ) const
-{
- Any aRet;
- ::rtl::OUString aName = m_spChart2ModelContact->GetNameOfListElement( rInnerValue, m_aOuterName );
- aRet <<= aName;
- return aRet;
-
-}
-Any WrappedNamedProperty::convertOuterToInnerValue( const Any& rOuterValue ) const
-{
- Any aRet;
- OUString aName;
- if( rOuterValue >>= aName )
- {
- aRet = m_spChart2ModelContact->GetListElementByName( aName, m_aOuterName );
- }
- return aRet;
-}
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-WrappedFillGradientNameProperty::WrappedFillGradientNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
- : WrappedNamedProperty( C2U( "FillGradientName" ), C2U( "FillGradient" ), spChart2ModelContact )
-{
-}
-WrappedFillGradientNameProperty::~WrappedFillGradientNameProperty()
-{
-}
-
-//-----------------------------------------------------------------------------
-
-WrappedFillHatchNameProperty::WrappedFillHatchNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
- : WrappedNamedProperty( C2U( "FillHatchName" ), C2U( "FillHatch" ), spChart2ModelContact )
-{
-}
-WrappedFillHatchNameProperty::~WrappedFillHatchNameProperty()
-{
-}
-
-//-----------------------------------------------------------------------------
-
-WrappedFillBitmapNameProperty::WrappedFillBitmapNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
- : WrappedNamedProperty( C2U( "FillBitmapName" ), C2U( "FillBitmap" ), spChart2ModelContact )
-{
-}
-WrappedFillBitmapNameProperty::~WrappedFillBitmapNameProperty()
-{
-}
-
-//-----------------------------------------------------------------------------
-
-WrappedFillTransparenceGradientNameProperty::WrappedFillTransparenceGradientNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
- : WrappedNamedProperty( C2U( "FillTransparenceGradientName" ), C2U( "FillTransparenceGradient" ), spChart2ModelContact )
-{
-}
-WrappedFillTransparenceGradientNameProperty::~WrappedFillTransparenceGradientNameProperty()
-{
-}
-
-//-----------------------------------------------------------------------------
-
-WrappedLineDashNameProperty::WrappedLineDashNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
- : WrappedNamedProperty( C2U( "LineDashName" ), C2U( "LineDash" ), spChart2ModelContact )
-{
-}
-WrappedLineDashNameProperty::~WrappedLineDashNameProperty()
-{
-}
-
-} //namespace wrapper
-} //namespace chart
-//.............................................................................
diff --git a/chart2/source/controller/chartapiwrapper/WrappedNamedProperty.hxx b/chart2/source/controller/chartapiwrapper/WrappedNamedProperty.hxx
index 9ee92c269956..e69de29bb2d1 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedNamedProperty.hxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedNamedProperty.hxx
@@ -1,115 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2008 by Sun Microsystems, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * $RCSfile: WrappedNamedProperty.hxx,v $
- * $Revision: 1.3 $
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#ifndef CHART_WRAPPEDNAMEDPROPERTY_HXX
-#define CHART_WRAPPEDNAMEDPROPERTY_HXX
-
-#include "WrappedProperty.hxx"
-#include "Chart2ModelContact.hxx"
-
-#include <boost/shared_ptr.hpp>
-#include <vector>
-
-//.............................................................................
-namespace chart
-{
-namespace wrapper
-{
-
-class WrappedNamedProperty : public WrappedProperty
-{
-public:
- WrappedNamedProperty( const ::rtl::OUString& rOuterName, const ::rtl::OUString& rInnerName, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
- virtual ~WrappedNamedProperty();
-
- static void addWrappedProperties( std::vector< WrappedProperty* >& rList, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
- static void addWrappedFillProperties( std::vector< WrappedProperty* >& rList, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
- static void addWrappedLineProperties( std::vector< WrappedProperty* >& rList, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
-
-protected:
- virtual ::com::sun::star::uno::Any convertInnerToOuterValue( const ::com::sun::star::uno::Any& rInnerValue ) const;
- virtual ::com::sun::star::uno::Any convertOuterToInnerValue( const ::com::sun::star::uno::Any& rOuterValue ) const;
-
-protected:
- ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
-};
-
-//-----------------------------------------------------------------------------
-
-class WrappedFillGradientNameProperty : public WrappedNamedProperty
-{
-public:
- WrappedFillGradientNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
- virtual ~WrappedFillGradientNameProperty();
-};
-
-//-----------------------------------------------------------------------------
-
-class WrappedFillHatchNameProperty : public WrappedNamedProperty
-{
-public:
- WrappedFillHatchNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
- virtual ~WrappedFillHatchNameProperty();
-};
-
-//-----------------------------------------------------------------------------
-
-class WrappedFillBitmapNameProperty : public WrappedNamedProperty
-{
-public:
- WrappedFillBitmapNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
- virtual ~WrappedFillBitmapNameProperty();
-};
-
-//-----------------------------------------------------------------------------
-
-class WrappedFillTransparenceGradientNameProperty : public WrappedNamedProperty
-{
-public:
- WrappedFillTransparenceGradientNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
- virtual ~WrappedFillTransparenceGradientNameProperty();
-};
-
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-
-class WrappedLineDashNameProperty : public WrappedNamedProperty
-{
-public:
- WrappedLineDashNameProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
- virtual ~WrappedLineDashNameProperty();
-};
-
-} //namespace wrapper
-} //namespace chart
-//.............................................................................
-
-// CHART_WRAPPEDNAMEDPROPERTY_HXX
-#endif
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
new file mode 100644
index 000000000000..5a22ae7f184f
--- /dev/null
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
@@ -0,0 +1,170 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: WrappedScaleTextProperties.cxx,v $
+ * $Revision: 1.1.2.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "precompiled_chart2.hxx"
+
+#include "WrappedScaleTextProperties.hxx"
+#include "FastPropertyIdRanges.hxx"
+#include "macros.hxx"
+
+#include <com/sun/star/beans/PropertyAttribute.hpp>
+
+using namespace ::com::sun::star;
+using ::com::sun::star::uno::Any;
+using ::com::sun::star::uno::Reference;
+using ::com::sun::star::uno::Sequence;
+using ::com::sun::star::beans::Property;
+using ::rtl::OUString;
+
+//.............................................................................
+namespace chart
+{
+namespace wrapper
+{
+
+class WrappedScaleTextProperty : public WrappedProperty
+{
+public:
+ WrappedScaleTextProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
+ virtual ~WrappedScaleTextProperty();
+
+ virtual void setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual Any getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
+ virtual Any getPropertyDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException);
+
+private:
+ ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
+};
+
+WrappedScaleTextProperty::WrappedScaleTextProperty( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
+ : ::chart::WrappedProperty( C2U( "ScaleText" ), rtl::OUString() )
+ , m_spChart2ModelContact( spChart2ModelContact )
+{
+}
+
+WrappedScaleTextProperty::~WrappedScaleTextProperty()
+{
+}
+
+void WrappedScaleTextProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ static const OUString aRefSizeName( RTL_CONSTASCII_USTRINGPARAM("ReferencePageSize") );
+
+ if( xInnerPropertySet.is() )
+ {
+ bool bNewValue = false;
+ if( ! (rOuterValue >>= bNewValue) )
+ {
+ if( rOuterValue.hasValue() )
+ throw lang::IllegalArgumentException( C2U("Property ScaleText requires value of type boolean"), 0, 0 );
+ }
+
+ try
+ {
+ if( bNewValue )
+ {
+ awt::Size aRefSize( m_spChart2ModelContact->GetPageSize() );
+ xInnerPropertySet->setPropertyValue( aRefSizeName, uno::makeAny( aRefSize ) );
+ }
+ else
+ xInnerPropertySet->setPropertyValue( aRefSizeName, Any() );
+ }
+ catch( uno::Exception & ex )
+ {
+ ASSERT_EXCEPTION( ex );
+ }
+ }
+}
+
+Any WrappedScaleTextProperty::getPropertyValue( const Reference< beans::XPropertySet >& xInnerPropertySet ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ static const OUString aRefSizeName( RTL_CONSTASCII_USTRINGPARAM("ReferencePageSize") );
+
+ Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) );
+ if( xInnerPropertySet.is() )
+ {
+ if( xInnerPropertySet->getPropertyValue( aRefSizeName ).hasValue() )
+ aRet <<= true;
+ else
+ aRet <<= false;
+ }
+
+ return aRet;
+}
+
+Any WrappedScaleTextProperty::getPropertyDefault( const Reference< beans::XPropertyState >& /*xInnerPropertyState*/ ) const
+ throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
+{
+ Any aRet;
+ aRet <<= false;
+ return aRet;
+}
+
+namespace
+{
+enum
+{
+ PROP_CHART_SCALE_TEXT = FAST_PROPERTY_ID_START_SCALE_TEXT_PROP
+};
+
+}//anonymous namespace
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+//static
+void WrappedScaleTextProperties::addProperties( ::std::vector< Property > & rOutProperties )
+{
+ rOutProperties.push_back(
+ Property( C2U( "ScaleText" ),
+ PROP_CHART_SCALE_TEXT,
+ ::getBooleanCppuType(),
+ beans::PropertyAttribute::MAYBEVOID
+ | beans::PropertyAttribute::MAYBEDEFAULT ));
+}
+
+//-----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
+
+//static
+void WrappedScaleTextProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
+ , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
+{
+ rList.push_back( new WrappedScaleTextProperty( spChart2ModelContact ) );
+}
+
+} //namespace wrapper
+} //namespace chart
+//.............................................................................
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx
new file mode 100644
index 000000000000..433a91254bcc
--- /dev/null
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.hxx
@@ -0,0 +1,57 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: WrappedScaleTextProperties.hxx,v $
+ * $Revision: 1.1.2.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef CHART_WRAPPED_SCALETEXT_PROPERTIES_HXX
+#define CHART_WRAPPED_SCALETEXT_PROPERTIES_HXX
+
+#include "WrappedProperty.hxx"
+#include "Chart2ModelContact.hxx"
+
+#include <boost/shared_ptr.hpp>
+#include <vector>
+
+//.............................................................................
+namespace chart
+{
+namespace wrapper
+{
+
+class WrappedScaleTextProperties
+{
+public:
+ static void addProperties( ::std::vector< ::com::sun::star::beans::Property >& rOutProperties );
+ static void addWrappedProperties( std::vector< WrappedProperty* >& rList
+ , ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact );
+};
+
+} //namespace wrapper
+} //namespace chart
+//.............................................................................
+#endif
diff --git a/chart2/source/controller/chartapiwrapper/makefile.mk b/chart2/source/controller/chartapiwrapper/makefile.mk
index 6a4f4ce0fd8e..e5b742e54346 100644
--- a/chart2/source/controller/chartapiwrapper/makefile.mk
+++ b/chart2/source/controller/chartapiwrapper/makefile.mk
@@ -8,7 +8,7 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.4 $
+# $Revision: 1.4.44.3 $
#
# This file is part of OpenOffice.org.
#
@@ -58,7 +58,7 @@ SLOFILES= \
$(SLO)$/MinMaxLineWrapper.obj \
$(SLO)$/UpDownBarWrapper.obj \
$(SLO)$/WallFloorWrapper.obj \
- $(SLO)$/WrappedNamedProperty.obj \
+ $(SLO)$/WrappedAutomaticPositionProperties.obj \
$(SLO)$/WrappedCharacterHeightProperty.obj \
$(SLO)$/WrappedDataCaptionProperties.obj \
$(SLO)$/WrappedTextRotationProperty.obj \
@@ -72,7 +72,8 @@ SLOFILES= \
$(SLO)$/WrappedStatisticProperties.obj \
$(SLO)$/WrappedSceneProperty.obj \
$(SLO)$/WrappedSeriesAreaOrLineProperty.obj \
- $(SLO)$/WrappedAddInProperty.obj
+ $(SLO)$/WrappedAddInProperty.obj \
+ $(SLO)$/WrappedScaleTextProperties.obj
# --- Targets -----------------------------------------------------------------