summaryrefslogtreecommitdiff
path: root/chart2/source/controller
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller')
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/AreaWrapper.cxx30
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/AxisWrapper.cxx29
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx26
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx74
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx27
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/GridWrapper.cxx30
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/LegendWrapper.cxx29
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx124
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx6
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/TitleWrapper.cxx28
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx126
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx5
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx28
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx2
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx3
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx1
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx3
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx1
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx2
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx1
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx4
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx3
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx2
-rwxr-xr-x[-rw-r--r--]chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx18
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx1
-rw-r--r--chart2/source/controller/dialogs/DialogModel.cxx19
-rw-r--r--chart2/source/controller/dialogs/DialogModel.hxx4
-rw-r--r--chart2/source/controller/dialogs/ObjectNameProvider.cxx10
-rw-r--r--chart2/source/controller/dialogs/dlg_DataSource.cxx1
-rw-r--r--chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx1
-rw-r--r--chart2/source/controller/dialogs/dlg_NumberFormat.cxx1
-rw-r--r--chart2/source/controller/dialogs/dlg_View3D.cxx1
-rw-r--r--chart2/source/controller/dialogs/tp_DataLabel.src4
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx1
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx1
-rw-r--r--chart2/source/controller/main/ChartController.cxx33
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx1
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx151
-rw-r--r--chart2/source/controller/main/ImplUndoManager.cxx2
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx2
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx7
-rw-r--r--chart2/source/controller/main/ShapeController.cxx21
-rw-r--r--chart2/source/controller/main/StatusBarCommandDispatch.cxx3
-rw-r--r--chart2/source/controller/main/UndoCommandDispatch.cxx9
-rw-r--r--chart2/source/controller/main/UndoManager.cxx2
-rw-r--r--chart2/source/controller/makefile.mk3
47 files changed, 444 insertions, 438 deletions
diff --git a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
index 2e1636b4406b..b4422c5442ec 100644..100755
--- a/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AreaWrapper.cxx
@@ -57,31 +57,35 @@ namespace
static const ::rtl::OUString lcl_aServiceName(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.Area" ));
-const Sequence< Property > & lcl_GetPropertySequence()
+struct StaticAreaWrapperPropertyArray_Initializer
{
- static Sequence< Property > aPropSeq;
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+private:
+ Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< ::com::sun::star::beans::Property > aProperties;
::chart::LineProperties::AddPropertiesToVector( aProperties );
::chart::FillProperties::AddPropertiesToVector( aProperties );
-// ::chart::NamedProperties::AddPropertiesToVector( aProperties );
+ //::chart::NamedProperties::AddPropertiesToVector( aProperties );
::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- // and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
+
+struct StaticAreaWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticAreaWrapperPropertyArray_Initializer >
+{
+};
+
- return aPropSeq;
-}
} // anonymous namespace
// --------------------------------------------------------------------------------
@@ -175,7 +179,7 @@ Reference< beans::XPropertySet > AreaWrapper::getInnerPropertySet()
const Sequence< beans::Property >& AreaWrapper::getPropertySequence()
{
- return lcl_GetPropertySequence();
+ return *StaticAreaWrapperPropertyArray::get();
}
const std::vector< WrappedProperty* > AreaWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
index 6d53fb8b01f6..ebb9459e7d54 100644..100755
--- a/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/AxisWrapper.cxx
@@ -323,33 +323,35 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::MAYBEDEFAULT ));
}
-const Sequence< Property > & lcl_GetPropertySequence()
+struct StaticAxisWrapperPropertyArray_Initializer
{
- static Sequence< Property > aPropSeq;
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+private:
+ Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< ::com::sun::star::beans::Property > aProperties;
lcl_AddPropertiesToVector( aProperties );
::chart::CharacterProperties::AddPropertiesToVector( aProperties );
::chart::LineProperties::AddPropertiesToVector( aProperties );
-// ::chart::NamedLineProperties::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(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
- return aPropSeq;
-}
+struct StaticAxisWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticAxisWrapperPropertyArray_Initializer >
+{
+};
} // anonymous namespace
@@ -428,7 +430,6 @@ uno::Reference< util::XNumberFormats > SAL_CALL AxisWrapper::getNumberFormats()
return uno::Reference< util::XNumberFormats >();
}
-// static
void AxisWrapper::getDimensionAndMainAxisBool( tAxisType eType, sal_Int32& rnDimensionIndex, sal_Bool& rbMainAxis )
{
switch( eType )
@@ -532,7 +533,7 @@ Reference< beans::XPropertySet > AxisWrapper::getInnerPropertySet()
const Sequence< beans::Property >& AxisWrapper::getPropertySequence()
{
- return lcl_GetPropertySequence();
+ return *StaticAxisWrapperPropertyArray::get();
}
const std::vector< WrappedProperty* > AxisWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index d6487d425657..e8d91cd6c124 100644..100755
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -249,28 +249,30 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::MAYBEDEFAULT ) );
}
-const uno::Sequence< Property > & lcl_GetPropertySequence()
+struct StaticChartDocumentWrapperPropertyArray_Initializer
{
- static uno::Sequence< Property > aPropSeq;
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+private:
+ uno::Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< ::com::sun::star::beans::Property > aProperties;
lcl_AddPropertiesToVector( aProperties );
- // and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
- return aPropSeq;
-}
+struct StaticChartDocumentWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticChartDocumentWrapperPropertyArray_Initializer >
+{
+};
} // anonymous namespace
@@ -1582,7 +1584,7 @@ Reference< beans::XPropertySet > ChartDocumentWrapper::getInnerPropertySet()
}
const Sequence< beans::Property >& ChartDocumentWrapper::getPropertySequence()
{
- return lcl_GetPropertySequence();
+ return *StaticChartDocumentWrapperPropertyArray::get();
}
const std::vector< WrappedProperty* > ChartDocumentWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
index d69212512ebe..b79cab0930c6 100644..100755
--- a/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DataSeriesPointWrapper.cxx
@@ -173,44 +173,55 @@ void lcl_AddPropertiesToVector_SeriesOnly(
| beans::PropertyAttribute::MAYBEDEFAULT ));
}
-const uno::Sequence< Property > & lcl_GetPropertySequence( DataSeriesPointWrapper::eType _eType )
+uno::Sequence< Property > lcl_GetPropertySequence( DataSeriesPointWrapper::eType _eType )
{
- static uno::Sequence< Property > aSeriesPropSeq;
- static uno::Sequence< Property > aPointPropSeq;
+ ::std::vector< ::com::sun::star::beans::Property > aProperties;
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- uno::Sequence< Property >& rPropSeq =
- (_eType == DataSeriesPointWrapper::DATA_SERIES) ? aSeriesPropSeq : aPointPropSeq;
- if( 0 == rPropSeq.getLength() )
+ lcl_AddPropertiesToVector_PointProperties( aProperties );
+ if( _eType == DataSeriesPointWrapper::DATA_SERIES )
{
- // get properties
- ::std::vector< ::com::sun::star::beans::Property > aProperties;
+ lcl_AddPropertiesToVector_SeriesOnly( aProperties );
+ WrappedStatisticProperties::addProperties( aProperties );
+ }
+ WrappedSymbolProperties::addProperties( aProperties ); //for series and points
+ WrappedDataCaptionProperties::addProperties( aProperties ); //for series and points
- lcl_AddPropertiesToVector_PointProperties( aProperties );
- if( _eType == DataSeriesPointWrapper::DATA_SERIES )
- {
- lcl_AddPropertiesToVector_SeriesOnly( aProperties );
- WrappedStatisticProperties::addProperties( aProperties );
- }
- WrappedSymbolProperties::addProperties( aProperties ); //for series and points
- WrappedDataCaptionProperties::addProperties( aProperties ); //for series and points
+ ::chart::FillProperties::AddPropertiesToVector( aProperties );
+ ::chart::LineProperties::AddPropertiesToVector( aProperties );
+ ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
+ ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
+ ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
- ::chart::FillProperties::AddPropertiesToVector( aProperties );
- ::chart::LineProperties::AddPropertiesToVector( aProperties );
- ::chart::CharacterProperties::AddPropertiesToVector( aProperties );
- ::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- ::chart::wrapper::WrappedScaleTextProperties::addProperties( aProperties );
+ ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() );
- // and sort them for access via bsearch
- ::std::sort( aProperties.begin(), aProperties.end(), ::chart::PropertyNameLess() );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
+}
- // transfer result to static Sequence
- rPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+struct StaticSeriesWrapperPropertyArray_Initializer
+{
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_SERIES ) );
+ return &aPropSeq;
}
+};
- return rPropSeq;
-}
+struct StaticSeriesWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticSeriesWrapperPropertyArray_Initializer >
+{
+};
+
+struct StaticPointWrapperPropertyArray_Initializer
+{
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence( DataSeriesPointWrapper::DATA_POINT ) );
+ return &aPropSeq;
+ }
+};
+
+struct StaticPointWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticPointWrapperPropertyArray_Initializer >
+{
+};
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
@@ -706,7 +717,10 @@ Reference< beans::XPropertySet > DataSeriesPointWrapper::getInnerPropertySet()
const Sequence< beans::Property >& DataSeriesPointWrapper::getPropertySequence()
{
- return lcl_GetPropertySequence( m_eType );
+ if( m_eType == DATA_SERIES )
+ return *StaticSeriesWrapperPropertyArray::get();
+ else
+ return *StaticPointWrapperPropertyArray::get();
}
const std::vector< WrappedProperty* > DataSeriesPointWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index c0be0ddcbf0d..c174614a0bf3 100644..100755
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -434,15 +434,17 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT ));
}
-const uno::Sequence< Property > & lcl_GetPropertySequence()
+struct StaticDiagramWrapperPropertyArray_Initializer
{
- static uno::Sequence< Property > aPropSeq;
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+private:
+ uno::Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< ::com::sun::star::beans::Property > aProperties;
lcl_AddPropertiesToVector( aProperties );
::chart::LineProperties::AddPropertiesToVector( aProperties );
@@ -456,16 +458,16 @@ const uno::Sequence< Property > & lcl_GetPropertySequence()
WrappedStockProperties::addProperties( aProperties );
WrappedAutomaticPositionProperties::addProperties( aProperties );
- // and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
- return aPropSeq;
-}
+struct StaticDiagramWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticDiagramWrapperPropertyArray_Initializer >
+{
+};
bool lcl_isXYChart( const Reference< chart2::XDiagram > xDiagram )
{
@@ -570,7 +572,6 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName )
}
typedef ::comphelper::MakeMap< ::rtl::OUString, ::rtl::OUString > tMakeStringStringMap;
-//static
const tMakeStringStringMap& lcl_getChartTypeNameMap()
{
static tMakeStringStringMap g_aChartTypeNameMap =
@@ -2085,7 +2086,7 @@ Reference< beans::XPropertySet > DiagramWrapper::getInnerPropertySet()
const Sequence< beans::Property >& DiagramWrapper::getPropertySequence()
{
- return lcl_GetPropertySequence();
+ return *StaticDiagramWrapperPropertyArray::get();
}
const std::vector< WrappedProperty* > DiagramWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
index ff36c4cebcc7..6586511424db 100644..100755
--- a/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/GridWrapper.cxx
@@ -59,30 +59,31 @@ namespace
static const OUString lcl_aServiceName(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.Grid" ));
-const Sequence< Property > & lcl_GetPropertySequence()
+struct StaticGridWrapperPropertyArray_Initializer
{
- static Sequence< Property > aPropSeq;
-
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
+private:
+ Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< ::com::sun::star::beans::Property > aProperties;
::chart::LineProperties::AddPropertiesToVector( aProperties );
-// ::chart::NamedLineProperties::AddPropertiesToVector( aProperties );
+ //::chart::NamedLineProperties::AddPropertiesToVector( aProperties );
::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- // and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
- return aPropSeq;
-}
+struct StaticGridWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticGridWrapperPropertyArray_Initializer >
+{
+};
} // anonymous namespace
@@ -104,7 +105,6 @@ GridWrapper::GridWrapper(
GridWrapper::~GridWrapper()
{}
-// static
void GridWrapper::getDimensionAndSubGridBool( tGridType eType, sal_Int32& rnDimensionIndex, bool& rbSubGrid )
{
rnDimensionIndex = 1;
@@ -179,7 +179,7 @@ Reference< beans::XPropertySet > GridWrapper::getInnerPropertySet()
const Sequence< beans::Property >& GridWrapper::getPropertySequence()
{
- return lcl_GetPropertySequence();
+ return *StaticGridWrapperPropertyArray::get();
}
const std::vector< WrappedProperty* > GridWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
index 02ffcb942c99..5b71c7d3e768 100644..100755
--- a/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/LegendWrapper.cxx
@@ -246,35 +246,38 @@ void lcl_AddPropertiesToVector(
beans::PropertyAttribute::MAYBEDEFAULT ));
}
-const Sequence< Property > & lcl_GetPropertySequence()
+struct StaticLegendWrapperPropertyArray_Initializer
{
- static Sequence< Property > aPropSeq;
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+private:
+ Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< ::com::sun::star::beans::Property > aProperties;
lcl_AddPropertiesToVector( aProperties );
::chart::CharacterProperties::AddPropertiesToVector( aProperties );
::chart::LineProperties::AddPropertiesToVector( aProperties );
::chart::FillProperties::AddPropertiesToVector( aProperties );
-// ::chart::NamedProperties::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(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
+
+struct StaticLegendWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticLegendWrapperPropertyArray_Initializer >
+{
+};
- return aPropSeq;
-}
} // anonymous namespace
// --------------------------------------------------------------------------------
@@ -418,7 +421,7 @@ Reference< beans::XPropertySet > LegendWrapper::getInnerPropertySet()
const Sequence< beans::Property >& LegendWrapper::getPropertySequence()
{
- return lcl_GetPropertySequence();
+ return *StaticLegendWrapperPropertyArray::get();
}
const std::vector< WrappedProperty* > LegendWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
index fdfc7c094aaf..2885a79afe6d 100644..100755
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.cxx
@@ -56,31 +56,79 @@ namespace
static const OUString lcl_aServiceName(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.ChartLine" ));
-const Sequence< Property > & lcl_GetPropertySequence()
+struct StaticMinMaxLineWrapperDefaults_Initializer
{
- static Sequence< Property > aPropSeq;
+ ::chart::tPropertyValueMap* operator()()
+ {
+ static ::chart::tPropertyValueMap aStaticDefaults;
+ lcl_AddDefaultsToMap( aStaticDefaults );
+ return &aStaticDefaults;
+ }
+private:
+ void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
+ {
+ ::chart::LineProperties::AddDefaultsToMap( rOutMap );
+ }
+};
+
+struct StaticMinMaxLineWrapperDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticMinMaxLineWrapperDefaults_Initializer >
+{
+};
+
+struct StaticMinMaxLineWrapperPropertyArray_Initializer
+{
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+private:
+ Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< ::com::sun::star::beans::Property > aProperties;
::chart::LineProperties::AddPropertiesToVector( aProperties );
-// ::chart::NamedLineProperties::AddPropertiesToVector( aProperties );
+ //::chart::NamedLineProperties::AddPropertiesToVector( aProperties );
::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- // and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
- return aPropSeq;
-}
+struct StaticMinMaxLineWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticMinMaxLineWrapperPropertyArray_Initializer >
+{
+};
+
+struct StaticMinMaxLineWrapperInfoHelper_Initializer
+{
+ ::cppu::OPropertyArrayHelper* operator()()
+ {
+ static ::cppu::OPropertyArrayHelper aPropHelper( *StaticMinMaxLineWrapperPropertyArray::get() );
+ return &aPropHelper;
+ }
+};
+
+struct StaticMinMaxLineWrapperInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticMinMaxLineWrapperInfoHelper_Initializer >
+{
+};
+
+struct StaticMinMaxLineWrapperInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticMinMaxLineWrapperInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticMinMaxLineWrapperInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticMinMaxLineWrapperInfo_Initializer >
+{
+};
} // anonymous namespace
@@ -94,7 +142,6 @@ namespace wrapper
MinMaxLineWrapper::MinMaxLineWrapper( ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
: m_spChart2ModelContact( spChart2ModelContact )
, m_aEventListenerContainer( m_aMutex )
- , m_pPropertyArrayHelper()
, m_aWrappedLineJointProperty( C2U("LineJoint"), uno::makeAny( drawing::LineJoint_NONE ))
{
}
@@ -109,11 +156,6 @@ void SAL_CALL MinMaxLineWrapper::dispose()
{
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
-
- // /--
- MutexGuard aGuard( GetMutex());
- m_xInfo.clear();
- // \--
}
void SAL_CALL MinMaxLineWrapper::addEventListener(
@@ -132,34 +174,16 @@ void SAL_CALL MinMaxLineWrapper::removeEventListener(
::cppu::IPropertyArrayHelper& MinMaxLineWrapper::getInfoHelper()
{
- if(!m_pPropertyArrayHelper.get())
- {
- // /--
- ::osl::MutexGuard aGuard( GetMutex() );
- if(!m_pPropertyArrayHelper.get())
- {
- sal_Bool bSorted = sal_True;
- m_pPropertyArrayHelper = ::boost::shared_ptr< ::cppu::OPropertyArrayHelper >( new ::cppu::OPropertyArrayHelper( lcl_GetPropertySequence(), bSorted ) );
- }
- // \--
- }
- return *m_pPropertyArrayHelper.get();
+ return *StaticMinMaxLineWrapperInfoHelper::get();
}
//XPropertySet
uno::Reference< beans::XPropertySetInfo > SAL_CALL MinMaxLineWrapper::getPropertySetInfo()
throw (uno::RuntimeException)
{
- if( !m_xInfo.is() )
- {
- // /--
- ::osl::MutexGuard aGuard( GetMutex() );
- if( !m_xInfo.is() )
- m_xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
- // \--
- }
- return m_xInfo;
+ return *StaticMinMaxLineWrapperInfo::get();
}
+
void SAL_CALL MinMaxLineWrapper::setPropertyValue( const ::rtl::OUString& rPropertyName, const uno::Any& rValue )
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
{
@@ -355,26 +379,14 @@ void SAL_CALL MinMaxLineWrapper::setPropertyToDefault( const ::rtl::OUString& rP
{
this->setPropertyValue( rPropertyName, this->getPropertyDefault(rPropertyName) );
}
+
uno::Any SAL_CALL MinMaxLineWrapper::getPropertyDefault( const ::rtl::OUString& rPropertyName )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- static tPropertyValueMap aStaticDefaults;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aStaticDefaults.size() )
- {
- LineProperties::AddDefaultsToMap( aStaticDefaults );
- }
-
- sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
-
- tPropertyValueMap::const_iterator aFound(
- aStaticDefaults.find( nHandle ));
-
- if( aFound == aStaticDefaults.end())
+ const tPropertyValueMap& rStaticDefaults = *StaticMinMaxLineWrapperDefaults::get();
+ tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( getInfoHelper().getHandleByName( rPropertyName ) ) );
+ if( aFound == rStaticDefaults.end() )
return uno::Any();
-
return (*aFound).second;
}
@@ -383,7 +395,7 @@ uno::Any SAL_CALL MinMaxLineWrapper::getPropertyDefault( const ::rtl::OUString&
void SAL_CALL MinMaxLineWrapper::setAllPropertiesToDefault( )
throw (uno::RuntimeException)
{
- const Sequence< beans::Property >& rPropSeq = lcl_GetPropertySequence();
+ const Sequence< beans::Property >& rPropSeq = *StaticMinMaxLineWrapperPropertyArray::get();
for(sal_Int32 nN=0; nN<rPropSeq.getLength(); nN++)
{
::rtl::OUString aPropertyName( rPropSeq[nN].Name );
diff --git a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
index 449a1f550860..31a67b600536 100644..100755
--- a/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/MinMaxLineWrapper.hxx
@@ -123,12 +123,6 @@ private: //member
::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
::cppu::OInterfaceContainerHelper m_aEventListenerContainer;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySetInfo >
- m_xInfo;//outer PropertySetInfo
-
- ::boost::shared_ptr< ::cppu::OPropertyArrayHelper > m_pPropertyArrayHelper;
-
WrappedIgnoreProperty m_aWrappedLineJointProperty;
};
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index 20785faa8b66..9a2183f089fe 100644..100755
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -182,35 +182,37 @@ void lcl_AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEDEFAULT ));
}
-const Sequence< Property > & lcl_GetPropertySequence()
+struct StaticTitleWrapperPropertyArray_Initializer
{
- static Sequence< Property > aPropSeq;
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+private:
+ Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< beans::Property > aProperties;
lcl_AddPropertiesToVector( aProperties );
::chart::CharacterProperties::AddPropertiesToVector( aProperties );
::chart::LineProperties::AddPropertiesToVector( aProperties );
::chart::FillProperties::AddPropertiesToVector( aProperties );
-// ::chart::NamedProperties::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(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
- return aPropSeq;
-}
+struct StaticTitleWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticTitleWrapperPropertyArray_Initializer >
+{
+};
} // anonymous namespace
@@ -526,7 +528,7 @@ Reference< beans::XPropertySet > TitleWrapper::getInnerPropertySet()
const Sequence< beans::Property >& TitleWrapper::getPropertySequence()
{
- return lcl_GetPropertySequence();
+ return *StaticTitleWrapperPropertyArray::get();
}
const std::vector< WrappedProperty* > TitleWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 338131c4f973..16f576453869 100644..100755
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -57,32 +57,81 @@ namespace
static const OUString lcl_aServiceName(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.ChartArea" ));
-const Sequence< Property > & lcl_GetPropertySequence()
+struct StaticUpDownBarWrapperPropertyArray_Initializer
{
- static Sequence< Property > aPropSeq;
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+private:
+ Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< ::com::sun::star::beans::Property > aProperties;
::chart::LineProperties::AddPropertiesToVector( aProperties );
::chart::FillProperties::AddPropertiesToVector( aProperties );
-// ::chart::NamedProperties::AddPropertiesToVector( aProperties );
+ //::chart::NamedProperties::AddPropertiesToVector( aProperties );
::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- // and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
- return aPropSeq;
-}
+struct StaticUpDownBarWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticUpDownBarWrapperPropertyArray_Initializer >
+{
+};
+
+struct StaticUpDownBarWrapperInfoHelper_Initializer
+{
+ ::cppu::OPropertyArrayHelper* operator()()
+ {
+ static ::cppu::OPropertyArrayHelper aPropHelper( *StaticUpDownBarWrapperPropertyArray::get() );
+ return &aPropHelper;
+ }
+};
+
+struct StaticUpDownBarWrapperInfoHelper : public rtl::StaticAggregate< ::cppu::OPropertyArrayHelper, StaticUpDownBarWrapperInfoHelper_Initializer >
+{
+};
+
+struct StaticUpDownBarWrapperInfo_Initializer
+{
+ uno::Reference< beans::XPropertySetInfo >* operator()()
+ {
+ static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
+ ::cppu::OPropertySetHelper::createPropertySetInfo(*StaticUpDownBarWrapperInfoHelper::get() ) );
+ return &xPropertySetInfo;
+ }
+};
+
+struct StaticUpDownBarWrapperInfo : public rtl::StaticAggregate< uno::Reference< beans::XPropertySetInfo >, StaticUpDownBarWrapperInfo_Initializer >
+{
+};
+
+struct StaticUpDownBarWrapperDefaults_Initializer
+{
+ ::chart::tPropertyValueMap* operator()()
+ {
+ static ::chart::tPropertyValueMap aStaticDefaults;
+ lcl_AddDefaultsToMap( aStaticDefaults );
+ return &aStaticDefaults;
+ }
+private:
+ void lcl_AddDefaultsToMap( ::chart::tPropertyValueMap & rOutMap )
+ {
+ ::chart::LineProperties::AddDefaultsToMap( rOutMap );
+ ::chart::FillProperties::AddDefaultsToMap( rOutMap );
+ }
+};
+
+struct StaticUpDownBarWrapperDefaults : public rtl::StaticAggregate< ::chart::tPropertyValueMap, StaticUpDownBarWrapperDefaults_Initializer >
+{
+};
} // anonymous namespace
@@ -98,8 +147,6 @@ UpDownBarWrapper::UpDownBarWrapper(
: m_spChart2ModelContact( spChart2ModelContact )
, m_aEventListenerContainer( m_aMutex )
, m_aPropertySetName( bUp ? C2U("WhiteDay") : C2U("BlackDay") )
- , m_xInfo(0)
- , m_pPropertyArrayHelper()
{
}
@@ -113,11 +160,6 @@ void SAL_CALL UpDownBarWrapper::dispose()
{
Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( this ) );
m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
-
- // /--
- MutexGuard aGuard( GetMutex());
- m_xInfo.clear();
- // \--
}
void SAL_CALL UpDownBarWrapper::addEventListener(
@@ -136,33 +178,14 @@ void SAL_CALL UpDownBarWrapper::removeEventListener(
::cppu::IPropertyArrayHelper& UpDownBarWrapper::getInfoHelper()
{
- if(!m_pPropertyArrayHelper.get())
- {
- // /--
- ::osl::MutexGuard aGuard( GetMutex() );
- if(!m_pPropertyArrayHelper.get())
- {
- sal_Bool bSorted = sal_True;
- m_pPropertyArrayHelper = ::boost::shared_ptr< ::cppu::OPropertyArrayHelper >( new ::cppu::OPropertyArrayHelper( lcl_GetPropertySequence(), bSorted ) );
- }
- // \--
- }
- return *m_pPropertyArrayHelper.get();
+ return *StaticUpDownBarWrapperInfoHelper::get();
}
//XPropertySet
uno::Reference< beans::XPropertySetInfo > SAL_CALL UpDownBarWrapper::getPropertySetInfo()
throw (uno::RuntimeException)
{
- if( !m_xInfo.is() )
- {
- // /--
- ::osl::MutexGuard aGuard( GetMutex() );
- if( !m_xInfo.is() )
- m_xInfo = ::cppu::OPropertySetHelper::createPropertySetInfo( getInfoHelper() );
- // \--
- }
- return m_xInfo;
+ return *StaticUpDownBarWrapperInfo::get();
}
void SAL_CALL UpDownBarWrapper::setPropertyValue( const ::rtl::OUString& rPropertyName, const uno::Any& rValue )
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
@@ -320,27 +343,14 @@ void SAL_CALL UpDownBarWrapper::setPropertyToDefault( const ::rtl::OUString& rPr
{
this->setPropertyValue( rPropertyName, this->getPropertyDefault(rPropertyName) );
}
+
uno::Any SAL_CALL UpDownBarWrapper::getPropertyDefault( const ::rtl::OUString& rPropertyName )
throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
{
- static tPropertyValueMap aStaticDefaults;
-
- // /--
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aStaticDefaults.size() )
- {
- LineProperties::AddDefaultsToMap( aStaticDefaults );
- FillProperties::AddDefaultsToMap( aStaticDefaults );
- }
-
- sal_Int32 nHandle = getInfoHelper().getHandleByName( rPropertyName );
-
- tPropertyValueMap::const_iterator aFound(
- aStaticDefaults.find( nHandle ));
-
- if( aFound == aStaticDefaults.end())
+ const tPropertyValueMap& rStaticDefaults = *StaticUpDownBarWrapperDefaults::get();
+ tPropertyValueMap::const_iterator aFound( rStaticDefaults.find( getInfoHelper().getHandleByName( rPropertyName ) ) );
+ if( aFound == rStaticDefaults.end() )
return uno::Any();
-
return (*aFound).second;
}
@@ -349,7 +359,7 @@ uno::Any SAL_CALL UpDownBarWrapper::getPropertyDefault( const ::rtl::OUString& r
void SAL_CALL UpDownBarWrapper::setAllPropertiesToDefault( )
throw (uno::RuntimeException)
{
- const Sequence< beans::Property >& rPropSeq = lcl_GetPropertySequence();
+ const Sequence< beans::Property >& rPropSeq = *StaticUpDownBarWrapperPropertyArray::get();
for(sal_Int32 nN=0; nN<rPropSeq.getLength(); nN++)
{
::rtl::OUString aPropertyName( rPropSeq[nN].Name );
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
index 5b028a6acc66..f271bcbf2bb5 100644..100755
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
@@ -123,11 +123,6 @@ private: //member
::cppu::OInterfaceContainerHelper m_aEventListenerContainer;
rtl::OUString m_aPropertySetName;
- ::com::sun::star::uno::Reference<
- ::com::sun::star::beans::XPropertySetInfo >
- m_xInfo;//outer PropertySetInfo
- ::boost::shared_ptr< ::cppu::OPropertyArrayHelper > m_pPropertyArrayHelper;
-
};
} // namespace wrapper
diff --git a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
index a43bc610fc0c..be485f86aac4 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/WallFloorWrapper.cxx
@@ -59,31 +59,33 @@ namespace
static const OUString lcl_aServiceName(
RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.chart.WallOrFloor" ));
-const Sequence< Property > & lcl_GetPropertySequence()
+struct StaticWallFloorWrapperPropertyArray_Initializer
{
- static Sequence< Property > aPropSeq;
+ Sequence< Property >* operator()()
+ {
+ static Sequence< Property > aPropSeq( lcl_GetPropertySequence() );
+ return &aPropSeq;
+ }
- // /--
- MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if( 0 == aPropSeq.getLength() )
+private:
+ Sequence< Property > lcl_GetPropertySequence()
{
- // get properties
::std::vector< ::com::sun::star::beans::Property > aProperties;
::chart::FillProperties::AddPropertiesToVector( aProperties );
::chart::LineProperties::AddPropertiesToVector( aProperties );
-// ::chart::NamedProperties::AddPropertiesToVector( aProperties );
+ //::chart::NamedProperties::AddPropertiesToVector( aProperties );
::chart::UserDefinedProperties::AddPropertiesToVector( aProperties );
- // and sort them for access via bsearch
::std::sort( aProperties.begin(), aProperties.end(),
::chart::PropertyNameLess() );
- // transfer result to static Sequence
- aPropSeq = ::chart::ContainerHelper::ContainerToSequence( aProperties );
+ return ::chart::ContainerHelper::ContainerToSequence( aProperties );
}
+};
- return aPropSeq;
-}
+struct StaticWallFloorWrapperPropertyArray : public rtl::StaticAggregate< Sequence< Property >, StaticWallFloorWrapperPropertyArray_Initializer >
+{
+};
} // anonymous namespace
@@ -155,7 +157,7 @@ Reference< beans::XPropertySet > WallFloorWrapper::getInnerPropertySet()
const Sequence< beans::Property >& WallFloorWrapper::getPropertySequence()
{
- return lcl_GetPropertySequence();
+ return *StaticWallFloorWrapperPropertyArray::get();
}
const std::vector< WrappedProperty* > WallFloorWrapper::createWrappedProperties()
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
index 15ae48bc22dd..925b9694ba5f 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAutomaticPositionProperties.cxx
@@ -131,7 +131,6 @@ void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList )
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedAutomaticPositionProperties::addProperties( ::std::vector< Property > & rOutProperties )
{
rOutProperties.push_back(
@@ -145,7 +144,6 @@ void WrappedAutomaticPositionProperties::addProperties( ::std::vector< Property
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedAutomaticPositionProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList )
{
lcl_addWrappedProperties( rList );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
index 0c4a98263a04..11e49850b694 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -69,7 +69,6 @@ private: //member
sal_Int32 m_nDimensionIndex;
};
-//static
void WrappedAxisAndGridExistenceProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
@@ -239,7 +238,6 @@ private: //member
TitleHelper::eTitleType m_eTitleType;
};
-//static
void WrappedAxisTitleExistenceProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
@@ -359,7 +357,6 @@ private: //member
sal_Int32 m_nDimensionIndex;
};
-//static
void WrappedAxisLabelExistenceProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
index 5fca42c2b3ad..bd7c49052804 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedCharacterHeightProperty.cxx
@@ -62,7 +62,6 @@ WrappedCharacterHeightProperty_Base::~WrappedCharacterHeightProperty_Base()
{
}
-//static
void WrappedCharacterHeightProperty::addWrappedProperties( std::vector< WrappedProperty* >& rList
, ReferenceSizePropertyProvider* pRefSizePropProvider )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
index bc91136590cb..902938f04a78 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
@@ -119,7 +119,6 @@ void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedDataCaptionProperties::addProperties( ::std::vector< Property > & rOutProperties )
{
rOutProperties.push_back(
@@ -133,7 +132,6 @@ void WrappedDataCaptionProperties::addProperties( ::std::vector< Property > & rO
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedDataCaptionProperties::addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
@@ -143,7 +141,6 @@ void WrappedDataCaptionProperties::addWrappedPropertiesForSeries( std::vector< W
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedDataCaptionProperties::addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index b0fc030d0fbf..a89ca372d9ee 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -107,7 +107,6 @@ WrappedScaleProperty::~WrappedScaleProperty()
{
}
-//static
void WrappedScaleProperty::addWrappedProperties( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
index 5e11a3012cf3..2249ac1c41c3 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleTextProperties.cxx
@@ -141,7 +141,6 @@ enum
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedScaleTextProperties::addProperties( ::std::vector< Property > & rOutProperties )
{
rOutProperties.push_back(
@@ -155,7 +154,6 @@ void WrappedScaleTextProperties::addProperties( ::std::vector< Property > & rOut
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedScaleTextProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
index 68d408ea7147..79c09b8b41b0 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSceneProperty.cxx
@@ -46,7 +46,6 @@ namespace chart
namespace wrapper
{
-//static
void WrappedSceneProperty::addWrappedProperties( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
index 16ddb1137d4a..6890e06a1641 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSplineProperties.cxx
@@ -197,7 +197,6 @@ enum
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedSplineProperties::addProperties( ::std::vector< Property > & rOutProperties )
{
rOutProperties.push_back(
@@ -226,12 +225,11 @@ void WrappedSplineProperties::addProperties( ::std::vector< Property > & rOutPro
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedSplineProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
rList.push_back( new WrappedSplineTypeProperty( spChart2ModelContact ) );
- rList.push_back( new WrappedSplineProperty<sal_Int32>( C2U("SplineOrder"), C2U("SplineOrder"), uno::makeAny(sal_Int32(2)), spChart2ModelContact ) );
+ rList.push_back( new WrappedSplineProperty<sal_Int32>( C2U("SplineOrder"), C2U("SplineOrder"), uno::makeAny(sal_Int32(3)), spChart2ModelContact ) );
rList.push_back( new WrappedSplineProperty<sal_Int32>( C2U("SplineResolution"), C2U("CurveResolution"), uno::makeAny(sal_Int32(20)), spChart2ModelContact ) );
}
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index 1c7b495bd566..145e3423ccd8 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -1032,7 +1032,6 @@ void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList
}//anonymous namespace
-//static
void WrappedStatisticProperties::addProperties( ::std::vector< Property > & rOutProperties )
{
rOutProperties.push_back(
@@ -1128,7 +1127,6 @@ void WrappedStatisticProperties::addProperties( ::std::vector< Property > & rOut
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedStatisticProperties::addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
@@ -1138,7 +1136,6 @@ void WrappedStatisticProperties::addWrappedPropertiesForSeries( std::vector< Wra
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedStatisticProperties::addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
index 3ecb23ce84d2..37db09b977b6 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
@@ -291,7 +291,6 @@ enum
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedStockProperties::addProperties( ::std::vector< Property > & rOutProperties )
{
rOutProperties.push_back(
@@ -313,7 +312,6 @@ void WrappedStockProperties::addProperties( ::std::vector< Property > & rOutProp
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedStockProperties::addWrappedProperties( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index 4ca8f7161f6e..068f65f415be 100644..100755
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -201,7 +201,6 @@ void lcl_addWrappedProperties( std::vector< WrappedProperty* >& rList
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedSymbolProperties::addProperties( ::std::vector< Property > & rOutProperties )
{
rOutProperties.push_back(
@@ -236,7 +235,6 @@ void WrappedSymbolProperties::addProperties( ::std::vector< Property > & rOutPro
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedSymbolProperties::addWrappedPropertiesForSeries( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
@@ -246,7 +244,6 @@ void WrappedSymbolProperties::addWrappedPropertiesForSeries( std::vector< Wrappe
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
void WrappedSymbolProperties::addWrappedPropertiesForDiagram( std::vector< WrappedProperty* >& rList
, ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
{
@@ -573,8 +570,19 @@ void WrappedSymbolAndLinesProperty::setValueToSeries(
if(!xSeriesPropertySet.is())
return;
- drawing::LineStyle eLineStyle( bDrawLines ? drawing::LineStyle_SOLID : drawing::LineStyle_NONE );
- xSeriesPropertySet->setPropertyValue( C2U("LineStyle"), uno::makeAny( eLineStyle ) );
+ drawing::LineStyle eOldLineStyle( drawing::LineStyle_SOLID );
+ xSeriesPropertySet->getPropertyValue( C2U("LineStyle") ) >>= eOldLineStyle;
+ if( bDrawLines )
+ {
+ //#i114298# don't overwrite dashed lines with solid lines here
+ if( eOldLineStyle == drawing::LineStyle_NONE )
+ xSeriesPropertySet->setPropertyValue( C2U("LineStyle"), uno::makeAny( drawing::LineStyle_SOLID ) );
+ }
+ else
+ {
+ if( eOldLineStyle != drawing::LineStyle_NONE )
+ xSeriesPropertySet->setPropertyValue( C2U("LineStyle"), uno::makeAny( drawing::LineStyle_NONE ) );
+ }
}
beans::PropertyState WrappedSymbolAndLinesProperty::getPropertyState( const Reference< beans::XPropertyState >& /*xInnerPropertyState*/ ) const
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 513d49b6aad8..fedcfaffebc4 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -387,7 +387,6 @@ bool SeriesHeader::HasFocus() const
return m_spSeriesName->HasFocus();
}
-// static
Image SeriesHeader::GetChartTypeImage(
const Reference< chart2::XChartType > & xChartType,
bool bSwapXAndYAxis,
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index f32a882aa1e9..eedd2e3c6ba9 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -381,7 +381,6 @@ DialogModel::DialogModel(
m_xContext( xContext ),
m_aTimerTriggeredControllerLock( uno::Reference< frame::XModel >( m_xChartDocument, uno::UNO_QUERY ) )
{
- createBackup();
}
DialogModel::~DialogModel()
@@ -724,20 +723,16 @@ bool DialogModel::setData(
return true;
}
-// static
OUString DialogModel::ConvertRoleFromInternalToUI( const OUString & rRoleString )
{
return lcl_ConvertRole( rRoleString, true );
}
-// static
OUString DialogModel::GetRoleDataLabel()
{
return OUString( String( ::chart::SchResId( STR_OBJECT_DATALABELS )));
}
-// static
-
sal_Int32 DialogModel::GetRoleIndexForSorting( const ::rtl::OUString & rInternalRoleString )
{
static lcl_tRoleIndexMap aRoleIndexMap;
@@ -754,20 +749,6 @@ sal_Int32 DialogModel::GetRoleIndexForSorting( const ::rtl::OUString & rInternal
// private methods
-void DialogModel::createBackup()
-{
- OSL_ENSURE( ! m_xBackupChartDocument.is(), "Cloning already cloned model" );
- try
- {
- Reference< util::XCloneable > xCloneable( m_xChartDocument, uno::UNO_QUERY_THROW );
- m_xBackupChartDocument.set( xCloneable->createClone(), uno::UNO_QUERY_THROW );
- }
- catch( uno::Exception & ex )
- {
- ASSERT_EXCEPTION( ex );
- }
-}
-
void DialogModel::applyInterpretedData(
const InterpretedData & rNewData,
const ::std::vector< Reference< XDataSeries > > & rSeriesToReUse,
diff --git a/chart2/source/controller/dialogs/DialogModel.hxx b/chart2/source/controller/dialogs/DialogModel.hxx
index dcca6c716b8d..b7f882611e47 100644
--- a/chart2/source/controller/dialogs/DialogModel.hxx
+++ b/chart2/source/controller/dialogs/DialogModel.hxx
@@ -163,10 +163,6 @@ private:
m_xChartDocument;
::com::sun::star::uno::Reference<
- ::com::sun::star::chart2::XChartDocument >
- m_xBackupChartDocument;
-
- ::com::sun::star::uno::Reference<
::com::sun::star::chart2::XChartTypeTemplate >
m_xTemplate;
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 0836ab9ca93a..9057b850332f 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -332,7 +332,7 @@ rtl::OUString ObjectNameProvider::getName( ObjectType eObjectType, bool bPlural
}
return aRet;
}
-//static
+
rtl::OUString ObjectNameProvider::getAxisName( const rtl::OUString& rObjectCID
, const uno::Reference< frame::XModel >& xChartModel )
{
@@ -373,7 +373,6 @@ rtl::OUString ObjectNameProvider::getAxisName( const rtl::OUString& rObjectCID
return aRet;
}
-//static
OUString ObjectNameProvider::getTitleNameByType( TitleHelper::eTitleType eType )
{
OUString aRet;
@@ -412,7 +411,6 @@ OUString ObjectNameProvider::getTitleNameByType( TitleHelper::eTitleType eType )
return aRet;
}
-//static
OUString ObjectNameProvider::getTitleName( const OUString& rObjectCID
, const Reference< frame::XModel >& xChartModel )
{
@@ -432,7 +430,6 @@ OUString ObjectNameProvider::getTitleName( const OUString& rObjectCID
return aRet;
}
-//static
rtl::OUString ObjectNameProvider::getGridName( const rtl::OUString& rObjectCID
, const uno::Reference< frame::XModel >& xChartModel )
{
@@ -709,7 +706,6 @@ rtl::OUString ObjectNameProvider::getHelpText( const rtl::OUString& rObjectCID,
return aRet;
}
-// static
rtl::OUString ObjectNameProvider::getSelectedObjectText( const rtl::OUString & rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument )
{
rtl::OUString aRet;
@@ -762,8 +758,6 @@ rtl::OUString ObjectNameProvider::getSelectedObjectText( const rtl::OUString & r
return aRet;
}
-
-// static
rtl::OUString ObjectNameProvider::getNameForCID(
const rtl::OUString& rObjectCID,
const uno::Reference< chart2::XChartDocument >& xChartDocument )
@@ -820,7 +814,6 @@ rtl::OUString ObjectNameProvider::getNameForCID(
return getName( eType );
}
-//static
rtl::OUString ObjectNameProvider::getName_ObjectForSeries(
ObjectType eObjectType,
const rtl::OUString& rSeriesCID,
@@ -839,7 +832,6 @@ rtl::OUString ObjectNameProvider::getName_ObjectForSeries(
return ObjectNameProvider::getName_ObjectForAllSeries( eObjectType );
}
-//static
rtl::OUString ObjectNameProvider::getName_ObjectForAllSeries( ObjectType eObjectType )
{
OUString aRet = String(SchResId(STR_OBJECT_FOR_ALL_SERIES));
diff --git a/chart2/source/controller/dialogs/dlg_DataSource.cxx b/chart2/source/controller/dialogs/dlg_DataSource.cxx
index 9469293ae1c5..3e4cba6b23ad 100644
--- a/chart2/source/controller/dialogs/dlg_DataSource.cxx
+++ b/chart2/source/controller/dialogs/dlg_DataSource.cxx
@@ -146,7 +146,6 @@ void DataSourceTabControl::EnableTabToggling()
// ----------------------------------------
-// static
USHORT DataSourceDialog::m_nLastPageId = 0;
DataSourceDialog::DataSourceDialog(
diff --git a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
index 9c4438b6f1ca..50aa10ec6e6b 100644
--- a/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
+++ b/chart2/source/controller/dialogs/dlg_InsertErrorBars.cxx
@@ -95,7 +95,6 @@ void InsertErrorBarsDialog::SetAxisMinorStepWidthForErrorBarDecimals( double fMi
m_apErrorBarResources->SetAxisMinorStepWidthForErrorBarDecimals( fMinorStepWidth );
}
-//static
double InsertErrorBarsDialog::getAxisMinorStepWidthForErrorBarDecimals(
const Reference< frame::XModel >& xChartModel,
const Reference< uno::XInterface >& xChartView,
diff --git a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
index bf0dedfbc6e8..d7491156358e 100644
--- a/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
+++ b/chart2/source/controller/dialogs/dlg_NumberFormat.cxx
@@ -67,7 +67,6 @@ NumberFormatDialog::~NumberFormatDialog()
{
}
-//static
SfxItemSet NumberFormatDialog::CreateEmptyItemSetForNumberFormatDialog( SfxItemPool& rItemPool )
{
static const USHORT nWhichPairs[] =
diff --git a/chart2/source/controller/dialogs/dlg_View3D.cxx b/chart2/source/controller/dialogs/dlg_View3D.cxx
index 26a726ac5156..3c868f6aeaff 100644
--- a/chart2/source/controller/dialogs/dlg_View3D.cxx
+++ b/chart2/source/controller/dialogs/dlg_View3D.cxx
@@ -57,7 +57,6 @@ using namespace ::com::sun::star::chart2;
//-------------------------------------------------------------------
//-------------------------------------------------------------------
-// static
USHORT View3DDialog::m_nLastPageId = 0;
View3DDialog::View3DDialog(Window* pParent, const uno::Reference< frame::XModel > & xChartModel, XColorTable* pColorTable )
diff --git a/chart2/source/controller/dialogs/tp_DataLabel.src b/chart2/source/controller/dialogs/tp_DataLabel.src
index 615e81c2c550..0f8f12c3e48b 100644
--- a/chart2/source/controller/dialogs/tp_DataLabel.src
+++ b/chart2/source/controller/dialogs/tp_DataLabel.src
@@ -28,10 +28,6 @@
#include "TabPages.hrc"
#include "res_DataLabel.hrc"
-#ifndef _GLOBLMN_HRC
-#include <svx/globlmn.hrc>
-#endif
-
TabPage TP_DATA_DESCR
{
Hide = TRUE ;
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 48c96a715c5f..9da7f7536d28 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -424,7 +424,6 @@ void DrawViewWrapper::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
}
}
-//static
SdrObject* DrawViewWrapper::getSdrObject( const uno::Reference<
drawing::XShape >& xShape )
{
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index 5ee167260974..5754559ce8ae 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -239,7 +239,6 @@ bool ItemConverter::ApplyItemSet( const SfxItemSet & rItemSet )
// --------------------------------------------------------------------------------
-//static
void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItemSet &rSourceSet )
{
SfxWhichIter aIter (rSourceSet);
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index bf8afc65e78f..675bcf40e7a2 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -475,6 +475,7 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
if( rEvent.NewMode.equals(C2U("dirty")) )
{
//the view has become dirty, we should repaint it if we have a window
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if( m_pChartWindow )
m_pChartWindow->ForceInvalidate();
}
@@ -518,8 +519,11 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
impl_initializeAccessible();
- if( m_pChartWindow )
- m_pChartWindow->Invalidate();
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if( m_pChartWindow )
+ m_pChartWindow->Invalidate();
+ }
}
m_bConnectingToView = false;
@@ -537,10 +541,10 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
//is called to attach the controller to a new model.
//return true if attach was successfully, false otherwise (e.g. if you do not work with a model)
- ::vos::OClearableGuard aGuard( Application::GetSolarMutex());
+ ::vos::OClearableGuard aClearableGuard( Application::GetSolarMutex());
if( impl_isDisposedOrSuspended() ) //@todo? allow attaching a new model while suspended?
return sal_False; //behave passive if already disposed or suspended
- aGuard.clear();
+ aClearableGuard.clear();
TheModelRef aNewModelRef( new TheModel( xModel), m_aModelMutex);
@@ -612,8 +616,11 @@ void SAL_CALL ChartController::modeChanged( const util::ModeChangeEvent& rEvent
}
//the frameloader is responsible to call xModel->connectController
- if( m_pChartWindow )
- m_pChartWindow->Invalidate();
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if( m_pChartWindow )
+ m_pChartWindow->Invalidate();
+ }
uno::Reference< chart2::XUndoSupplier > xUndoSupplier( getModel(), uno::UNO_QUERY );
if( xUndoSupplier.is())
@@ -1106,6 +1113,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand )
else if(aCommand.equals("Update")) //Update Chart
{
ChartViewHelper::setViewToDirtyState( getModel() );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if( m_pChartWindow )
m_pChartWindow->Invalidate();
}
@@ -1491,6 +1499,7 @@ uno::Reference< XAccessible > ChartController::CreateAccessible()
void ChartController::impl_invalidateAccessible()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if( m_pChartWindow )
{
Reference< lang::XInitialization > xInit( m_pChartWindow->GetAccessible(false), uno::UNO_QUERY );
@@ -1503,6 +1512,7 @@ void ChartController::impl_invalidateAccessible()
}
void ChartController::impl_initializeAccessible()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if( m_pChartWindow )
this->impl_initializeAccessible( Reference< lang::XInitialization >( m_pChartWindow->GetAccessible(false), uno::UNO_QUERY ) );
}
@@ -1517,11 +1527,14 @@ void ChartController::impl_initializeAccessible( const uno::Reference< lang::XIn
aArguments[1]=uno::makeAny(xModel);
aArguments[2]=uno::makeAny(m_xChartView);
uno::Reference< XAccessible > xParent;
- if( m_pChartWindow )
{
- Window* pParentWin( m_pChartWindow->GetAccessibleParentWindow());
- if( pParentWin )
- xParent.set( pParentWin->GetAccessible());
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if( m_pChartWindow )
+ {
+ Window* pParentWin( m_pChartWindow->GetAccessibleParentWindow());
+ if( pParentWin )
+ xParent.set( pParentWin->GetAccessible());
+ }
}
aArguments[3]=uno::makeAny(xParent);
aArguments[4]=uno::makeAny(m_xViewWindow);
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index a6e82430d8f6..6091fd8ef3f8 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -76,6 +76,7 @@ void ChartController::StartTextEdit( const Point* pMousePixel )
{
//the first marked object will be edited
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
SdrObject* pTextObj = m_pDrawViewWrapper->getTextEditObject();
if(!pTextObj)
return;
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 779e3c32f1e7..735cb9634671 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -297,6 +297,7 @@ void ChartController::executeDispatch_ScaleText()
void ChartController::executeDispatch_Paste()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if( m_pChartWindow )
{
Graphic aGraphic;
@@ -581,7 +582,6 @@ void ChartController::executeDispatch_Cut()
executeDispatch_Delete();
}
-//static
bool ChartController::isObjectDeleteable( const uno::Any& rSelection )
{
ObjectIdentifier aSelOID( rSelection );
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 56908ac4ef79..885e37126dc2 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -243,12 +243,12 @@ const short HITPIX=2; //hit-tolerance in pixel
, sal_Int32 Width, sal_Int32 Height, sal_Int16 Flags )
throw (uno::RuntimeException)
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
uno::Reference<awt::XWindow> xWindow = m_xViewWindow;
- Window* pWindow = m_pChartWindow;
- if(xWindow.is() && pWindow)
+ if(xWindow.is() && m_pChartWindow)
{
- Size aLogicSize = pWindow->PixelToLogic( Size( Width, Height ), MapMode( MAP_100TH_MM ) );
+ Size aLogicSize = m_pChartWindow->PixelToLogic( Size( Width, Height ), MapMode( MAP_100TH_MM ) );
bool bIsEmbedded = true;
//todo: for standalone chart: detect wether we are standalone
@@ -263,8 +263,8 @@ const short HITPIX=2; //hit-tolerance in pixel
MapMode aNewMapMode( MAP_100TH_MM, Point(0,0)
, Fraction(nScaleXNumerator,nScaleXDenominator)
, Fraction(nScaleYNumerator,nScaleYDenominator) );
- pWindow->SetMapMode(aNewMapMode);
- pWindow->SetPosSizePixel( X, Y, Width, Height, Flags );
+ m_pChartWindow->SetMapMode(aNewMapMode);
+ m_pChartWindow->SetPosSizePixel( X, Y, Width, Height, Flags );
//#i75867# poor quality of ole's alternative view with 3D scenes and zoomfactors besides 100%
uno::Reference< beans::XPropertySet > xProp( m_xChartView, uno::UNO_QUERY );
@@ -285,7 +285,7 @@ const short HITPIX=2; //hit-tolerance in pixel
//a correct work area is at least necessary for correct values in the position and size dialog and for dragging area
if(m_pDrawViewWrapper)
{
- Rectangle aRect(Point(0,0), pWindow->GetOutputSize());
+ Rectangle aRect(Point(0,0), m_pChartWindow->GetOutputSize());
m_pDrawViewWrapper->SetWorkArea( aRect );
}
}
@@ -293,9 +293,9 @@ const short HITPIX=2; //hit-tolerance in pixel
{
//change visarea
ChartModelHelper::setPageSize( awt::Size( aLogicSize.Width(), aLogicSize.Height() ), getModel() );
- pWindow->SetPosSizePixel( X, Y, Width, Height, Flags );
+ m_pChartWindow->SetPosSizePixel( X, Y, Width, Height, Flags );
}
- pWindow->Invalidate();
+ m_pChartWindow->Invalidate();
}
}
@@ -533,12 +533,11 @@ void ChartController::execute_Paint( const Rectangle& rRect )
if( xUpdatable.is() )
xUpdatable->update();
- Window* pWindow = m_pChartWindow;
{
::vos::OGuard aGuard( Application::GetSolarMutex());
DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper;
if(pDrawViewWrapper)
- pDrawViewWrapper->CompleteRedraw(pWindow, Region(rRect) );
+ pDrawViewWrapper->CompleteRedraw(m_pChartWindow, Region(rRect) );
}
}
catch( uno::Exception & ex )
@@ -562,6 +561,8 @@ bool isDoubleClick( const MouseEvent& rMEvt )
void ChartController::startDoubleClickWaiting()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+
m_bWaitingForDoubleClick = true;
ULONG nDblClkTime = 500;
@@ -587,6 +588,7 @@ IMPL_LINK( ChartController, DoubleClickWaitingHdl, void*, EMPTYARG )
if( !m_bWaitingForMouseUp && m_aSelection.maybeSwitchSelectionAfterSingleClickWasEnsured() )
{
this->impl_selectObjectAndNotiy();
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if( m_pChartWindow )
{
Window::PointerState aPointerState( m_pChartWindow->GetPointerState() );
@@ -615,17 +617,16 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
m_aSelection.remindSelectionBeforeMouseDown();
- Window* pWindow = m_pChartWindow;
DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper;
- if(!pWindow || !pDrawViewWrapper )
+ if(!m_pChartWindow || !pDrawViewWrapper )
return;
- Point aMPos = pWindow->PixelToLogic(rMEvt.GetPosPixel());
+ Point aMPos = m_pChartWindow->PixelToLogic(rMEvt.GetPosPixel());
if ( MOUSE_LEFT == rMEvt.GetButtons() )
{
- pWindow->GrabFocus();
- pWindow->CaptureMouse();
+ m_pChartWindow->GrabFocus();
+ m_pChartWindow->CaptureMouse();
}
if( pDrawViewWrapper->IsTextEdit() )
@@ -710,7 +711,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
&& !rMEvt.IsRight() )
{
//start drag
- USHORT nDrgLog = (USHORT)pWindow->PixelToLogic(Size(DRGPIX,0)).Width();
+ USHORT nDrgLog = (USHORT)m_pChartWindow->PixelToLogic(Size(DRGPIX,0)).Width();
SdrDragMethod* pDragMethod = NULL;
//change selection to 3D scene if rotate mode
@@ -750,9 +751,8 @@ void ChartController::execute_MouseMove( const MouseEvent& rMEvt )
{
::vos::OGuard aGuard( Application::GetSolarMutex());
- Window* pWindow = m_pChartWindow;
DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper;
- if(!pWindow || !pDrawViewWrapper)
+ if(!m_pChartWindow || !pDrawViewWrapper)
return;
if( m_pDrawViewWrapper->IsTextEdit() )
@@ -763,7 +763,7 @@ void ChartController::execute_MouseMove( const MouseEvent& rMEvt )
if(pDrawViewWrapper->IsAction())
{
- pDrawViewWrapper->MovAction( pWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
+ pDrawViewWrapper->MovAction( m_pChartWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
}
//?? pDrawViewWrapper->GetPageView()->DragPoly();
@@ -785,12 +785,11 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
{
::vos::OGuard aGuard( Application::GetSolarMutex());
- Window* pWindow = m_pChartWindow;
DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper;
- if(!pWindow || !pDrawViewWrapper)
+ if(!m_pChartWindow || !pDrawViewWrapper)
return;
- Point aMPos = pWindow->PixelToLogic(rMEvt.GetPosPixel());
+ Point aMPos = m_pChartWindow->PixelToLogic(rMEvt.GetPosPixel());
if(pDrawViewWrapper->IsTextEdit())
{
@@ -920,7 +919,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
}
//@todo ForcePointer(&rMEvt);
- pWindow->ReleaseMouse();
+ m_pChartWindow->ReleaseMouse();
if( m_aSelection.isSelectionDifferentFromBeforeMouseDown() )
bNotifySelectionChange = true;
@@ -969,7 +968,9 @@ void ChartController::execute_DoubleClick( const Point* pMousePixel )
void ChartController::execute_Resize()
{
- m_pChartWindow->Invalidate();
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if(m_pChartWindow)
+ m_pChartWindow->Invalidate();
}
void ChartController::execute_Activate()
{
@@ -992,13 +993,11 @@ void ChartController::execute_LoseFocus()
void ChartController::execute_Command( const CommandEvent& rCEvt )
{
- Window* pWindow = m_pChartWindow;
-
bool bIsAction = false;
{
::vos::OGuard aGuard( Application::GetSolarMutex());
DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper;
- if(!pWindow || !pDrawViewWrapper)
+ if(!m_pChartWindow || !pDrawViewWrapper)
return;
bIsAction = m_pDrawViewWrapper->IsAction();
}
@@ -1006,7 +1005,11 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
// pop-up menu
if(rCEvt.GetCommand() == COMMAND_CONTEXTMENU && !bIsAction)
{
- m_pChartWindow->ReleaseMouse();
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if(m_pChartWindow)
+ m_pChartWindow->ReleaseMouse();
+ }
if( m_aSelection.isSelectionDifferentFromBeforeMouseDown() )
impl_notifySelectionChangeListeners();
@@ -1020,7 +1023,9 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
Point aPos( rCEvt.GetMousePosPixel() );
if( !rCEvt.IsMouseEvent() )
{
- aPos = m_pChartWindow->GetPointerState().maPos;
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if(m_pChartWindow)
+ aPos = m_pChartWindow->GetPointerState().maPos;
}
aContextMenuHelper.completeAndExecute( aPos, aContextMenu );
}
@@ -1290,7 +1295,11 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
::svt::ContextMenuHelper aContextMenuHelper( m_xFrame );
Point aPos( rCEvt.GetMousePosPixel() );
if( !rCEvt.IsMouseEvent() )
- aPos = m_pChartWindow->GetPointerState().maPos;
+ {
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if(m_pChartWindow)
+ aPos = m_pChartWindow->GetPointerState().maPos;
+ }
aContextMenuHelper.completeAndExecute( aPos, xPopupMenu );
}
}
@@ -1301,6 +1310,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
( rCEvt.GetCommand() == COMMAND_INPUTCONTEXTCHANGE ) )
{
//#i84417# enable editing with IME
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if( m_pDrawViewWrapper )
m_pDrawViewWrapper->Command( rCEvt, m_pChartWindow );
}
@@ -1310,9 +1320,8 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
{
bool bReturn=false;
- Window* pWindow = m_pChartWindow;
DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper;
- if(!pWindow || !pDrawViewWrapper)
+ if(!m_pChartWindow || !pDrawViewWrapper)
return bReturn;
// handle accelerators
@@ -1335,14 +1344,17 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
if( bReturn )
return bReturn;
- if( pDrawViewWrapper->IsTextEdit() )
{
- if( pDrawViewWrapper->KeyInput(rKEvt,pWindow) )
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if( pDrawViewWrapper->IsTextEdit() )
{
- bReturn = true;
- if( nCode == KEY_ESCAPE )
+ if( pDrawViewWrapper->KeyInput(rKEvt,m_pChartWindow) )
{
- this->EndTextEdit();
+ bReturn = true;
+ if( nCode == KEY_ESCAPE )
+ {
+ this->EndTextEdit();
+ }
}
}
}
@@ -1434,12 +1446,16 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
// default 1 mm in each direction
double fGrowAmountX = 200.0;
double fGrowAmountY = 200.0;
- if( bAlternate && pWindow )
+ if( bAlternate && m_pChartWindow )
{
// together with Alt-key: 1 px in each direction
- Size aPixelSize = pWindow->PixelToLogic( Size( 2, 2 ));
- fGrowAmountX = static_cast< double >( aPixelSize.Width());
- fGrowAmountY = static_cast< double >( aPixelSize.Height());
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if( m_pChartWindow )
+ {
+ Size aPixelSize = m_pChartWindow->PixelToLogic( Size( 2, 2 ));
+ fGrowAmountX = static_cast< double >( aPixelSize.Width());
+ fGrowAmountY = static_cast< double >( aPixelSize.Height());
+ }
}
if( nCode == KEY_SUBTRACT )
{
@@ -1461,12 +1477,16 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
// default 1 mm
double fShiftAmountX = 100.0;
double fShiftAmountY = 100.0;
- if( bAlternate && pWindow )
+ if( bAlternate && m_pChartWindow )
{
// together with Alt-key: 1 px
- Size aPixelSize = pWindow->PixelToLogic( Size( 1, 1 ));
- fShiftAmountX = static_cast< double >( aPixelSize.Width());
- fShiftAmountY = static_cast< double >( aPixelSize.Height());
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ if(m_pChartWindow)
+ {
+ Size aPixelSize = m_pChartWindow->PixelToLogic( Size( 1, 1 ));
+ fShiftAmountX = static_cast< double >( aPixelSize.Width());
+ fShiftAmountY = static_cast< double >( aPixelSize.Height());
+ }
}
switch( nCode )
{
@@ -1557,6 +1577,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
bReturn = executeDispatch_Delete();
if( ! bReturn )
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
InfoBox( m_pChartWindow, String(SchResId( STR_ACTION_NOTPOSSIBLE ))).Execute();
}
}
@@ -1729,11 +1750,14 @@ bool ChartController::requestQuickHelp(
void ChartController::impl_selectObjectAndNotiy()
{
- DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper;
- if( pDrawViewWrapper )
{
- pDrawViewWrapper->SetDragMode( m_eDragMode );
- m_aSelection.applySelection( m_pDrawViewWrapper );
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ DrawViewWrapper* pDrawViewWrapper = m_pDrawViewWrapper;
+ if( pDrawViewWrapper )
+ {
+ pDrawViewWrapper->SetDragMode( m_eDragMode );
+ m_aSelection.applySelection( m_pDrawViewWrapper );
+ }
}
impl_notifySelectionChangeListeners();
}
@@ -1862,10 +1886,9 @@ bool ChartController::impl_DragDataPoint( const ::rtl::OUString & rCID, double f
void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
{
::vos::OGuard aGuard( Application::GetSolarMutex());
- Window* pWindow = m_pChartWindow;
- if( m_pDrawViewWrapper && pWindow )
+ if( m_pDrawViewWrapper && m_pChartWindow )
{
- Point aMousePos( pWindow->PixelToLogic( rEvent.GetPosPixel()));
+ Point aMousePos( m_pChartWindow->PixelToLogic( rEvent.GetPosPixel()));
sal_uInt16 nModifier = rEvent.GetModifier();
BOOL bLeftDown = rEvent.IsLeft();
@@ -1873,8 +1896,8 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
{
if( m_pDrawViewWrapper->IsTextEditHit( aMousePos, HITPIX) )
{
- pWindow->SetPointer( m_pDrawViewWrapper->GetPreferedPointer(
- aMousePos, pWindow, nModifier, bLeftDown ) );
+ m_pChartWindow->SetPointer( m_pDrawViewWrapper->GetPreferedPointer(
+ aMousePos, m_pChartWindow, nModifier, bLeftDown ) );
return;
}
}
@@ -1891,7 +1914,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
{
Pointer aPointer = m_pDrawViewWrapper->GetPreferedPointer(
- aMousePos, pWindow, nModifier, bLeftDown );
+ aMousePos, m_pChartWindow, nModifier, bLeftDown );
bool bForceArrowPointer = false;
ObjectIdentifier aOID( m_aSelection.getSelectedOID() );
@@ -1924,9 +1947,9 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
}
if( bForceArrowPointer )
- pWindow->SetPointer( Pointer( POINTER_ARROW ));
+ m_pChartWindow->SetPointer( Pointer( POINTER_ARROW ));
else
- pWindow->SetPointer( aPointer );
+ m_pChartWindow->SetPointer( aPointer );
}
else
{
@@ -1975,7 +1998,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
}
break;
}
- pWindow->SetPointer( Pointer( ePointerStyle ) );
+ m_pChartWindow->SetPointer( Pointer( ePointerStyle ) );
return;
}
@@ -1987,7 +2010,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
{
if( aHitObjectCID.equals(m_aSelection.getSelectedCID()) )
{
- pWindow->SetPointer( Pointer( POINTER_ARROW ));
+ m_pChartWindow->SetPointer( Pointer( POINTER_ARROW ));
return;
}
}
@@ -1995,14 +2018,14 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
if( !aHitObjectCID.getLength() )
{
//additional shape was hit
- pWindow->SetPointer( POINTER_MOVE );
+ m_pChartWindow->SetPointer( POINTER_MOVE );
}
else if( ObjectIdentifier::isDragableObject( aHitObjectCID ) )
{
if( (m_eDragMode == SDRDRAG_ROTATE)
&& SelectionHelper::isRotateableObject( aHitObjectCID
, getModel() ) )
- pWindow->SetPointer( Pointer( POINTER_ROTATE ) );
+ m_pChartWindow->SetPointer( Pointer( POINTER_ROTATE ) );
else
{
ObjectType eHitObjectType = ObjectIdentifier::getObjectType( aHitObjectCID );
@@ -2011,15 +2034,15 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
if( !ObjectIdentifier::areSiblings(aHitObjectCID,m_aSelection.getSelectedCID())
&& !ObjectIdentifier::areIdenticalObjects(aHitObjectCID,m_aSelection.getSelectedCID()) )
{
- pWindow->SetPointer( Pointer( POINTER_ARROW ));
+ m_pChartWindow->SetPointer( Pointer( POINTER_ARROW ));
return;
}
}
- pWindow->SetPointer( POINTER_MOVE );
+ m_pChartWindow->SetPointer( POINTER_MOVE );
}
}
else
- pWindow->SetPointer( Pointer( POINTER_ARROW ));
+ m_pChartWindow->SetPointer( Pointer( POINTER_ARROW ));
}
}
}
diff --git a/chart2/source/controller/main/ImplUndoManager.cxx b/chart2/source/controller/main/ImplUndoManager.cxx
index 57e8e7315334..0976b7db286e 100644
--- a/chart2/source/controller/main/ImplUndoManager.cxx
+++ b/chart2/source/controller/main/ImplUndoManager.cxx
@@ -143,7 +143,6 @@ OUString UndoElement::getActionString() const
return m_aActionString;
}
-// static
Reference< frame::XModel > UndoElement::cloneModel( const Reference< frame::XModel > & xModel )
{
Reference< frame::XModel > xResult;
@@ -155,7 +154,6 @@ Reference< frame::XModel > UndoElement::cloneModel( const Reference< frame::XMod
return xResult;
}
-// static
void UndoElement::applyModelContentToModel(
Reference< frame::XModel > & xInOutModelToChange,
const Reference< frame::XModel > & xModelToCopyFrom,
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index fe73d15500f5..19577eb4900e 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -630,13 +630,11 @@ ObjectHierarchy::ObjectHierarchy(
ObjectHierarchy::~ObjectHierarchy()
{}
-// static
ObjectHierarchy::tOID ObjectHierarchy::getRootNodeOID()
{
return ObjectIdentifier( C2U( "ROOT" ) );
}
-// static
bool ObjectHierarchy::isRootNode( const ObjectHierarchy::tOID& rOID )
{
return ( rOID == ObjectHierarchy::getRootNodeOID() );
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 567a36473a5b..cd51adc7842e 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -335,7 +335,6 @@ bool Selection::isAdditionalShapeSelected() const
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-//static
bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject
, rtl::OUString& rOutName
, bool bGivenObjectMayBeResult )
@@ -369,7 +368,6 @@ bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject
return true;
}
-//static
bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject
, ObjectIdentifier& rOutObject
, bool bGivenObjectMayBeResult )
@@ -383,7 +381,6 @@ bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject
return false;
}
-//static
bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos
, const rtl::OUString& rNameOfSelectedObject
, const DrawViewWrapper& rDrawViewWrapper )
@@ -399,7 +396,6 @@ bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos
return true;
}
-// static
::rtl::OUString SelectionHelper::getHitObjectCID(
const Point& rMPos,
DrawViewWrapper& rDrawViewWrapper,
@@ -465,7 +461,6 @@ bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos
// \\- solar mutex
}
-//static
bool SelectionHelper::isRotateableObject( const ::rtl::OUString& rCID
, const uno::Reference< frame::XModel >& xChartModel )
{
@@ -497,7 +492,6 @@ bool SelectionHelper::getFrameDragSingles()
return bFrameDragSingles;
}
-//static
SdrObject* SelectionHelper::getMarkHandlesObject( SdrObject* pObj )
{
if(!pObj)
@@ -553,7 +547,6 @@ SdrObject* SelectionHelper::getObjectToMark()
return m_pMarkObj;
}
-//static
E3dScene* SelectionHelper::getSceneToRotate( SdrObject* pObj )
{
//search wether the object or one of its children is a 3D object
diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx
index b6adf9bf7477..b2eccae6c98d 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -262,6 +262,7 @@ IMPL_LINK( ShapeController, CheckNameHdl, AbstractSvxNameDialog*, pDialog )
void ShapeController::executeDispatch_FormatLine()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pChartController )
{
Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -276,7 +277,6 @@ void ShapeController::executeDispatch_FormatLine()
{
pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
}
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -302,6 +302,7 @@ void ShapeController::executeDispatch_FormatLine()
void ShapeController::executeDispatch_FormatArea()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pChartController )
{
Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -315,7 +316,6 @@ void ShapeController::executeDispatch_FormatArea()
{
pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
}
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -351,6 +351,7 @@ void ShapeController::executeDispatch_FormatArea()
void ShapeController::executeDispatch_TextAttributes()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pChartController )
{
Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -363,7 +364,6 @@ void ShapeController::executeDispatch_TextAttributes()
{
pDrawViewWrapper->MergeAttrFromMarked( aAttr, FALSE );
}
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -388,6 +388,7 @@ void ShapeController::executeDispatch_TextAttributes()
void ShapeController::executeDispatch_TransformDialog()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pChartController )
{
Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -402,7 +403,6 @@ void ShapeController::executeDispatch_TransformDialog()
pDrawViewWrapper->GetAttributes( aAttr );
// item set for position and size
SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -427,7 +427,6 @@ void ShapeController::executeDispatch_TransformDialog()
else
{
SfxItemSet aGeoAttr( pDrawViewWrapper->GetGeoAttrFromMarked() );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -446,6 +445,7 @@ void ShapeController::executeDispatch_TransformDialog()
void ShapeController::executeDispatch_ObjectTitleDescription()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pChartController )
{
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
@@ -456,7 +456,6 @@ void ShapeController::executeDispatch_ObjectTitleDescription()
{
String aTitle( pSelectedObj->GetTitle() );
String aDescription( pSelectedObj->GetDescription() );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -477,6 +476,7 @@ void ShapeController::executeDispatch_ObjectTitleDescription()
void ShapeController::executeDispatch_RenameObject()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pChartController )
{
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
@@ -486,7 +486,6 @@ void ShapeController::executeDispatch_RenameObject()
if ( pSelectedObj )
{
String aName( pSelectedObj->GetName() );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if ( pFact )
{
@@ -509,10 +508,10 @@ void ShapeController::executeDispatch_RenameObject()
void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
DrawViewWrapper* pDrawViewWrapper = ( m_pChartController ? m_pChartController->GetDrawViewWrapper() : NULL );
if ( pDrawViewWrapper )
{
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
switch ( nId )
{
case COMMAND_ID_BRING_TO_FRONT:
@@ -558,6 +557,7 @@ void ShapeController::executeDispatch_ChangeZOrder( sal_uInt16 nId )
void ShapeController::executeDispatch_FontDialog()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pChartController )
{
Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -568,7 +568,6 @@ void ShapeController::executeDispatch_FontDialog()
SfxItemSet aAttr( pDrawViewWrapper->GetModel()->GetItemPool() );
pDrawViewWrapper->GetAttributes( aAttr );
ViewElementListProvider aViewElementListProvider( pDrawModelWrapper );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
::boost::scoped_ptr< ShapeFontDialog > pDlg( new ShapeFontDialog( pParent, &aAttr, &aViewElementListProvider ) );
if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
{
@@ -581,6 +580,7 @@ void ShapeController::executeDispatch_FontDialog()
void ShapeController::executeDispatch_ParagraphDialog()
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
if ( m_pChartController )
{
Window* pParent = dynamic_cast< Window* >( m_pChartController->m_pChartWindow );
@@ -606,7 +606,6 @@ void ShapeController::executeDispatch_ParagraphDialog()
aNewAttr.Put( SvxWidowsItem( 0, SID_ATTR_PARA_WIDOWS) );
aNewAttr.Put( SvxOrphansItem( 0, SID_ATTR_PARA_ORPHANS) );
- ::vos::OGuard aGuard( Application::GetSolarMutex() );
::boost::scoped_ptr< ShapeParagraphDialog > pDlg( new ShapeParagraphDialog( pParent, &aNewAttr ) );
if ( pDlg.get() && ( pDlg->Execute() == RET_OK ) )
{
@@ -701,6 +700,7 @@ bool ShapeController::isBackwardPossible()
{
if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pDrawViewWrapper )
{
@@ -719,6 +719,7 @@ bool ShapeController::isForwardPossible()
{
if ( m_pChartController && m_pChartController->m_aSelection.isAdditionalShapeSelected() )
{
+ ::vos::OGuard aGuard( Application::GetSolarMutex() );
DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper();
if ( pDrawViewWrapper )
{
diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.cxx b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
index d80d37eff7da..68c56f2d988b 100644
--- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx
+++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
@@ -40,9 +40,6 @@
// #include <vcl/svapp.hxx>
// #endif
-// for ressource strings STR_UNDO and STR_REDO
-#include <sfx2/sfx.hrc>
-
#include "ResId.hxx"
using namespace ::com::sun::star;
diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx
index eb3d00a2723a..128a4b4091d0 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.cxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.cxx
@@ -38,9 +38,8 @@
#include <vcl/svapp.hxx>
// for ressource strings STR_UNDO and STR_REDO
-#include <sfx2/sfx.hrc>
-
-#include "ResId.hxx"
+#include <svtools/svtools.hrc>
+#include <svtools/svtdata.hxx>
using namespace ::com::sun::star;
@@ -86,13 +85,13 @@ void UndoCommandDispatch::fireStatusEvent(
if( m_xUndoManager->undoPossible())
{
// using assignment for broken gcc 3.3
- OUString aUndo = OUString( String( SchResId( STR_UNDO )));
+ OUString aUndo = OUString( String( SvtResId( STR_UNDO )));
aUndoState <<= ( aUndo + m_xUndoManager->getCurrentUndoString());
}
if( m_xUndoManager->redoPossible())
{
// using assignment for broken gcc 3.3
- OUString aRedo = OUString( String( SchResId( STR_REDO )));
+ OUString aRedo = OUString( String( SvtResId( STR_REDO )));
aRedoState <<= ( aRedo + m_xUndoManager->getCurrentRedoString());
}
diff --git a/chart2/source/controller/main/UndoManager.cxx b/chart2/source/controller/main/UndoManager.cxx
index 21e27922b1c8..21b3bbc1f725 100644
--- a/chart2/source/controller/main/UndoManager.cxx
+++ b/chart2/source/controller/main/UndoManager.cxx
@@ -408,7 +408,6 @@ sal_Int64 UndoManager::getSomething( const Sequence< sal_Int8 >& rId )
return 0;
}
-// static
const Sequence< sal_Int8 >& UndoManager::getUnoTunnelId()
{
static Sequence< sal_Int8 >* pSeq = 0;
@@ -425,7 +424,6 @@ const Sequence< sal_Int8 >& UndoManager::getUnoTunnelId()
return *pSeq;
}
-// static
UndoManager* UndoManager::getImplementation( const Reference< uno::XInterface > xObj )
{
UndoManager* pRet = NULL;
diff --git a/chart2/source/controller/makefile.mk b/chart2/source/controller/makefile.mk
index fbc888f38c3f..41d7df24acaa 100644
--- a/chart2/source/controller/makefile.mk
+++ b/chart2/source/controller/makefile.mk
@@ -109,11 +109,10 @@ DEF1NAME= $(SHL1TARGET)
# --- Resources ---------------------------------------------------------------
-# sfx.srs is needed for the strings for UNDO and REDO in the UndoCommandDispatch
RESLIB1LIST=\
$(SRS)$/chcdialogs.srs \
$(SRS)$/chcmenus.srs \
- $(SOLARCOMMONRESDIR)$/sfx.srs
+
RESLIB1NAME= $(TARGET)
RESLIB1IMAGES=$(PRJ)$/res