[Libreoffice-commits] core.git: 9 commits - basctl/source basic/source chart2/source dbaccess/source extensions/source filter/source include/oox include/toolkit offapi/com offapi/type_reference offapi/UnoApi_offapi.mk oox/source reportdesign/source scripting/source sc/source sdext/source sfx2/source svx/source toolkit/source xmlscript/test xmlsecurity/workben

Noel Grandin noel at peralex.com
Mon May 20 23:28:52 PDT 2013


 basctl/source/basicide/baside3.cxx                                                 |   50 --
 basctl/source/basicide/basides3.cxx                                                |   10 
 basctl/source/basicide/moduldlg.cxx                                                |   35 -
 basctl/source/basicide/scriptdocument.cxx                                          |   26 -
 basctl/source/dlged/dlged.cxx                                                      |  180 +++----
 basctl/source/dlged/dlgedfac.cxx                                                   |   12 
 basic/source/classes/eventatt.cxx                                                  |   32 -
 basic/source/runtime/methods1.cxx                                                  |    2 
 basic/source/uno/dlgcont.cxx                                                       |   14 
 chart2/source/controller/chartapiwrapper/TitleWrapper.cxx                          |   10 
 chart2/source/controller/chartapiwrapper/TitleWrapper.hxx                          |    4 
 chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx |    2 
 chart2/source/controller/dialogs/ObjectNameProvider.cxx                            |    2 
 chart2/source/controller/dialogs/TitleDialogData.cxx                               |    8 
 chart2/source/controller/main/ChartController_TextEdit.cxx                         |    2 
 chart2/source/inc/TitleHelper.hxx                                                  |   10 
 chart2/source/model/inc/Diagram.hxx                                                |    6 
 chart2/source/model/main/Axis.cxx                                                  |    8 
 chart2/source/model/main/Axis.hxx                                                  |    6 
 chart2/source/model/main/ChartModel.cxx                                            |    6 
 chart2/source/model/main/ChartModel.hxx                                            |    6 
 chart2/source/model/main/Diagram.cxx                                               |    8 
 chart2/source/model/main/Title.cxx                                                 |   34 +
 chart2/source/model/main/Title.hxx                                                 |   48 +-
 chart2/source/tools/ObjectIdentifier.cxx                                           |    2 
 chart2/source/tools/TitleHelper.cxx                                                |  125 ++---
 chart2/source/view/main/ChartView.cxx                                              |    2 
 dbaccess/source/ext/macromigration/migrationengine.cxx                             |    3 
 extensions/source/update/check/updatehdl.cxx                                       |   45 -
 filter/source/t602/t602filter.cxx                                                  |   68 --
 include/oox/drawingml/chart/converterbase.hxx                                      |    4 
 include/toolkit/controls/dialogcontrol.hxx                                         |  231 +++++++++-
 offapi/UnoApi_offapi.mk                                                            |   19 
 offapi/com/sun/star/awt/UnoControlDialog.idl                                       |   20 
 offapi/com/sun/star/awt/UnoControlDialogModel.idl                                  |  122 -----
 offapi/com/sun/star/awt/XUnoControlDialog.idl                                      |   58 ++
 offapi/com/sun/star/awt/XUnoControlDialogModel.idl                                 |  169 +++++++
 offapi/com/sun/star/chart2/ExponentialScaling.idl                                  |    7 
 offapi/com/sun/star/chart2/LinearScaling.idl                                       |    7 
 offapi/com/sun/star/chart2/LogarithmicScaling.idl                                  |    7 
 offapi/com/sun/star/chart2/PowerScaling.idl                                        |    7 
 offapi/com/sun/star/chart2/Scaling.idl                                             |    7 
 offapi/com/sun/star/chart2/Title.idl                                               |   63 --
 offapi/com/sun/star/chart2/XTitle2.idl                                             |   86 +++
 offapi/com/sun/star/chart2/XTitled.idl                                             |    6 
 offapi/com/sun/star/resource/XStringResourceManager.idl                            |    2 
 offapi/com/sun/star/resource/XStringResourceResolver.idl                           |    2 
 offapi/type_reference/offapi.rdb                                                   |binary
 oox/source/drawingml/chart/axisconverter.cxx                                       |   13 
 oox/source/drawingml/chart/converterbase.cxx                                       |    9 
 oox/source/drawingml/chart/titleconverter.cxx                                      |    4 
 reportdesign/source/ui/inc/DataProviderHandler.hxx                                 |    2 
 reportdesign/source/ui/inspection/DataProviderHandler.cxx                          |   29 -
 sc/source/filter/excel/xechart.cxx                                                 |    2 
 sc/source/filter/excel/xichart.cxx                                                 |   36 -
 sc/source/filter/inc/xichart.hxx                                                   |    7 
 sc/source/filter/inc/xlchart.hxx                                                   |    3 
 scripting/source/dlgprov/DialogModelProvider.cxx                                   |    9 
 scripting/source/dlgprov/DialogModelProvider.hxx                                   |    7 
 scripting/source/dlgprov/dlgprov.cxx                                               |  109 +---
 scripting/source/dlgprov/dlgprov.hxx                                               |   32 -
 sdext/source/minimizer/informationdialog.cxx                                       |   31 -
 sdext/source/minimizer/optimizerdialog.cxx                                         |   35 -
 sdext/source/minimizer/unodialog.cxx                                               |   78 +--
 sdext/source/minimizer/unodialog.hxx                                               |   20 
 sfx2/source/doc/guisaveas.cxx                                                      |   18 
 sfx2/source/doc/objxtor.cxx                                                        |    7 
 svx/source/form/fmservs.cxx                                                        |   56 +-
 toolkit/source/controls/dialogcontrol.cxx                                          |   62 ++
 xmlscript/test/imexp.cxx                                                           |   31 -
 xmlsecurity/workben/signaturetest.cxx                                              |    2 
 71 files changed, 1218 insertions(+), 967 deletions(-)

New commits:
commit d256dbede60533369d1aac64cca34721183f6a8a
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 17 16:15:09 2013 +0200

    fdo#46808, Convert chart2::Title service to new style
    
    API CHANGE: The chart2::XTitled interface now takes and returns
       a XTitle2 instead of an XTitle.
    
    Change-Id: I96c35909d3a13f1abb544296a782a0b6a7a58ec6

diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
index ad07eb1..89f6f9e 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.cxx
@@ -77,7 +77,7 @@ WrappedTitleStringProperty::~WrappedTitleStringProperty()
 void WrappedTitleStringProperty::setPropertyValue( const Any& rOuterValue, const Reference< beans::XPropertySet >& xInnerPropertySet ) const
                 throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException)
 {
-    Reference< chart2::XTitle > xTitle(xInnerPropertySet,uno::UNO_QUERY);
+    Reference< chart2::XTitle2 > xTitle(xInnerPropertySet,uno::UNO_QUERY);
     if(xTitle.is())
     {
         OUString aString;
@@ -89,7 +89,7 @@ Any WrappedTitleStringProperty::getPropertyValue( const Reference< beans::XPrope
                         throw (beans::UnknownPropertyException, lang::WrappedTargetException, uno::RuntimeException)
 {
     Any aRet( getPropertyDefault( Reference< beans::XPropertyState >( xInnerPropertySet, uno::UNO_QUERY ) ) );
-    Reference< chart2::XTitle > xTitle(xInnerPropertySet,uno::UNO_QUERY);
+    Reference< chart2::XTitle2 > xTitle(xInnerPropertySet,uno::UNO_QUERY);
     if(xTitle.is())
     {
         Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText());
@@ -294,7 +294,7 @@ Reference< beans::XPropertySet > TitleWrapper::getFirstCharacterPropertySet()
 {
     Reference< beans::XPropertySet > xProp;
 
-    Reference< chart2::XTitle > xTitle( this->getTitleObject() );
+    Reference< chart2::XTitle2 > xTitle = this->getTitleObject();
     if( xTitle.is())
     {
         Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText());
@@ -333,7 +333,7 @@ void TitleWrapper::setFastCharacterPropertyValue(
     OSL_ASSERT( FAST_PROPERTY_ID_START_CHAR_PROP <= nHandle &&
                 nHandle < CharacterProperties::FAST_PROPERTY_ID_END_CHAR_PROP );
 
-    Reference< chart2::XTitle > xTitle( this->getTitleObject() );
+    Reference< chart2::XTitle2 > xTitle( this->getTitleObject() );
     if( xTitle.is())
     {
         Sequence< Reference< chart2::XFormattedString > > aStrings( xTitle->getText());
@@ -494,7 +494,7 @@ awt::Size TitleWrapper::getCurrentSizeForReference()
 
 // ================================================================================
 
-Reference< chart2::XTitle > TitleWrapper::getTitleObject()
+Reference< chart2::XTitle2 > TitleWrapper::getTitleObject()
 {
     return TitleHelper::getTitle( m_eTitleType, m_spChart2ModelContact->getChartModel() );
 }
diff --git a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
index 5a43711..85f7657 100644
--- a/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/TitleWrapper.hxx
@@ -30,7 +30,7 @@
 #include <com/sun/star/drawing/XShape.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/chart2/XTitle.hpp>
+#include <com/sun/star/chart2/XTitle2.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 
 #include <boost/shared_ptr.hpp>
@@ -112,7 +112,7 @@ protected:
     ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getFirstCharacterPropertySet();
 
 private:
-    ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > getTitleObject();
+    ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle2 > getTitleObject();
 
 private:
     ::boost::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
index d21f485..3424119 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -300,7 +300,7 @@ Any WrappedAxisTitleExistenceProperty::getPropertyValue( const Reference< beans:
 {
     sal_Bool bHasTitle = sal_False;
 
-    Reference< chart2::XTitle > xTitle( TitleHelper::getTitle( m_eTitleType, m_spChart2ModelContact->getChartModel() ) );
+    Reference< chart2::XTitle2 > xTitle( TitleHelper::getTitle( m_eTitleType, m_spChart2ModelContact->getChartModel() ) );
     if( xTitle.is() && !TitleHelper::getCompleteString( xTitle ).isEmpty() )
         bHasTitle = sal_True;
 
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 29a3f38..2f81a5c 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -393,7 +393,7 @@ OUString ObjectNameProvider::getTitleName( const OUString& rObjectCID
 {
     OUString aRet;
 
-    Reference< XTitle > xTitle(
+    Reference< XTitle2 > xTitle(
         ObjectIdentifier::getObjectPropertySet( rObjectCID , xChartModel ), uno::UNO_QUERY );
     if( xTitle.is() )
     {
diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx b/chart2/source/controller/dialogs/TitleDialogData.cxx
index 91d4435..b1560db 100644
--- a/chart2/source/controller/dialogs/TitleDialogData.cxx
+++ b/chart2/source/controller/dialogs/TitleDialogData.cxx
@@ -62,10 +62,10 @@ void TitleDialogData::readFromModel( const uno::Reference< frame::XModel>& xChar
          nTitleIndex < static_cast< sal_Int32 >( TitleHelper::NORMAL_TITLE_END );
          nTitleIndex++)
     {
-        uno::Reference< XTitle > xTitle =  TitleHelper::getTitle(
+        uno::Reference< XTitle2 > xTitle =  TitleHelper::getTitle(
             static_cast< TitleHelper::eTitleType >( nTitleIndex ), xChartModel );
         this->aExistenceList[nTitleIndex] = xTitle.is();
-        this->aTextList[nTitleIndex]=TitleHelper::getCompleteString( xTitle );
+        this->aTextList[nTitleIndex] = TitleHelper::getCompleteString( xTitle );
     }
 }
 
@@ -97,8 +97,8 @@ bool TitleDialogData::writeDifferenceToModel(
         else if( !pOldState || ( pOldState->aTextList[nN] != this->aTextList[nN] ) )
         {
             //change content
-            uno::Reference< XTitle > xTitle(
-                TitleHelper::getTitle( static_cast< TitleHelper::eTitleType >( nN ), xChartModel ) );
+            uno::Reference< XTitle2 > xTitle =
+                TitleHelper::getTitle( static_cast< TitleHelper::eTitleType >( nN ), xChartModel );
             if(xTitle.is())
             {
                 TitleHelper::setCompleteString( this->aTextList[nN], xTitle, xContext );
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 8fd50b0..6f7b4eb 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -145,7 +145,7 @@ bool ChartController::EndTextEdit()
             ControllerLockGuard aCLGuard( getModel() );
 
             TitleHelper::setCompleteString( aString, uno::Reference<
-                ::com::sun::star::chart2::XTitle >::query( xPropSet ), m_xCC );
+                ::com::sun::star::chart2::XTitle2 >::query( xPropSet ), m_xCC );
 
             OSL_ENSURE( m_pTextActionUndoGuard.get(), "ChartController::EndTextEdit: no TextUndoGuard!" );
             if ( m_pTextActionUndoGuard.get() )
diff --git a/chart2/source/inc/TitleHelper.hxx b/chart2/source/inc/TitleHelper.hxx
index ec9db23..3fec3e3 100644
--- a/chart2/source/inc/TitleHelper.hxx
+++ b/chart2/source/inc/TitleHelper.hxx
@@ -52,13 +52,13 @@ public:
     };
 
     static ::com::sun::star::uno::Reference<
-            ::com::sun::star::chart2::XTitle >
+            ::com::sun::star::chart2::XTitle2 >
         getTitle( eTitleType nTitleIndex
                     , const ::com::sun::star::uno::Reference<
                     ::com::sun::star::frame::XModel >& xModel );
 
     static ::com::sun::star::uno::Reference<
-            ::com::sun::star::chart2::XTitle >
+            ::com::sun::star::chart2::XTitle2 >
         createTitle(  eTitleType nTitleIndex
                     , const OUString& rTitleText
                     , const ::com::sun::star::uno::Reference<
@@ -72,17 +72,17 @@ public:
                             ::com::sun::star::frame::XModel >& xModel );
 
     static OUString getCompleteString( const ::com::sun::star::uno::Reference<
-        ::com::sun::star::chart2::XTitle >& xTitle );
+        ::com::sun::star::chart2::XTitle2 >& xTitle );
     static void setCompleteString( const OUString& rNewText
         , const ::com::sun::star::uno::Reference<
-            ::com::sun::star::chart2::XTitle >& xTitle
+            ::com::sun::star::chart2::XTitle2 >& xTitle
         , const ::com::sun::star::uno::Reference<
             ::com::sun::star::uno::XComponentContext > & xContext
         , float * pDefaultCharHeight = 0 );
 
     static bool getTitleType( eTitleType& rType
                     , const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::chart2::XTitle >& xTitle
+                        ::com::sun::star::chart2::XTitle2 >& xTitle
                     , const ::com::sun::star::uno::Reference<
                         ::com::sun::star::frame::XModel >& xModel );
 };
diff --git a/chart2/source/model/inc/Diagram.hxx b/chart2/source/model/inc/Diagram.hxx
index f31c3c5..c922363 100644
--- a/chart2/source/model/inc/Diagram.hxx
+++ b/chart2/source/model/inc/Diagram.hxx
@@ -150,10 +150,10 @@ protected:
 
     // ____ XTitled ____
     virtual ::com::sun::star::uno::Reference<
-        ::com::sun::star::chart2::XTitle > SAL_CALL getTitleObject()
+        ::com::sun::star::chart2::XTitle2 > SAL_CALL getTitleObject()
         throw (::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL setTitleObject( const ::com::sun::star::uno::Reference<
-                                          ::com::sun::star::chart2::XTitle >& Title )
+                                          ::com::sun::star::chart2::XTitle2 >& Title )
         throw (::com::sun::star::uno::RuntimeException);
 
     // ____ X3DDefaultSetter ____
@@ -209,7 +209,7 @@ private:
                         m_xFloor;
 
     ::com::sun::star::uno::Reference<
-        ::com::sun::star::chart2::XTitle >
+        ::com::sun::star::chart2::XTitle2 >
                         m_xTitle;
 
     ::com::sun::star::uno::Reference<
diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx
index 35fcabb..bac6aea 100644
--- a/chart2/source/model/main/Axis.cxx
+++ b/chart2/source/model/main/Axis.cxx
@@ -341,7 +341,7 @@ Axis::Axis( const Axis & rOther ) :
         lcl_CloneSubGrids( rOther.m_aSubGridProperties, m_aSubGridProperties );
     ModifyListenerHelper::addListenerToAllSequenceElements( m_aSubGridProperties, m_xModifyEventForwarder );
 
-    m_xTitle.set( CloneHelper::CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
+    m_xTitle.set( CloneHelper::CreateRefClone< Reference< chart2::XTitle2 > >()( rOther.m_xTitle ));
     if( m_xTitle.is())
         ModifyListenerHelper::addListener( m_xTitle, m_xModifyEventForwarder );
 }
@@ -480,18 +480,18 @@ Sequence< Reference< beans::XPropertySet > > SAL_CALL Axis::getSubTickProperties
 
 
 // ____ XTitled ____
-Reference< chart2::XTitle > SAL_CALL Axis::getTitleObject()
+Reference< chart2::XTitle2 > SAL_CALL Axis::getTitleObject()
     throw (uno::RuntimeException)
 {
     MutexGuard aGuard( GetMutex() );
     return m_xTitle;
 }
 
-void SAL_CALL Axis::setTitleObject( const Reference< chart2::XTitle >& xNewTitle )
+void SAL_CALL Axis::setTitleObject( const Reference< chart2::XTitle2 >& xNewTitle )
     throw (uno::RuntimeException)
 {
     Reference< util::XModifyListener > xModifyEventForwarder;
-    Reference< chart2::XTitle > xOldTitle;
+    Reference< chart2::XTitle2 > xOldTitle;
     {
         MutexGuard aGuard( GetMutex() );
         xOldTitle = m_xTitle;
diff --git a/chart2/source/model/main/Axis.hxx b/chart2/source/model/main/Axis.hxx
index 46301fe..c5c2c17 100644
--- a/chart2/source/model/main/Axis.hxx
+++ b/chart2/source/model/main/Axis.hxx
@@ -106,11 +106,11 @@ protected:
 
     // ____ XTitled ____
     virtual ::com::sun::star::uno::Reference<
-                ::com::sun::star::chart2::XTitle > SAL_CALL getTitleObject()
+                ::com::sun::star::chart2::XTitle2 > SAL_CALL getTitleObject()
         throw (::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL setTitleObject(
         const ::com::sun::star::uno::Reference<
-            ::com::sun::star::chart2::XTitle >& Title )
+            ::com::sun::star::chart2::XTitle2 >& Title )
         throw (::com::sun::star::uno::RuntimeException);
 
     // ____ XCloneable ____
@@ -160,7 +160,7 @@ private: //member
             ::com::sun::star::beans::XPropertySet > >     m_aSubGridProperties;
 
     ::com::sun::star::uno::Reference<
-        ::com::sun::star::chart2::XTitle >          m_xTitle;
+        ::com::sun::star::chart2::XTitle2 >         m_xTitle;
 };
 
 } //  namespace chart
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index e2157c4..da52243 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -156,7 +156,7 @@ ChartModel::ChartModel( const ChartModel & rOther )
         m_xOldModelAgg->setDelegator( *this );
 
         Reference< util::XModifyListener > xListener;
-        Reference< chart2::XTitle > xNewTitle = CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle );
+        Reference< chart2::XTitle2 > xNewTitle = CreateRefClone< Reference< chart2::XTitle2 > >()( rOther.m_xTitle );
         Reference< chart2::XDiagram > xNewDiagram = CreateRefClone< Reference< chart2::XDiagram > >()( rOther.m_xDiagram );
         Reference< beans::XPropertySet > xNewPageBackground = CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xPageBackground );
         Reference< chart2::XChartTypeManager > xChartTypeManager = CreateRefClone< Reference< chart2::XChartTypeManager > >()( rOther.m_xChartTypeManager );
@@ -967,14 +967,14 @@ uno::Reference< beans::XPropertySet > SAL_CALL ChartModel::getPageBackground()
 }
 
 // ____ XTitled ____
-uno::Reference< chart2::XTitle > SAL_CALL ChartModel::getTitleObject()
+uno::Reference< chart2::XTitle2 > SAL_CALL ChartModel::getTitleObject()
     throw (uno::RuntimeException)
 {
     MutexGuard aGuard( m_aModelMutex );
     return m_xTitle;
 }
 
-void SAL_CALL ChartModel::setTitleObject( const uno::Reference< chart2::XTitle >& xTitle )
+void SAL_CALL ChartModel::setTitleObject( const uno::Reference< chart2::XTitle2 >& xTitle )
     throw (uno::RuntimeException)
 {
     {
diff --git a/chart2/source/model/main/ChartModel.hxx b/chart2/source/model/main/ChartModel.hxx
index f7d81b8..b27e834 100644
--- a/chart2/source/model/main/ChartModel.hxx
+++ b/chart2/source/model/main/ChartModel.hxx
@@ -160,7 +160,7 @@ private:
     ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >
         m_xDiagram;
 
-    ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle >
+    ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle2 >
                                           m_xTitle;
 
     bool                                  m_bIsDisposed;
@@ -480,10 +480,10 @@ public:
 
     // ____ XTitled ____
     virtual ::com::sun::star::uno::Reference<
-        ::com::sun::star::chart2::XTitle > SAL_CALL getTitleObject()
+        ::com::sun::star::chart2::XTitle2 > SAL_CALL getTitleObject()
         throw (::com::sun::star::uno::RuntimeException);
     virtual void SAL_CALL setTitleObject( const ::com::sun::star::uno::Reference<
-                                          ::com::sun::star::chart2::XTitle >& Title )
+                                          ::com::sun::star::chart2::XTitle2 >& Title )
         throw (::com::sun::star::uno::RuntimeException);
 
     // ____ XInterface (for old API wrapper) ____
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index ec1637b..eb7fac3 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -307,7 +307,7 @@ Diagram::Diagram( const Diagram & rOther ) :
 
     m_xWall.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xWall ));
     m_xFloor.set( CloneHelper::CreateRefClone< Reference< beans::XPropertySet > >()( rOther.m_xFloor ));
-    m_xTitle.set( CloneHelper::CreateRefClone< Reference< chart2::XTitle > >()( rOther.m_xTitle ));
+    m_xTitle.set( CloneHelper::CreateRefClone< Reference< chart2::XTitle2 > >()( rOther.m_xTitle ));
     m_xLegend.set( CloneHelper::CreateRefClone< Reference< chart2::XLegend > >()( rOther.m_xLegend ));
 
     ModifyListenerHelper::addListener( m_xWall, m_xModifyEventForwarder );
@@ -442,17 +442,17 @@ void SAL_CALL Diagram::setDiagramData(
 }
 
 // ____ XTitled ____
-uno::Reference< chart2::XTitle > SAL_CALL Diagram::getTitleObject()
+uno::Reference< chart2::XTitle2 > SAL_CALL Diagram::getTitleObject()
     throw (uno::RuntimeException)
 {
     MutexGuard aGuard( GetMutex() );
     return m_xTitle;
 }
 
-void SAL_CALL Diagram::setTitleObject( const uno::Reference< chart2::XTitle >& xNewTitle )
+void SAL_CALL Diagram::setTitleObject( const uno::Reference< chart2::XTitle2 >& xNewTitle )
     throw (uno::RuntimeException)
 {
-    Reference< chart2::XTitle > xOldTitle;
+    Reference< chart2::XTitle2 > xOldTitle;
     {
         MutexGuard aGuard( GetMutex() );
         if( m_xTitle == xNewTitle )
diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx
index 346a967..5eb9686 100644
--- a/chart2/source/model/main/Title.cxx
+++ b/chart2/source/model/main/Title.cxx
@@ -370,6 +370,40 @@ void Title::fireModifyEvent()
     m_xModifyEventForwarder->modified( lang::EventObject( static_cast< uno::XWeak* >( this )));
 }
 
+sal_Bool Title::getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+   uno::Any any = getPropertyValue(aPropertyName);
+   sal_Bool b = sal_False;
+   any >>= b;
+   return b;
+}
+
+double Title::getPropertyDouble(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+   uno::Any any = getPropertyValue(aPropertyName);
+   double b = sal_False;
+   any >>= b;
+   return b;
+}
+
+awt::Size Title::getReferencePageSize() throw(css::uno::RuntimeException)
+{
+   uno::Any any = getPropertyValue("ReferencePageSize");
+   awt::Size b;
+   any >>= b;
+   return b;
+}
+
+chart2::RelativePosition Title::getRelativePosition() throw(css::uno::RuntimeException)
+{
+   uno::Any any = getPropertyValue("RelativePosition");
+   chart2::RelativePosition b;
+   any >>= b;
+   return b;
+}
+
+
+
 
 // ================================================================================
 
diff --git a/chart2/source/model/main/Title.hxx b/chart2/source/model/main/Title.hxx
index c177d6e..32c7c17 100644
--- a/chart2/source/model/main/Title.hxx
+++ b/chart2/source/model/main/Title.hxx
@@ -25,7 +25,7 @@
 #include "MutexContainer.hxx"
 #include <cppuhelper/implbase5.hxx>
 #include <comphelper/uno3.hxx>
-#include <com/sun/star/chart2/XTitle.hpp>
+#include <com/sun/star/chart2/XTitle2.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include <com/sun/star/util/XCloneable.hpp>
@@ -36,7 +36,7 @@ namespace chart
 namespace impl
 {
 typedef ::cppu::WeakImplHelper5<
-    ::com::sun::star::chart2::XTitle,
+    ::com::sun::star::chart2::XTitle2,
     ::com::sun::star::lang::XServiceInfo,
     ::com::sun::star::util::XCloneable,
     ::com::sun::star::util::XModifyBroadcaster,
@@ -61,9 +61,41 @@ public:
     APPHELPER_XSERVICEINFO_DECL()
 
     /// merge XInterface implementations
-     DECLARE_XINTERFACE()
+    DECLARE_XINTERFACE()
     /// merge XTypeProvider implementations
-     DECLARE_XTYPEPROVIDER()
+    DECLARE_XTYPEPROVIDER()
+
+
+    // ambiguous overloads
+    virtual void SAL_CALL setPropertyValue(const rtl::OUString& p1, const com::sun::star::uno::Any& p2) throw(css::uno::RuntimeException)
+        { ::property::OPropertySet::setPropertyValue(p1, p2); }
+    virtual com::sun::star::uno::Any SAL_CALL getPropertyValue(const rtl::OUString& p1) throw(css::uno::RuntimeException)
+        { return ::property::OPropertySet::getPropertyValue(p1); }
+    virtual void SAL_CALL addPropertyChangeListener(const rtl::OUString& p1, const com::sun::star::uno::Reference<com::sun::star::beans::XPropertyChangeListener>& p2) throw(css::uno::RuntimeException)
+        { ::property::OPropertySet::addPropertyChangeListener(p1, p2); }
+    virtual void SAL_CALL removePropertyChangeListener(const rtl::OUString& p1, const com::sun::star::uno::Reference<com::sun::star::beans::XPropertyChangeListener>& p2) throw(css::uno::RuntimeException)
+        { ::property::OPropertySet::removePropertyChangeListener(p1, p2); }
+    virtual void SAL_CALL addVetoableChangeListener(const rtl::OUString& p1, const com::sun::star::uno::Reference<com::sun::star::beans::XVetoableChangeListener>& p2) throw(css::uno::RuntimeException)
+        { ::property::OPropertySet::addVetoableChangeListener(p1, p2); }
+    virtual void SAL_CALL removeVetoableChangeListener(const rtl::OUString& p1, const com::sun::star::uno::Reference<com::sun::star::beans::XVetoableChangeListener>& p2) throw(css::uno::RuntimeException)
+        { ::property::OPropertySet::removeVetoableChangeListener(p1, p2); }
+
+    // Attributes
+    virtual double SAL_CALL getTextRotation() throw(css::uno::RuntimeException)
+        { return getPropertyDouble("TextRotation"); }
+    virtual void SAL_CALL setTextRotation(double p1) throw(css::uno::RuntimeException)
+        { setPropertyDouble("TextRotation", p1); }
+    virtual sal_Bool SAL_CALL getStackCharacters() throw(css::uno::RuntimeException)
+        { return getPropertyBool("StackCharacters"); }
+    virtual void SAL_CALL setStackCharacters(sal_Bool p1) throw(css::uno::RuntimeException)
+        { setPropertyBool("StackCharacters", p1); }
+    virtual com::sun::star::chart2::RelativePosition SAL_CALL getRelativePosition() throw(css::uno::RuntimeException);
+    virtual void SAL_CALL setRelativePosition(const com::sun::star::chart2::RelativePosition& p1) throw(css::uno::RuntimeException)
+        { setPropertyValue("RelativePosition", css::uno::Any(p1)); }
+    virtual com::sun::star::awt::Size SAL_CALL getReferencePageSize() throw(css::uno::RuntimeException);
+    virtual void SAL_CALL setReferencePageSize(const com::sun::star::awt::Size& p1) throw(css::uno::RuntimeException)
+        { setPropertyValue("ReferencePageSize", css::uno::Any(p1)); }
+
 
 protected:
     explicit Title( const Title & rOther );
@@ -119,6 +151,14 @@ protected:
     void fireModifyEvent();
 
 private:
+
+    sal_Bool getPropertyBool(const OUString& p1) throw(::com::sun::star::uno::RuntimeException);
+    double getPropertyDouble(const OUString& p1) throw(::com::sun::star::uno::RuntimeException);
+    void setPropertyBool(const OUString& p1, sal_Bool p2) throw(::com::sun::star::uno::RuntimeException)
+        { setPropertyValue( p1, css::uno::Any(p2) ); }
+    void setPropertyDouble(const OUString& p1, double p2) throw(::com::sun::star::uno::RuntimeException)
+        { setPropertyValue( p1, css::uno::Any(p2) ); }
+
     ::com::sun::star::uno::Sequence<
         ::com::sun::star::uno::Reference<
             ::com::sun::star::chart2::XFormattedString > > m_aStrings;
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 9dc31b1..1352277 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -344,7 +344,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierForObject(
     try
     {
         //title
-        Reference< XTitle > xTitle( xObject, uno::UNO_QUERY );
+        Reference< XTitle2 > xTitle( xObject, uno::UNO_QUERY );
         if( xTitle.is() )
         {
             TitleHelper::eTitleType aTitleType;
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index a8a0b00..dda0513 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -23,6 +23,7 @@
 #include "AxisHelper.hxx"
 #include "DiagramHelper.hxx"
 #include <com/sun/star/chart2/FormattedString.hpp>
+#include <com/sun/star/chart2/Title.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <rtl/ustrbuf.hxx>
 
@@ -122,23 +123,23 @@ uno::Reference< XTitled > lcl_getTitleParent( TitleHelper::eTitleType nTitleInde
     return xResult;
 }
 
-uno::Reference< XTitle > TitleHelper::getTitle( TitleHelper::eTitleType nTitleIndex
+uno::Reference< XTitle2 > TitleHelper::getTitle( TitleHelper::eTitleType nTitleIndex
                             , const uno::Reference< frame::XModel >& xModel )
 {
     uno::Reference< XTitled > xTitled( lcl_getTitleParent( nTitleIndex, xModel ) );
     if( xTitled.is())
-        return xTitled->getTitleObject();
+        xTitled->getTitleObject();
     return NULL;
 }
 
-uno::Reference< XTitle > TitleHelper::createTitle(
+uno::Reference< XTitle2 > TitleHelper::createTitle(
       TitleHelper::eTitleType eTitleType
     , const OUString& rTitleText
     , const uno::Reference< frame::XModel >& xModel
     , const uno::Reference< uno::XComponentContext > & xContext
     , ReferenceSizeProvider * pRefSizeProvider )
 {
-    uno::Reference< XTitle > xTitle;
+    uno::Reference< XTitle2 > xTitle;
     uno::Reference< XTitled > xTitled( lcl_getTitleParent( eTitleType, xModel ) );
 
     if( !xTitled.is() )
@@ -168,79 +169,70 @@ uno::Reference< XTitle > TitleHelper::createTitle(
     {
         uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ) );
 
-        xTitle.set( xContext->getServiceManager()->createInstanceWithContext(
-                        "com.sun.star.chart2.Title",
-                        xContext ), uno::UNO_QUERY );
+        xTitle = chart2::Title::create( xContext );
 
-        if(xTitle.is())
+        // default char height (main: 13.0 == default)
+        float fDefaultCharHeightSub = 11.0;
+        float fDefaultCharHeightAxis = 9.0;
+        switch( eTitleType )
         {
-            // default char height (main: 13.0 == default)
-            float fDefaultCharHeightSub = 11.0;
-            float fDefaultCharHeightAxis = 9.0;
-            switch( eTitleType )
-            {
-                case TitleHelper::SUB_TITLE:
-                    TitleHelper::setCompleteString(
-                        rTitleText, xTitle, xContext, & fDefaultCharHeightSub );
-                    break;
-                case TitleHelper::X_AXIS_TITLE:
-                case TitleHelper::Y_AXIS_TITLE:
-                case TitleHelper::Z_AXIS_TITLE:
-                case TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION:
-                case TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION:
-                case TitleHelper::SECONDARY_X_AXIS_TITLE:
-                case TitleHelper::SECONDARY_Y_AXIS_TITLE:
-                    TitleHelper::setCompleteString(
-                        rTitleText, xTitle, xContext, & fDefaultCharHeightAxis );
-                    break;
-                default:
-                    TitleHelper::setCompleteString( rTitleText, xTitle, xContext );
-                    break;
-            }
+            case TitleHelper::SUB_TITLE:
+                TitleHelper::setCompleteString(
+                    rTitleText, xTitle, xContext, & fDefaultCharHeightSub );
+                break;
+            case TitleHelper::X_AXIS_TITLE:
+            case TitleHelper::Y_AXIS_TITLE:
+            case TitleHelper::Z_AXIS_TITLE:
+            case TitleHelper::TITLE_AT_STANDARD_X_AXIS_POSITION:
+            case TitleHelper::TITLE_AT_STANDARD_Y_AXIS_POSITION:
+            case TitleHelper::SECONDARY_X_AXIS_TITLE:
+            case TitleHelper::SECONDARY_Y_AXIS_TITLE:
+                TitleHelper::setCompleteString(
+                    rTitleText, xTitle, xContext, & fDefaultCharHeightAxis );
+                break;
+            default:
+                TitleHelper::setCompleteString( rTitleText, xTitle, xContext );
+                break;
+        }
 
-            // set/clear autoscale
-            if( pRefSizeProvider )
-                pRefSizeProvider->setValuesAtTitle( xTitle );
+        // set/clear autoscale
+        if( pRefSizeProvider )
+            pRefSizeProvider->setValuesAtTitle( xTitle );
 
-            xTitled->setTitleObject( xTitle );
+        xTitled->setTitleObject( xTitle );
 
-            //default rotation 90 degree for y axis title in normal coordinatesystems or for x axis title for swapped coordinatesystems
-            if( eTitleType == TitleHelper::X_AXIS_TITLE ||
-                eTitleType == TitleHelper::Y_AXIS_TITLE ||
-                eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE ||
-                eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE )
+        //default rotation 90 degree for y axis title in normal coordinatesystems or for x axis title for swapped coordinatesystems
+        if( eTitleType == TitleHelper::X_AXIS_TITLE ||
+            eTitleType == TitleHelper::Y_AXIS_TITLE ||
+            eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE ||
+            eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE )
 
+        {
+            try
             {
-                try
-                {
-                    bool bDummy = false;
-                    bool bIsVertical = DiagramHelper::getVertical( xDiagram, bDummy, bDummy );
-
-                    Reference< beans::XPropertySet > xTitleProps( xTitle, uno::UNO_QUERY );
-                    if( xTitleProps.is() )
-                    {
-                        if( (!bIsVertical && eTitleType == TitleHelper::Y_AXIS_TITLE)
-                            || (bIsVertical && eTitleType == TitleHelper::X_AXIS_TITLE)
-                            || (!bIsVertical && eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE)
-                            || (bIsVertical && eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE) )
-                        {
-                            double fNewAngleDegree = 90.0;
-                            xTitleProps->setPropertyValue( "TextRotation", uno::makeAny( fNewAngleDegree ));
-                        }
-                    }
-                }
-                catch( const uno::Exception & ex )
+                bool bDummy = false;
+                bool bIsVertical = DiagramHelper::getVertical( xDiagram, bDummy, bDummy );
+
+                if( (!bIsVertical && eTitleType == TitleHelper::Y_AXIS_TITLE)
+                    || (bIsVertical && eTitleType == TitleHelper::X_AXIS_TITLE)
+                    || (!bIsVertical && eTitleType == TitleHelper::SECONDARY_Y_AXIS_TITLE)
+                    || (bIsVertical && eTitleType == TitleHelper::SECONDARY_X_AXIS_TITLE) )
                 {
-                    ASSERT_EXCEPTION( ex );
+                    double fNewAngleDegree = 90.0;
+                    xTitle->setTextRotation( fNewAngleDegree );
                 }
             }
+            catch( const uno::Exception & ex )
+            {
+                ASSERT_EXCEPTION( ex );
+            }
         }
     }
     return xTitle;
 
 }
 
-OUString TitleHelper::getCompleteString( const uno::Reference< XTitle >& xTitle )
+OUString TitleHelper::getCompleteString( const uno::Reference< XTitle2 >& xTitle )
 {
     OUString aRet;
     if(!xTitle.is())
@@ -252,7 +244,7 @@ OUString TitleHelper::getCompleteString( const uno::Reference< XTitle >& xTitle
 }
 
 void TitleHelper::setCompleteString( const OUString& rNewText
-                    , const uno::Reference< XTitle >& xTitle
+                    , const uno::Reference< XTitle2 >& xTitle
                     , const uno::Reference< uno::XComponentContext > & xContext
                     , float * pDefaultCharHeight /* = 0 */ )
 {
@@ -262,10 +254,7 @@ void TitleHelper::setCompleteString( const OUString& rNewText
 
     OUString aNewText = rNewText;
 
-    bool bStacked = false;
-    uno::Reference< beans::XPropertySet > xTitleProperties( xTitle, uno::UNO_QUERY );
-    if( xTitleProperties.is() )
-        xTitleProperties->getPropertyValue( "StackCharacters" ) >>= bStacked;
+    bool bStacked = xTitle->getStackCharacters();
 
     if( bStacked )
     {
@@ -337,14 +326,14 @@ void TitleHelper::removeTitle( TitleHelper::eTitleType nTitleIndex
 
 bool TitleHelper::getTitleType( eTitleType& rType
                     , const ::com::sun::star::uno::Reference<
-                        ::com::sun::star::chart2::XTitle >& xTitle
+                        ::com::sun::star::chart2::XTitle2 >& xTitle
                     , const ::com::sun::star::uno::Reference<
                         ::com::sun::star::frame::XModel >& xModel )
 {
     if( !xTitle.is() || !xModel.is() )
         return false;
 
-    Reference< chart2::XTitle > xCurrentTitle;
+    Reference< chart2::XTitle2 > xCurrentTitle;
     for( sal_Int32 nTitleType = TITLE_BEGIN; nTitleType < NORMAL_TITLE_END; nTitleType++ )
     {
         xCurrentTitle = TitleHelper::getTitle( static_cast<eTitleType>(nTitleType), xModel );
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index e5ae969..5698e3e 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2167,7 +2167,7 @@ boost::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
         nXDistance = nXOffset;
     }
 
-    uno::Reference< XTitle > xTitle( TitleHelper::getTitle( eType, xChartModel ) );
+    uno::Reference< XTitle2 > xTitle( TitleHelper::getTitle( eType, xChartModel ) );
     OUString aCompleteString( TitleHelper::getCompleteString( xTitle ) );
     if( !aCompleteString.isEmpty() )
     {
diff --git a/include/oox/drawingml/chart/converterbase.hxx b/include/oox/drawingml/chart/converterbase.hxx
index 21a0344..3408e85 100644
--- a/include/oox/drawingml/chart/converterbase.hxx
+++ b/include/oox/drawingml/chart/converterbase.hxx
@@ -27,7 +27,7 @@ namespace com { namespace sun { namespace star {
     namespace awt { struct Rectangle; }
     namespace awt { struct Size; }
     namespace chart2 { class XChartDocument; }
-    namespace chart2 { class XTitle; }
+    namespace chart2 { class XTitle2; }
     namespace drawing { class XShape; }
 } } }
 
@@ -87,7 +87,7 @@ protected:
     /** Registers a title object and its layout data, needed for conversion of
         the title position using the old Chart1 API. */
     void                registerTitleLayout(
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle >& rxTitle,
+                            const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle2 >& rxTitle,
                             const ModelRef< LayoutModel >& rxLayout, ObjectType eObjType,
                             sal_Int32 nMainIdx = -1, sal_Int32 nSubIdx = -1 );
     /** Converts the positions of the main title and all axis titles. */
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 46055c9..682ef39 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -89,6 +89,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2,\
 	PowerScaling \
 	RegressionEquation \
 	Scaling \
+	Title \
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2/data,\
 	DatabaseDataProvider \
@@ -634,7 +635,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/chart2,
 	RegressionCurve \
 	RegressionCurveEquation \
 	StandardDiagramCreationParameters \
-	Title \
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/chart2/data,\
 	DataFilter \
@@ -2027,6 +2027,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/chart2,\
 	XScaling \
 	XTarget \
 	XTitle \
+	XTitle2 \
 	XTitled \
 	XTransformation \
 ))
diff --git a/offapi/com/sun/star/chart2/Title.idl b/offapi/com/sun/star/chart2/Title.idl
index 24bcfd5..936c8e1 100644
--- a/offapi/com/sun/star/chart2/Title.idl
+++ b/offapi/com/sun/star/chart2/Title.idl
@@ -19,68 +19,13 @@
 #ifndef com_sun_star_chart2_Title_idl
 #define com_sun_star_chart2_Title_idl
 
-#include <com/sun/star/style/ParagraphProperties.idl>
-#include <com/sun/star/chart2/XTitle.idl>
-#include <com/sun/star/chart2/RelativePosition.idl>
-#include <com/sun/star/beans/PropertySet.idl>
-#include <com/sun/star/drawing/LineProperties.idl>
-#include <com/sun/star/drawing/FillProperties.idl>
-//FIXME does not exist <com/sun/star/layout/LayoutElement.idl>
+#include <com/sun/star/chart2/XTitle2.idl>
 
-module com
-{
-module sun
-{
-module star
-{
-module chart2
-{
+module com { module sun { module star { module chart2 {
 
-service Title
-{
-    /** only mandatory properties
-     */
-    service                ::com::sun::star::style::ParagraphProperties;
-    service                ::com::sun::star::drawing::FillProperties;
-    service                ::com::sun::star::drawing::LineProperties;
-    service                ::com::sun::star::beans::PropertySet;
-//FIXME    [optional] service     ::com::sun::star::layout::LayoutElement;
+service Title : XTitle2;
 
-    /**
-     */
-    interface              XTitle;
-
-    /** the rotation of the title's text in degrees in the range
-        [0,360).
-     */
-    [property] double      TextRotation;
-
-    /** writes the characters of the title on top of each other if set
-        to <TRUE/>.
-     */
-    [property] boolean     StackCharacters;
-
-    /** The position is a relative position on the page.
-
-        <p>If a relative position is given the title is not automatically placed,
-        but instead is placed relative on the page.</p>
-     */
-    [property, maybevoid] ::com::sun::star::chart2::RelativePosition RelativePosition;
-
-
-    /** contains the size of the page at the time when properties were
-        set (e.g. the CharHeight).
-
-        <p>This way it is possible to resize objects (like text) in
-        the view without modifying the model.</p>
-     */
-    [property, maybevoid]  com::sun::star::awt::Size   ReferencePageSize;
-};
-
-} ; // chart2
-} ; // com
-} ; // sun
-} ; // star
+}; }; }; };
 
 #endif
 
diff --git a/offapi/com/sun/star/chart2/XTitle2.idl b/offapi/com/sun/star/chart2/XTitle2.idl
new file mode 100644
index 0000000..d993f75
--- /dev/null
+++ b/offapi/com/sun/star/chart2/XTitle2.idl
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef com_sun_star_chart2_XTitle2_idl
+#define com_sun_star_chart2_XTitle2_idl
+
+#include <com/sun/star/style/ParagraphProperties.idl>
+#include <com/sun/star/chart2/XTitle.idl>
+#include <com/sun/star/chart2/RelativePosition.idl>
+#include <com/sun/star/beans/XPropertySet.idl>
+#include <com/sun/star/drawing/LineProperties.idl>
+#include <com/sun/star/drawing/FillProperties.idl>
+//FIXME does not exist <com/sun/star/layout/LayoutElement.idl>
+
+module com { module sun { module star { module chart2 {
+
+/**
+    The unified interface for the Title service.
+
+    This service actually implements a few other services
+    (style::ParagraphProperties, drawing::FillProperties, drawing::LineProperties).
+    This set here is only the set that we use internally.
+
+    @since LibreOffice 4.1
+*/
+interface XTitle2
+{
+    /** only mandatory properties
+     */
+//    service                ::com::sun::star::style::ParagraphProperties;
+//    service                ::com::sun::star::drawing::FillProperties;
+//    service                ::com::sun::star::drawing::LineProperties;
+    interface                ::com::sun::star::beans::XPropertySet;
+//FIXME    [optional] service     ::com::sun::star::layout::LayoutElement;
+
+    /**
+     */
+    interface              XTitle;
+
+    /** the rotation of the title's text in degrees in the range
+        [0,360).
+     */
+    [attribute] double      TextRotation;
+
+    /** writes the characters of the title on top of each other if set
+        to <TRUE/>.
+     */
+    [attribute] boolean     StackCharacters;
+
+    /** The position is a relative position on the page.
+
+        <p>If a relative position is given the title is not automatically placed,
+        but instead is placed relative on the page.</p>
+     */
+    [attribute] ::com::sun::star::chart2::RelativePosition RelativePosition;
+
+
+    /** contains the size of the page at the time when properties were
+        set (e.g. the CharHeight).
+
+        <p>This way it is possible to resize objects (like text) in
+        the view without modifying the model.</p>
+     */
+    [attribute]  com::sun::star::awt::Size   ReferencePageSize;
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/chart2/XTitled.idl b/offapi/com/sun/star/chart2/XTitled.idl
index 3a5ec18..84d326b 100644
--- a/offapi/com/sun/star/chart2/XTitled.idl
+++ b/offapi/com/sun/star/chart2/XTitled.idl
@@ -20,7 +20,7 @@
 #define com_sun_star_chart2_XTitled_idl
 
 #include <com/sun/star/uno/XInterface.idl>
-#include <com/sun/star/chart2/XTitle.idl>
+#include <com/sun/star/chart2/XTitle2.idl>
 
 module com
 {
@@ -38,11 +38,11 @@ interface XTitled : ::com::sun::star::uno::XInterface
 {
     /** get the object holding the title's content and formatting
      */
-    XTitle getTitleObject();
+    XTitle2 getTitleObject();
 
     /** set a new title object replacing the former one
      */
-    void setTitleObject( [in] XTitle Title );
+    void setTitleObject( [in] XTitle2 Title );
 };
 
 } ; // chart2
diff --git a/oox/source/drawingml/chart/converterbase.cxx b/oox/source/drawingml/chart/converterbase.cxx
index 65d813d..67f0a68 100644
--- a/oox/source/drawingml/chart/converterbase.cxx
+++ b/oox/source/drawingml/chart/converterbase.cxx
@@ -26,6 +26,7 @@
 #include <com/sun/star/chart/XSecondAxisTitleSupplier.hpp>
 #include <com/sun/star/chart2/RelativePosition.hpp>
 #include <com/sun/star/chart2/RelativeSize.hpp>
+#include <com/sun/star/chart2/XTitle2.hpp>
 #include <com/sun/star/drawing/FillStyle.hpp>
 #include <com/sun/star/drawing/LineStyle.hpp>
 #include <com/sun/star/frame/XModel.hpp>
@@ -71,7 +72,7 @@ struct TitleLayoutInfo
 {
     typedef Reference< XShape > (*GetShapeFunc)( const Reference< cssc::XChartDocument >& );
 
-    Reference< XTitle > mxTitle;        /// The API title object.
+    Reference< XTitle2 > mxTitle;        /// The API title object.
     ModelRef< LayoutModel > mxLayout;   /// The layout model, if existing.
     GetShapeFunc        mpGetShape;     /// Helper function to receive the title shape.
 
@@ -89,9 +90,7 @@ void TitleLayoutInfo::convertTitlePos( ConverterRoot& rRoot, const Reference< cs
         // try to get the title shape
         Reference< XShape > xTitleShape( mpGetShape( rxChart1Doc ), UNO_SET_THROW );
         // get title rotation angle, needed for correction of position of top-left edge
-        double fAngle = 0.0;
-        PropertySet aTitleProp( mxTitle );
-        aTitleProp.getProperty( fAngle, PROP_TextRotation );
+        double fAngle = mxTitle->getTextRotation();
         // convert the position
         LayoutModel& rLayout = mxLayout.getOrCreate();
         LayoutConverter aLayoutConv( rRoot, rLayout );
@@ -271,7 +270,7 @@ ObjectFormatter& ConverterRoot::getFormatter() const
     return mxData->maFormatter;
 }
 
-void ConverterRoot::registerTitleLayout( const Reference< XTitle >& rxTitle,
+void ConverterRoot::registerTitleLayout( const Reference< XTitle2 >& rxTitle,
         const ModelRef< LayoutModel >& rxLayout, ObjectType eObjType, sal_Int32 nMainIdx, sal_Int32 nSubIdx )
 {
     OSL_ENSURE( rxTitle.is(), "ConverterRoot::registerTitleLayout - missing title object" );
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
index 32fb37f..c34ad9a 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -22,9 +22,9 @@
 #include <com/sun/star/chart/ChartLegendExpansion.hpp>
 #include <com/sun/star/chart2/FormattedString.hpp>
 #include <com/sun/star/chart2/LegendPosition.hpp>
+#include <com/sun/star/chart2/Title.hpp>
 #include <com/sun/star/chart2/XDiagram.hpp>
 #include <com/sun/star/chart2/XLegend.hpp>
-#include <com/sun/star/chart2/XTitle.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
 #include "oox/drawingml/textbody.hxx"
 #include "oox/drawingml/textparagraph.hxx"
@@ -152,7 +152,7 @@ void TitleConverter::convertFromModel( const Reference< XTitled >& rxTitled, con
         if( aStringSeq.hasElements() ) try
         {
             // create the title object and set the string data
-            Reference< XTitle > xTitle( createInstance( "com.sun.star.chart2.Title" ), UNO_QUERY_THROW );
+            Reference< XTitle2 > xTitle = Title::create( getComponentContext() );
             xTitle->setText( aStringSeq );
             rxTitled->setTitleObject( xTitle );
 
diff --git a/reportdesign/source/ui/inc/DataProviderHandler.hxx b/reportdesign/source/ui/inc/DataProviderHandler.hxx
index f24d1f5..7649b5e 100644
--- a/reportdesign/source/ui/inc/DataProviderHandler.hxx
+++ b/reportdesign/source/ui/inc/DataProviderHandler.hxx
@@ -95,7 +95,7 @@ namespace rptui
 
         bool impl_dialogLinkedFields_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
         bool impl_dialogChartType_nothrow( ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const;
-        void impl_updateChartTitle_throw(const ::com::sun::star::uno::Any& _aValue);
+        void impl_updateChartTitle_throw(const OUString& _aValue);
 
         // overload WeakComponentImplHelperBase::disposing()
         // This function is called upon disposing the component,
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index 72842e7..ae231f7 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -29,12 +29,12 @@
 #include <com/sun/star/inspection/PropertyLineElement.hpp>
 #include <com/sun/star/chart/ChartDataRowSource.hpp>
 #include <com/sun/star/chart2/FormattedString.hpp>
+#include <com/sun/star/chart2/Title.hpp>
 #include <com/sun/star/chart2/XDiagram.hpp>
 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
 #include <com/sun/star/chart2/XChartTypeContainer.hpp>
 #include <com/sun/star/chart2/XChartType.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
-#include <com/sun/star/chart2/XTitle.hpp>
 #include <com/sun/star/chart2/data/XDataReceiver.hpp>
 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
 #include <com/sun/star/report/XReportDefinition.hpp>
@@ -233,27 +233,22 @@ void SAL_CALL DataProviderHandler::setPropertyValue(const OUString & PropertyNam
     }
 }
 // -----------------------------------------------------------------------------
-void DataProviderHandler::impl_updateChartTitle_throw(const uno::Any& _aValue)
+void DataProviderHandler::impl_updateChartTitle_throw(const OUString& sStr)
 {
     uno::Reference<chart2::XTitled> xTitled(m_xChartModel,uno::UNO_QUERY);
     if ( xTitled.is() )
     {
-        uno::Reference<chart2::XTitle> xTitle = xTitled->getTitleObject();
+        uno::Reference<chart2::XTitle2> xTitle = xTitled->getTitleObject();
         if ( !xTitle.is() )
         {
-            xTitle.set(m_xContext->getServiceManager()->createInstanceWithContext(OUString("com.sun.star.chart2.Title"),m_xContext),uno::UNO_QUERY);
+            xTitle = chart2::Title::create(m_xContext);
             xTitled->setTitleObject(xTitle);
         }
-        if ( xTitle.is() )
-        {
-            uno::Reference< chart2::XFormattedString2> xFormatted = chart2::FormattedString::create(m_xContext);
-            OUString sStr;
-            _aValue >>= sStr;
-            xFormatted->setString(sStr);
-            uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs(1);
-            aArgs[0] = xFormatted;
-            xTitle->setText(aArgs);
-        }
+        uno::Reference< chart2::XFormattedString2> xFormatted = chart2::FormattedString::create(m_xContext);
+        xFormatted->setString(sStr);
+        uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs(1);
+        aArgs[0] = xFormatted;
+        xTitle->setText(aArgs);
     }
 }
 
@@ -468,7 +463,11 @@ void SAL_CALL DataProviderHandler::actuatingPropertyChanged(const OUString & Act
     else if ( ActuatingPropertyName == PROPERTY_TITLE )
     {
         if ( NewValue != OldValue )
-            impl_updateChartTitle_throw(NewValue);
+        {
+            OUString aStr;
+            NewValue >>= aStr;
+            impl_updateChartTitle_throw(aStr);
+        }
     }
     else
     {
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index e07d1d4..e36a147 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -47,6 +47,7 @@
 #include <com/sun/star/chart2/LinearScaling.hpp>
 #include <com/sun/star/chart2/PolarCoordinateSystem2d.hpp>
 #include <com/sun/star/chart2/PolarCoordinateSystem3d.hpp>
+#include <com/sun/star/chart2/Title.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/XDiagram.hpp>
 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
@@ -1145,9 +1146,9 @@ void XclImpChText::ConvertDataLabel( ScfPropertySet& rPropSet, const XclChTypeIn
     }
 }
 
-Reference< XTitle > XclImpChText::CreateTitle() const
+Reference< css::chart2::XTitle2 > XclImpChText::CreateTitle() const
 {
-    Reference< XTitle > xTitle;
+    Reference< css::chart2::XTitle2 > xTitle;
     if( mxSrcLink && mxSrcLink->HasString() )
     {
         // create the formatted strings
@@ -1156,16 +1157,13 @@ Reference< XTitle > XclImpChText::CreateTitle() const
         if( aStringSeq.hasElements() )
         {
             // create the title object
-            xTitle.set( ScfApiHelper::CreateInstance( SERVICE_CHART2_TITLE ), UNO_QUERY );
-            if( xTitle.is() )
-            {
-                // set the formatted strings
-                xTitle->setText( aStringSeq );
-                // more title formatting properties
-                ScfPropertySet aTitleProp( xTitle );
-                ConvertFrame( aTitleProp );
-                ConvertRotation( aTitleProp, true );
-            }
+            xTitle = css::chart2::Title::create( comphelper::getProcessComponentContext() );
+            // set the formatted strings
+            xTitle->setText( aStringSeq );
+            // more title formatting properties
+            ScfPropertySet aTitleProp( xTitle );
+            ConvertFrame( aTitleProp );
+            ConvertRotation( aTitleProp, true );
         }
     }
     return xTitle;
@@ -3747,7 +3745,7 @@ void XclImpChAxesSet::ConvertAxis(
             if( xChAxisTitle ) try
             {
                 Reference< XTitled > xTitled( xAxis, UNO_QUERY_THROW );
-                Reference< XTitle > xTitle( xChAxisTitle->CreateTitle(), UNO_SET_THROW );
+                Reference< css::chart2::XTitle2 > xTitle = xChAxisTitle->CreateTitle();
                 xTitled->setTitleObject( xTitle );
             }
             catch( Exception& )
@@ -3937,7 +3935,7 @@ void XclImpChChart::Convert( const Reference<XChartDocument>& xChartDoc,
     if( mxTitle ) try
     {
         Reference< XTitled > xTitled( xChartDoc, UNO_QUERY_THROW );
-        Reference< XTitle > xTitle( mxTitle->CreateTitle(), UNO_SET_THROW );
+        Reference< css::chart2::XTitle2 > xTitle = mxTitle->CreateTitle();
         xTitled->setTitleObject( xTitle );
     }
     catch( Exception& )
diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx
index c1a2cbc..6be2572 100644
--- a/sc/source/filter/inc/xichart.hxx
+++ b/sc/source/filter/inc/xichart.hxx
@@ -61,6 +61,7 @@ namespace com { namespace sun { namespace star {
         class XAxis;
         class XLegend;
         class XTitle;
+        class XTitle2;
         class XFormattedString;
         namespace data
         {
@@ -487,9 +488,6 @@ typedef boost::shared_ptr< XclImpChFont > XclImpChFontRef;
 class XclImpChText : public XclImpChGroupBase, public XclImpChFontBase, protected XclImpChRoot
 {
 public:
-    typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > XTitleRef;
-
-public:
     explicit            XclImpChText( const XclImpChRoot& rRoot );
 
     /** Reads the CHTEXT record (called by base class). */
@@ -531,7 +529,8 @@ public:
     /** Converts and writes all contained data to the passed data point label property set. */
     void                ConvertDataLabel( ScfPropertySet& rPropSet, const XclChTypeInfo& rTypeInfo ) const;
     /** Creates a title text object. */
-    XTitleRef           CreateTitle() const;
+    css::uno::Reference< css::chart2::XTitle2 >
+                        CreateTitle() const;
     /** Converts the manual position of the specified title */
     void                ConvertTitlePosition( const XclChTextKey& rTitleKey ) const;
 
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 2c3a594..4e3eb94 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -58,7 +58,6 @@ class XclRoot;
 #define SERVICE_CHART2_LINEARREGCURVE       "com.sun.star.chart2.LinearRegressionCurve"
 #define SERVICE_CHART2_LOGREGCURVE          "com.sun.star.chart2.LogarithmicRegressionCurve"
 #define SERVICE_CHART2_POTREGCURVE          "com.sun.star.chart2.PotentialRegressionCurve"
-#define SERVICE_CHART2_TITLE                "com.sun.star.chart2.Title"
 
 // property names
 #define EXC_CHPROP_ADDITIONALSHAPES         "AdditionalShapes"
commit f2bc5c6229e8e72feb3dd887b6d509e52d666c0c
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 17 14:34:07 2013 +0200

    fdo#46808, Convert various chart2:*Scaling services to new style
    
    Change-Id: I93294be4c822160e609ae6aab552edd64478e34b

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 796fff5..46055c9 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -80,10 +80,15 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/tree,\
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2,\
 	CartesianCoordinateSystem2d \
 	CartesianCoordinateSystem3d \
+	ExponentialScaling \
 	FormattedString \
+	LogarithmicScaling \
+	LinearScaling \
 	PolarCoordinateSystem2d \
 	PolarCoordinateSystem3d \
+	PowerScaling \
 	RegressionEquation \
+	Scaling \
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2/data,\
 	DatabaseDataProvider \
@@ -622,17 +627,12 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/chart2,
 	DataSeries \
 	Diagram \
 	ErrorBar \
-	ExponentialScaling \
 	GridProperties \
 	Legend \
-	LinearScaling \
-	LogarithmicScaling \
 	LogicTargetModel \
-	PowerScaling \
 	PropertyPool \
 	RegressionCurve \
 	RegressionCurveEquation \
-	Scaling \
 	StandardDiagramCreationParameters \
 	Title \
 ))
diff --git a/offapi/com/sun/star/chart2/ExponentialScaling.idl b/offapi/com/sun/star/chart2/ExponentialScaling.idl
index b22bef2..edd7406 100644
--- a/offapi/com/sun/star/chart2/ExponentialScaling.idl
+++ b/offapi/com/sun/star/chart2/ExponentialScaling.idl
@@ -19,7 +19,7 @@
 #ifndef com_sun_star_chart2_ExponentialScaling_idl
 #define com_sun_star_chart2_ExponentialScaling_idl
 
-#include <com/sun/star/chart2/Scaling.idl>
+#include <com/sun/star/chart2/XScaling.idl>
 
 
 module com {  module sun {  module star {  module chart2 {
@@ -31,10 +31,7 @@ module com {  module sun {  module star {  module chart2 {
     <p>If not mentioned explicitly, the base for the power function is
     10.0</p>
 */
-service ExponentialScaling
-{
-    service Scaling;
-};
+service ExponentialScaling : com::sun::star::chart2::XScaling;
 
 
 }; }; }; };
diff --git a/offapi/com/sun/star/chart2/LinearScaling.idl b/offapi/com/sun/star/chart2/LinearScaling.idl
index 4867ded..2c2e04d 100644
--- a/offapi/com/sun/star/chart2/LinearScaling.idl
+++ b/offapi/com/sun/star/chart2/LinearScaling.idl
@@ -19,7 +19,7 @@
 #ifndef com_sun_star_chart2_LinearScaling_idl
 #define com_sun_star_chart2_LinearScaling_idl
 
-#include <com/sun/star/chart2/Scaling.idl>
+#include <com/sun/star/chart2/XScaling.idl>
 
 
 module com {  module sun {  module star {  module chart2 {
@@ -32,10 +32,7 @@ module com {  module sun {  module star {  module chart2 {
     and <em>t</em> is 0.0, which means the transformation is an
     identical mapping.</p>
 */
-service LinearScaling
-{
-    service Scaling;
-};
+service LinearScaling : com::sun::star::chart2::XScaling;
 
 
 }; }; }; };
diff --git a/offapi/com/sun/star/chart2/LogarithmicScaling.idl b/offapi/com/sun/star/chart2/LogarithmicScaling.idl
index 55c871d..6be5207 100644
--- a/offapi/com/sun/star/chart2/LogarithmicScaling.idl
+++ b/offapi/com/sun/star/chart2/LogarithmicScaling.idl
@@ -19,7 +19,7 @@
 #ifndef com_sun_star_chart2_LogarithmicScaling_idl
 #define com_sun_star_chart2_LogarithmicScaling_idl
 
-#include <com/sun/star/chart2/Scaling.idl>
+#include <com/sun/star/chart2/XScaling.idl>
 
 
 module com {  module sun {  module star {  module chart2 {
@@ -30,10 +30,7 @@ module com {  module sun {  module star {  module chart2 {
     <p>If not mentioned explicitly, the base for the logarithm is
     10.0</p>
 */
-service LogarithmicScaling
-{
-    service Scaling;
-};
+service LogarithmicScaling : com::sun::star::chart2::XScaling;
 
 
 }; }; }; };
diff --git a/offapi/com/sun/star/chart2/PowerScaling.idl b/offapi/com/sun/star/chart2/PowerScaling.idl
index 1685e12..3f8111b 100644
--- a/offapi/com/sun/star/chart2/PowerScaling.idl
+++ b/offapi/com/sun/star/chart2/PowerScaling.idl
@@ -19,7 +19,7 @@
 #ifndef com_sun_star_chart2_PowerScaling_idl
 #define com_sun_star_chart2_PowerScaling_idl
 
-#include <com/sun/star/chart2/Scaling.idl>
+#include <com/sun/star/chart2/XScaling.idl>
 
 
 module com {  module sun {  module star {  module chart2 {
@@ -31,10 +31,7 @@ module com {  module sun {  module star {  module chart2 {
     <p>If not mentioned explicitly, the exponent for the power
     function is 10.0</p>
 */
-service PowerScaling
-{
-    service Scaling;
-};
+service PowerScaling : com::sun::star::chart2::XScaling;
 
 
 }; }; }; };
diff --git a/offapi/com/sun/star/chart2/Scaling.idl b/offapi/com/sun/star/chart2/Scaling.idl
index d7cd705..e68c523 100644
--- a/offapi/com/sun/star/chart2/Scaling.idl
+++ b/offapi/com/sun/star/chart2/Scaling.idl
@@ -27,12 +27,7 @@ module com {  module sun {  module star {  module chart2 {
 
 /** stateless service
 */
-service Scaling
-{
-    /** required interface
-    */
-    interface com::sun::star::chart2::XScaling;
-};
+service Scaling : com::sun::star::chart2::XScaling;
 
 
 }; }; }; };
diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx
index 4da69a8..1f725d6 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -27,6 +27,8 @@
 #include <com/sun/star/chart/TimeUnit.hpp>
 #include <com/sun/star/chart2/AxisType.hpp>
 #include <com/sun/star/chart2/TickmarkStyle.hpp>
+#include <com/sun/star/chart2/LinearScaling.hpp>
+#include <com/sun/star/chart2/LogarithmicScaling.hpp>
 #include <com/sun/star/chart2/XAxis.hpp>
 #include <com/sun/star/chart2/XCoordinateSystem.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
@@ -34,6 +36,7 @@
 #include "oox/drawingml/chart/titleconverter.hxx"
 #include "oox/drawingml/chart/typegroupconverter.hxx"
 #include "oox/drawingml/lineproperties.hxx"
+#include "comphelper/processfactory.hxx"
 
 namespace oox {
 namespace drawingml {
@@ -219,7 +222,7 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo
                 if( mrModel.mnTypeId == C_TOKEN( dateAx ) )
                 {
                     // scaling algorithm
-                    aScaleData.Scaling.set( createInstance( "com.sun.star.chart2.LinearScaling" ), UNO_QUERY );
+                    aScaleData.Scaling = LinearScaling::create( comphelper::getProcessComponentContext() );
                     // min/max
                     lclSetValueOrClearAny( aScaleData.Minimum, mrModel.mofMin );
                     lclSetValueOrClearAny( aScaleData.Maximum, mrModel.mofMax );
@@ -249,10 +252,10 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo
             {
                 // scaling algorithm
                 bool bLogScale = lclIsLogarithmicScale( mrModel );
-                OUString aScalingService = bLogScale ?
-                    OUString( "com.sun.star.chart2.LogarithmicScaling" ) :
-                    OUString( "com.sun.star.chart2.LinearScaling" );
-                aScaleData.Scaling.set( createInstance( aScalingService ), UNO_QUERY );
+                if( bLogScale )
+                    aScaleData.Scaling = LogarithmicScaling::create( comphelper::getProcessComponentContext() );
+                else
+                    aScaleData.Scaling = LinearScaling::create( comphelper::getProcessComponentContext() );
                 // min/max
                 lclSetValueOrClearAny( aScaleData.Minimum, mrModel.mofMin );
                 lclSetValueOrClearAny( aScaleData.Maximum, mrModel.mofMax );
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index 2df9da4..fa7df36 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -2750,7 +2750,7 @@ XclExpChValueRange::XclExpChValueRange( const XclExpChRoot& rRoot ) :
 void XclExpChValueRange::Convert( const ScaleData& rScaleData )
 {
     // scaling algorithm
-    bool bLogScale = ScfApiHelper::GetServiceName( rScaleData.Scaling ) == SERVICE_CHART2_LOGSCALING;
+    bool bLogScale = ScfApiHelper::GetServiceName( rScaleData.Scaling ) == "com.sun.star.chart2.LogarithmicScaling";
     ::set_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE, bLogScale );
 
     // min/max
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index e73b0da..e07d1d4 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -43,6 +43,8 @@
 #include <com/sun/star/chart2/CartesianCoordinateSystem2d.hpp>
 #include <com/sun/star/chart2/CartesianCoordinateSystem3d.hpp>
 #include <com/sun/star/chart2/FormattedString.hpp>
+#include <com/sun/star/chart2/LogarithmicScaling.hpp>
+#include <com/sun/star/chart2/LinearScaling.hpp>
 #include <com/sun/star/chart2/PolarCoordinateSystem2d.hpp>
 #include <com/sun/star/chart2/PolarCoordinateSystem3d.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
@@ -2982,7 +2984,7 @@ void XclImpChLabelRange::Convert( ScfPropertySet& rPropSet, ScaleData& rScaleDat
         /*  Chart2 requires axis type CATEGORY for automatic category/date axis
             (even if it is a date axis currently). */
         rScaleData.AxisType = rScaleData.AutoDateAxis ? cssc2::AxisType::CATEGORY : cssc2::AxisType::DATE;
-        rScaleData.Scaling.set( ScfApiHelper::CreateInstance( SERVICE_CHART2_LINEARSCALING ), UNO_QUERY );
+        rScaleData.Scaling = css::chart2::LinearScaling::create( comphelper::getProcessComponentContext() );
         /*  Min/max values depend on base time unit, they specify the number of
             days, months, or years starting from null date. */
         lclConvertTimeValue( GetRoot(), rScaleData.Minimum, maDateData.mnMinDate, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMIN ), maDateData.mnBaseUnit );
@@ -3066,8 +3068,10 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co
 {
     // scaling algorithm
     bool bLogScale = ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_LOGSCALE );
-    OUString aScalingService = bLogScale ? OUString( SERVICE_CHART2_LOGSCALING ) : OUString( SERVICE_CHART2_LINEARSCALING );
-    rScaleData.Scaling.set( ScfApiHelper::CreateInstance( aScalingService ), UNO_QUERY );
+    if( bLogScale )
+        rScaleData.Scaling = css::chart2::LogarithmicScaling::create( comphelper::getProcessComponentContext() );
+    else
+        rScaleData.Scaling = css::chart2::LinearScaling::create( comphelper::getProcessComponentContext() );
 
     // min/max
     lclSetExpValueOrClearAny( rScaleData.Minimum, maData.mfMin, bLogScale, ::get_flag( maData.mnFlags, EXC_CHVALUERANGE_AUTOMIN ) );
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 5ea9a7e..2c3a594 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -56,9 +56,7 @@ class XclRoot;
 #define SERVICE_CHART2_EXPREGCURVE          "com.sun.star.chart2.ExponentialRegressionCurve"
 #define SERVICE_CHART2_LEGEND               "com.sun.star.chart2.Legend"
 #define SERVICE_CHART2_LINEARREGCURVE       "com.sun.star.chart2.LinearRegressionCurve"
-#define SERVICE_CHART2_LINEARSCALING        "com.sun.star.chart2.LinearScaling"
 #define SERVICE_CHART2_LOGREGCURVE          "com.sun.star.chart2.LogarithmicRegressionCurve"
-#define SERVICE_CHART2_LOGSCALING           "com.sun.star.chart2.LogarithmicScaling"
 #define SERVICE_CHART2_POTREGCURVE          "com.sun.star.chart2.PotentialRegressionCurve"
 #define SERVICE_CHART2_TITLE                "com.sun.star.chart2.Title"
 
commit dfc49e043bf2efa7c07b8f89af1f64de2e7f7b0e
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 17 13:38:22 2013 +0200

    fdo#46808, GetStorageFromURL now takes an XComponentContext
    
    Change-Id: I300748914c913ecd9d433cb6f549a000717b538d

diff --git a/xmlsecurity/workben/signaturetest.cxx b/xmlsecurity/workben/signaturetest.cxx
index 754239c..676357f 100644
--- a/xmlsecurity/workben/signaturetest.cxx
+++ b/xmlsecurity/workben/signaturetest.cxx
@@ -284,7 +284,7 @@ IMPL_LINK_NOARG(MyWin, DigitalSignaturesWithServiceHdl)
 {
     OUString aDocFileName = maEditDOCFileName.GetText();
     uno::Reference < embed::XStorage > xStore = ::comphelper::OStorageHelper::GetStorageFromURL(
-            aDocFileName, embed::ElementModes::READWRITE, comphelper::getProcessServiceFactory() );
+            aDocFileName, embed::ElementModes::READWRITE, comphelper::getProcessComponentContext() );
 
     uno::Reference< security::XDocumentDigitalSignatures > xD(
         security::DocumentDigitalSignatures::createDefault(comphelper::getProcessComponentContext()) );
commit ee2e8d77fecd39d40182ca3985e801384650a93d
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 17 11:31:06 2013 +0200

    remove unnecessary macros
    
    Change-Id: Ie73092fa6fc4fa7a95900ef4ba772af0c27d0f39

diff --git a/svx/source/form/fmservs.cxx b/svx/source/form/fmservs.cxx
index b65bf8d..900a013 100644
--- a/svx/source/form/fmservs.cxx
+++ b/svx/source/form/fmservs.cxx
@@ -46,25 +46,11 @@ uno::Reference< uno::XInterface > SAL_CALL ImplName##_NewInstance_Impl(const uno
 namespace svxform
 {
 
-#define DECL_SELFAWARE_SERVICE( ClassName )                                    \
-    uno::Reference< uno::XInterface > SAL_CALL ClassName##_Create(             \
-                const uno::Reference< lang::XMultiServiceFactory >& );         \
-    OUString SAL_CALL ClassName##_GetImplementationName();                     \
-    uno::Sequence< OUString > SAL_CALL ClassName##_GetSupportedServiceNames(); \
-
-
-#define REGISTER_SELFAWARE_SERVICE( ClassName )                     \
-    xSingleFactory = ::cppu::createSingleFactory( xServiceFactory,  \
-                        ClassName##_GetImplementationName(),        \
-                        ClassName##_Create,                         \
-                        ClassName##_GetSupportedServiceNames()      \
-                     );                                             \
-    if ( xSingleFactory.is() )                                      \
-        xSet->insert( uno::makeAny( xSingleFactory ) );
-
-
     // ------------------------------------------------------------------------
-    DECL_SELFAWARE_SERVICE( OAddConditionDialog )
+    // declare selfaware service
+    uno::Reference< uno::XInterface > SAL_CALL OAddConditionDialog_Create( const uno::Reference< lang::XMultiServiceFactory >& );
+    OUString SAL_CALL OAddConditionDialog_GetImplementationName();
+    uno::Sequence< OUString > SAL_CALL OAddConditionDialog_GetSupportedServiceNames();
 
     // ------------------------------------------------------------------------
     void ImplSmartRegisterUnoServices()
@@ -85,8 +71,14 @@ namespace svxform
         REGISTER_SERVICE( LegacyFormController, OUString( "com.sun.star.form.FormController" ) );
 
         // ------------------------------------------------------------------------
-        // FormController
-        REGISTER_SELFAWARE_SERVICE( OAddConditionDialog );
+        // FormController - register selfaware service
+        xSingleFactory = ::cppu::createSingleFactory( xServiceFactory,
+                             OAddConditionDialog_GetImplementationName(),
+                             OAddConditionDialog_Create,
+                             OAddConditionDialog_GetSupportedServiceNames()
+                         );
+        if ( xSingleFactory.is() )
+            xSet->insert( uno::makeAny( xSingleFactory ) );
 
         // ------------------------------------------------------------------------
         // DBGridControl
commit 184c48ee7a4b1c5c6f19a3b9c71bdbc6472068f8
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 17 11:21:57 2013 +0200

    Remove unnecessary namespacing
    
    Change-Id: I0ea52709f9a77d928a6704797ebd5be4c375e964

diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 6d2c4b5..242ec24 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -1066,12 +1066,11 @@ SfxObjectShell* SfxObjectShell::CreateObject( const String& rServiceName, SfxObj
 {
     if ( rServiceName.Len() )
     {
-        ::com::sun::star::uno::Reference < ::com::sun::star::frame::XModel > xDoc(
-        ::comphelper::getProcessServiceFactory()->createInstance( rServiceName ), UNO_QUERY );
+        uno::Reference < frame::XModel > xDoc( ::comphelper::getProcessServiceFactory()->createInstance( rServiceName ), UNO_QUERY );
         if ( xDoc.is() )
         {
-            ::com::sun::star::uno::Reference < ::com::sun::star::lang::XUnoTunnel > xObj( xDoc, UNO_QUERY );
-            ::com::sun::star::uno::Sequence < sal_Int8 > aSeq( SvGlobalName( SFX_GLOBAL_CLASSID ).GetByteSequence() );
+            uno::Reference < lang::XUnoTunnel > xObj( xDoc, UNO_QUERY );
+            uno::Sequence < sal_Int8 > aSeq( SvGlobalName( SFX_GLOBAL_CLASSID ).GetByteSequence() );
             sal_Int64 nHandle = xObj->getSomething( aSeq );
             if ( nHandle )
             {
diff --git a/svx/source/form/fmservs.cxx b/svx/source/form/fmservs.cxx
index 1483468..b65bf8d 100644
--- a/svx/source/form/fmservs.cxx
+++ b/svx/source/form/fmservs.cxx
@@ -22,17 +22,19 @@
 #include <comphelper/processfactory.hxx>
 #include "fmservs.hxx"
 
+using namespace com::sun::star;
+
 // ------------------------------------------------------------------------
 #define DECL_SERVICE(ImplName)                      \
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_NewInstance_Impl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &) throw( ::com::sun::star::uno::Exception );
+uno::Reference< uno::XInterface > SAL_CALL ImplName##_NewInstance_Impl(const uno::Reference< lang::XMultiServiceFactory > &) throw( uno::Exception );
 
-#define REGISTER_SERVICE(ImplName, ServiceName)                         \
+#define REGISTER_SERVICE(ImplName, ServiceName)                     \
     sString = (ServiceName);                                        \
-    xSingleFactory = ::cppu::createSingleFactory(xServiceFactory,               \
-                        OUString(), ImplName##_NewInstance_Impl,             \
-                        ::com::sun::star::uno::Sequence< OUString>(&sString, 1));    \
-    if (xSingleFactory.is())                                            \
-        xSet->insert(::com::sun::star::uno::makeAny(xSingleFactory));
+    xSingleFactory = ::cppu::createSingleFactory(xServiceFactory,   \
+                        OUString(), ImplName##_NewInstance_Impl,    \
+                        uno::Sequence< OUString>(&sString, 1));     \
+    if (xSingleFactory.is())                                        \
+        xSet->insert(uno::makeAny(xSingleFactory));
 
 
     DECL_SERVICE( FmXGridControl )
@@ -44,11 +46,11 @@
 namespace svxform
 {
 
-#define DECL_SELFAWARE_SERVICE( ClassName )                     \
-    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ClassName##_Create(      \
-                const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );  \
-    OUString SAL_CALL ClassName##_GetImplementationName();                                           \
-    ::com::sun::star::uno::Sequence< OUString > SAL_CALL ClassName##_GetSupportedServiceNames();     \
+#define DECL_SELFAWARE_SERVICE( ClassName )                                    \
+    uno::Reference< uno::XInterface > SAL_CALL ClassName##_Create(             \
+                const uno::Reference< lang::XMultiServiceFactory >& );         \
+    OUString SAL_CALL ClassName##_GetImplementationName();                     \
+    uno::Sequence< OUString > SAL_CALL ClassName##_GetSupportedServiceNames(); \
 
 
 #define REGISTER_SELFAWARE_SERVICE( ClassName )                     \
@@ -58,7 +60,7 @@ namespace svxform
                         ClassName##_GetSupportedServiceNames()      \
                      );                                             \
     if ( xSingleFactory.is() )                                      \
-        xSet->insert( ::com::sun::star::uno::makeAny( xSingleFactory ) );
+        xSet->insert( uno::makeAny( xSingleFactory ) );
 
 
     // ------------------------------------------------------------------------
@@ -67,13 +69,13 @@ namespace svxform
     // ------------------------------------------------------------------------
     void ImplSmartRegisterUnoServices()
     {
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >  xServiceFactory(::comphelper::getProcessServiceFactory(), ::com::sun::star::uno::UNO_QUERY);
-        ::com::sun::star::uno::Reference< ::com::sun::star::container::XSet >  xSet(xServiceFactory, ::com::sun::star::uno::UNO_QUERY);
+        uno::Reference< lang::XMultiServiceFactory >  xServiceFactory(::comphelper::getProcessServiceFactory(), uno::UNO_QUERY);
+        uno::Reference< container::XSet >  xSet(xServiceFactory, uno::UNO_QUERY);
         if (!xSet.is())
             return;
 
-        ::com::sun::star::uno::Sequence< OUString> aServices;
-        ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory >  xSingleFactory;
+        uno::Sequence< OUString> aServices;
+        uno::Reference< lang::XSingleServiceFactory >  xSingleFactory;
 
         OUString sString;
 
commit 53d083213358b14b465f68339328252560cb1255
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 17 11:19:42 2013 +0200

    fix alignment in code
    
    Change-Id: I0272e46cf34b52f578810ad0d17f33dd78accdd3

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index f5e6a1b..a270154 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -570,15 +570,16 @@ sal_Bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName )
 
     try {
         uno::Sequence < beans::PropertyValue > aProps;
-          uno::Any aAny = m_pOwner->GetFilterConfiguration()->getByName( aFilterName );
-           if ( aAny >>= aProps )
-           {
-               sal_Int32 nPropertyCount = aProps.getLength();
-               for( sal_Int32 nProperty=0; nProperty < nPropertyCount; ++nProperty )
-                   if( aProps[nProperty].Name == "UIComponent" )
-                   {
+        uno::Any aAny = m_pOwner->GetFilterConfiguration()->getByName( aFilterName );
+        if ( aAny >>= aProps )
+        {
+            sal_Int32 nPropertyCount = aProps.getLength();
+            for( sal_Int32 nProperty=0; nProperty < nPropertyCount; ++nProperty )
+            {
+                if( aProps[nProperty].Name == "UIComponent" )
+                {
                     OUString aServiceName;
-                       aProps[nProperty].Value >>= aServiceName;
+                    aProps[nProperty].Value >>= aServiceName;
                     if( !aServiceName.isEmpty() )
                     {
                         uno::Reference< ui::dialogs::XExecutableDialog > xFilterDialog(
@@ -616,6 +617,7 @@ sal_Bool ModelData_Impl::ExecuteFilterDialog_Impl( const OUString& aFilterName )
 
                     break;
                 }
+            }
         }
     }
     catch( const container::NoSuchElementException& )
commit 5ab3015aaec7bea309721fcf04af06c8c1519fcb
Author: Noel Grandin <noel at peralex.com>
Date:   Mon May 20 13:54:20 2013 +0200

    fdo#46808, Clean up old usages of ExtToolkit
    
    This service no longer exists in LO, and no-one seems to know what
    this service was, so convert it to use the awt::Toolkit service,
    since that service returns the interface the code expects.
    
    Change-Id: I761effbd49a9a3a15ec9c8716c72d4220a3e987e

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 5bad05d..8e55c02 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -32,9 +32,10 @@
 #include "localizationmgr.hxx"
 #include "baside3.hxx"
 
-#include <com/sun/star/awt/XDialog.hpp>
+#include <com/sun/star/awt/Toolkit.hpp>
 #include <com/sun/star/awt/UnoControlDialog.hpp>
 #include <com/sun/star/awt/UnoControlDialogModel.hpp>
+#include <com/sun/star/awt/XDialog.hpp>
 #include <com/sun/star/resource/StringResource.hpp>
 #include <com/sun/star/util/XCloneable.hpp>
 #include <com/sun/star/util/NumberFormatsSupplier.hpp>
@@ -89,7 +90,6 @@ DlgEdHint::~DlgEdHint()
 
 void DlgEditor::ShowDialog()
 {
-    uno::Reference< lang::XMultiServiceFactory >  xMSF = getProcessServiceFactory();
     uno::Reference< uno::XComponentContext >  xContext = getProcessComponentContext();
 
     // create a dialog
@@ -137,7 +137,7 @@ void DlgEditor::ShowDialog()
     xDlg->setModel( xDlgMod );
 
     // create a peer
-    uno::Reference< awt::XToolkit> xToolkit( xMSF->createInstance( "com.sun.star.awt.ExtToolkit" ), uno::UNO_QUERY );
+    uno::Reference< awt::XToolkit> xToolkit = awt::Toolkit::create( xContext );
     xDlg->createPeer( xToolkit, rWindow.GetComponentInterface() );
 
     uno::Reference< awt::XDialog > xD( xDlg, uno::UNO_QUERY );
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 5487604..0d3c948 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -25,6 +25,7 @@
 
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/bootstrap.hxx>
+#include <com/sun/star/awt/Toolkit.hpp>
 #include <com/sun/star/awt/UnoControlDialogModel.hpp>
 #include <com/sun/star/bridge/XUnoUrlResolver.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -939,9 +940,6 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
     _prop->setPropertyValue(OUString::createFromAscii(_nam), any);
 #define _propGet(_prop,_nam) \
     _prop->getPropertyValue(OUString::createFromAscii(_nam));
-#define _InstCtx(_path,_ctx)\
-    rServiceManager->createInstanceWithContext(\
-    OUString::createFromAscii(_path),_ctx);
 #define _Insert(_cont,_nam,_obj) \
     any <<= _obj;\
     _cont->insertByName( OUString::createFromAscii(_nam), any );
@@ -1069,9 +1067,7 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
 
     dialog->setModel( xControlModel );
 
-    Reference< XInterface > toolkit = _InstCtx("com.sun.star.awt.ExtToolkit", rComponentContext);
-
-    Reference < XToolkit > xToolkit (toolkit,UNO_QUERY);
+    Reference < XToolkit > xToolkit = Toolkit::create( rComponentContext );
 
     dialog->setVisible( false );
     dialog->createPeer( xToolkit, NULL );
diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx
index 9466af0..c75cb81 100644
--- a/xmlscript/test/imexp.cxx
+++ b/xmlscript/test/imexp.cxx
@@ -34,6 +34,7 @@
 
 #include <vcl/svapp.hxx>
 
+#include <com/sun/star/awt/Toolkit.hpp>
 #include <com/sun/star/awt/UnoControlDialog.hpp>
 #include <com/sun/star/awt/UnoControlDialogModel.hpp>
 #include <com/sun/star/awt/XToolkit.hpp>
@@ -172,7 +173,7 @@ void MyApp::Main()
     {
         ::comphelper::setProcessServiceFactory( xMSF );
 
-        Reference< awt::XToolkit> xToolkit( xMSF->createInstance( "com.sun.star.awt.ExtToolkit" ), UNO_QUERY );
+        Reference< awt::XToolkit> xToolkit = awt::Toolkit::create( xContext );
 
         // import dialogs
         OString aParam1( OUStringToOString(
commit be50ad28f5bbdaeff527f646481ce263843c2401
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 16 16:17:14 2013 +0200

    fdo#46808, Convert awt::XUnoControlDialog to new style
    
    Change-Id: I40d2e2ddd92186a2ba22ebfbdda8367391e8d355

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index c4683f9..5bad05d 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -33,6 +33,7 @@
 #include "baside3.hxx"
 
 #include <com/sun/star/awt/XDialog.hpp>
+#include <com/sun/star/awt/UnoControlDialog.hpp>
 #include <com/sun/star/awt/UnoControlDialogModel.hpp>
 #include <com/sun/star/resource/StringResource.hpp>
 #include <com/sun/star/util/XCloneable.hpp>
@@ -89,9 +90,10 @@ DlgEdHint::~DlgEdHint()
 void DlgEditor::ShowDialog()
 {
     uno::Reference< lang::XMultiServiceFactory >  xMSF = getProcessServiceFactory();
+    uno::Reference< uno::XComponentContext >  xContext = getProcessComponentContext();
 
     // create a dialog
-    uno::Reference< awt::XControl > xDlg( xMSF->createInstance( "com.sun.star.awt.UnoControlDialog" ), uno::UNO_QUERY );
+    uno::Reference< awt::XUnoControlDialog > xDlg = awt::UnoControlDialog::create( xContext );
 
     // clone the dialog model
     uno::Reference< util::XCloneable > xC( m_xUnoControlDialogModel, uno::UNO_QUERY );
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 5847754..7b7ea19 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1607,7 +1607,7 @@ RTLFUNC(EqualUnoObjects)
     RTL_Impl_EqualUnoObjects( pBasic, rPar, bWrite );
 }
 
-// Instanciate "com.sun.star.awt.UnoControlDialog" on basis
+// Instantiate "com.sun.star.awt.UnoControlDialog" on basis
 // of a DialogLibrary entry: Convert from XML-ByteSequence
 // and attach events. Implemented in classes\eventatt.cxx
 void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite );
diff --git a/extensions/source/update/check/updatehdl.cxx b/extensions/source/update/check/updatehdl.cxx
index 22ddd5d..1852581 100644
--- a/extensions/source/update/check/updatehdl.cxx
+++ b/extensions/source/update/check/updatehdl.cxx
@@ -31,9 +31,10 @@
 
 #include <com/sun/star/style/VerticalAlignment.hpp>
 
-#include "com/sun/star/awt/UnoControlDialogModel.hpp"
 #include "com/sun/star/awt/ActionEvent.hpp"
 #include "com/sun/star/awt/PushButtonType.hpp"
+#include "com/sun/star/awt/UnoControlDialog.hpp"
+#include "com/sun/star/awt/UnoControlDialogModel.hpp"
 #include "com/sun/star/awt/VclWindowPeerAttribute.hpp"
 #include "com/sun/star/awt/WindowAttribute.hpp"
 #include "com/sun/star/awt/XButton.hpp"
@@ -1320,26 +1321,19 @@ void UpdateHandler::createDialog()
                             aProps);
     }
 
-    uno::Reference< lang::XMultiComponentFactory > xFactory( mxContext->getServiceManager(), uno::UNO_QUERY_THROW );
-    uno::Reference< awt::XControl > xControl(
-        xFactory->createInstanceWithContext( "com.sun.star.awt.UnoControlDialog", mxContext),
-        uno::UNO_QUERY_THROW );
+    uno::Reference< awt::XUnoControlDialog > xControl = awt::UnoControlDialog::create( mxContext );
     xControl->setModel( xControlModel );
 
     if ( mbVisible == false )
     {
-        uno::Reference< awt::XWindow > xWindow( xControl, uno::UNO_QUERY );
-
-        if ( xWindow.is() )
-            xWindow->setVisible( false );
+        xControl->setVisible( false );
     }
 
     xControl->createPeer( NULL, NULL );
     {
-        uno::Reference< awt::XControlContainer > xContainer (xControl, uno::UNO_QUERY);
         for ( int i = 0; i < HELP_BUTTON; i++ )
         {
-            uno::Reference< awt::XButton > xButton ( xContainer->getControl( msButtonIDs[i] ), uno::UNO_QUERY);
+            uno::Reference< awt::XButton > xButton ( xControl->getControl( msButtonIDs[i] ), uno::UNO_QUERY);
             if (xButton.is())
             {
                 xButton->setActionCommand( msButtonIDs[i] );
diff --git a/filter/source/t602/t602filter.cxx b/filter/source/t602/t602filter.cxx
index 0e2d6cf..5487604 100644
--- a/filter/source/t602/t602filter.cxx
+++ b/filter/source/t602/t602filter.cxx
@@ -31,6 +31,7 @@
 #include <com/sun/star/ucb/XSimpleFileAccess.hpp>
 #include <com/sun/star/text/XTextDocument.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
+#include <com/sun/star/awt/UnoControlDialog.hpp>
 #include <com/sun/star/awt/XControl.hpp>
 #include <com/sun/star/awt/XDialog.hpp>
 #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
@@ -1062,33 +1063,20 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
     _Insert(xNameCont, T602DLG_CODE_LB, ListBoxModel);
     _Insert(xNameCont, T602DLG_CODE_TXT, TextModel);
 
-    Reference< XInterface > dialog = _InstCtx("com.sun.star.awt.UnoControlDialog",rComponentContext);
+    Reference< XUnoControlDialog > dialog = UnoControlDialog::create(rComponentContext);
 
-    Reference < XControl > xControl (dialog,UNO_QUERY);
     Reference < XControlModel > xControlModel (rInstance,UNO_QUERY);
 
-    if(!xControl.is())
-        return sal_False;
-
-    xControl->setModel( xControlModel );
+    dialog->setModel( xControlModel );
 
     Reference< XInterface > toolkit = _InstCtx("com.sun.star.awt.ExtToolkit", rComponentContext);
 
     Reference < XToolkit > xToolkit (toolkit,UNO_QUERY);
-    Reference < XWindow > xWindow (xControl,UNO_QUERY);
-
-    if(!xWindow.is())
-        return sal_False;
 
-    xWindow->setVisible( false );
-    xControl->createPeer( xToolkit, NULL );
+    dialog->setVisible( false );
+    dialog->createPeer( xToolkit, NULL );
 
-    Reference < XDialog > xDialog (dialog,UNO_QUERY);
-
-    if(!xDialog.is())
-        return sal_False;
-
-    ret = ( xDialog->execute() != 0 );
+    ret = ( dialog->execute() != 0 );
     if ( ret ) {
 
         sal_Int16 tt = 0;
@@ -1107,9 +1095,7 @@ sal_Bool T602ImportFilterDialog::OptionsDlg()
         }
     }
 
-    Reference < XComponent > xComponent (dialog,UNO_QUERY);
-
-    xComponent->dispose();
+    Reference<XControl>(dialog)->dispose();
 
     return ret;
 }
diff --git a/include/toolkit/controls/dialogcontrol.hxx b/include/toolkit/controls/dialogcontrol.hxx
index 73d1c62..812bb3d 100644
--- a/include/toolkit/controls/dialogcontrol.hxx
+++ b/include/toolkit/controls/dialogcontrol.hxx
@@ -21,6 +21,7 @@
 #define TOOLKIT_DIALOG_CONTROL_HXX
 
 #include <toolkit/controls/controlmodelcontainerbase.hxx>
+#include <com/sun/star/awt/XUnoControlDialog.hpp>
 #include <com/sun/star/awt/XUnoControlDialogModel.hpp>
 #include <com/sun/star/awt/XTopWindow.hpp>
 #include <com/sun/star/awt/XDialog2.hpp>
@@ -32,6 +33,7 @@
 #include <toolkit/controls/unocontrolcontainer.hxx>
 #include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/implbase1.hxx>
+#include <cppuhelper/implbase2.hxx>
 #include <cppuhelper/implbase3.hxx>
 #include <list>
 
@@ -217,9 +219,8 @@ public:
 
 };
 
-typedef ::cppu::AggImplInheritanceHelper3   <   ControlContainerBase
-                                            ,   ::com::sun::star::awt::XTopWindow
-                                            ,   ::com::sun::star::awt::XDialog2
+typedef ::cppu::AggImplInheritanceHelper2   <   ControlContainerBase
+                                            ,   ::com::sun::star::awt::XUnoControlDialog
                                             ,   ::com::sun::star::awt::XWindowListener
                                             >   UnoDialogControl_Base;
 class UnoDialogControl : public UnoDialogControl_Base
@@ -268,6 +269,73 @@ public:
     // XModifyListener
     virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
 
+    // resolve some ambigous methods
+    virtual com::sun::star::uno::Reference<com::sun::star::awt::XWindowPeer> SAL_CALL getPeer() throw (com::sun::star::uno::RuntimeException)
+        { return UnoDialogControl_Base::ControlContainerBase::getPeer(); }
+    virtual void SAL_CALL addWindowListener(const com::sun::star::uno::Reference<com::sun::star::awt::XWindowListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::addWindowListener(p1); }
+    virtual com::sun::star::uno::Reference<com::sun::star::awt::XControlModel> SAL_CALL getModel() throw (com::sun::star::uno::RuntimeException)
+        { return UnoDialogControl_Base::ControlContainerBase::getModel(); }
+    virtual void SAL_CALL addEventListener(const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::addEventListener(p1); }
+    virtual void SAL_CALL removeEventListener(const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::removeEventListener(p1); }
+    virtual void SAL_CALL setContext(const com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::setContext(p1); }
+    virtual com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL getContext() throw (com::sun::star::uno::RuntimeException)
+        { return UnoDialogControl_Base::ControlContainerBase::getContext(); }
+    virtual com::sun::star::uno::Reference<com::sun::star::awt::XView> SAL_CALL getView() throw (com::sun::star::uno::RuntimeException)
+        { return UnoDialogControl_Base::ControlContainerBase::getView(); }
+    virtual void SAL_CALL setDesignMode(sal_Bool p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::setDesignMode(p1); }
+    virtual sal_Bool SAL_CALL isDesignMode() throw (com::sun::star::uno::RuntimeException)
+        { return UnoDialogControl_Base::ControlContainerBase::isDesignMode(); }
+    virtual sal_Bool SAL_CALL isTransparent() throw (com::sun::star::uno::RuntimeException)
+        { return UnoDialogControl_Base::ControlContainerBase::isTransparent(); }
+    virtual void SAL_CALL setPosSize(sal_Int32 p1, sal_Int32 p2, sal_Int32 p3, sal_Int32 p4, sal_Int16 p5) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::setPosSize(p1, p2, p3, p4, p5); }
+    virtual com::sun::star::awt::Rectangle SAL_CALL getPosSize() throw (com::sun::star::uno::RuntimeException)
+        { return UnoDialogControl_Base::ControlContainerBase::getPosSize(); }
+    virtual void SAL_CALL setVisible(sal_Bool p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::setVisible(p1); }
+    virtual void SAL_CALL setEnable(sal_Bool p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::setEnable(p1); }
+    virtual void SAL_CALL setFocus() throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::setFocus(); }
+    virtual void SAL_CALL removeWindowListener(const com::sun::star::uno::Reference<com::sun::star::awt::XWindowListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::removeWindowListener(p1); }
+    virtual void SAL_CALL addFocusListener(const com::sun::star::uno::Reference<com::sun::star::awt::XFocusListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::addFocusListener(p1); }
+    virtual void SAL_CALL removeFocusListener(const com::sun::star::uno::Reference<com::sun::star::awt::XFocusListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::removeFocusListener(p1); }
+    virtual void SAL_CALL addKeyListener(const com::sun::star::uno::Reference<com::sun::star::awt::XKeyListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::addKeyListener(p1); }
+    virtual void SAL_CALL removeKeyListener(const com::sun::star::uno::Reference<com::sun::star::awt::XKeyListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::removeKeyListener(p1); }
+    virtual void SAL_CALL addMouseListener(const com::sun::star::uno::Reference<com::sun::star::awt::XMouseListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::addMouseListener(p1); }
+    virtual void SAL_CALL removeMouseListener(const com::sun::star::uno::Reference<com::sun::star::awt::XMouseListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::removeMouseListener(p1); }
+    virtual void SAL_CALL addMouseMotionListener(const com::sun::star::uno::Reference<com::sun::star::awt::XMouseMotionListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::addMouseMotionListener(p1); }
+    virtual void SAL_CALL removeMouseMotionListener(const com::sun::star::uno::Reference<com::sun::star::awt::XMouseMotionListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::removeMouseMotionListener(p1); }
+    virtual void SAL_CALL addPaintListener(const com::sun::star::uno::Reference<com::sun::star::awt::XPaintListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::addPaintListener(p1); }
+    virtual void SAL_CALL removePaintListener(const com::sun::star::uno::Reference<com::sun::star::awt::XPaintListener>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::removePaintListener(p1); }
+    virtual void SAL_CALL setStatusText(const rtl::OUString& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::setStatusText(p1); }
+    virtual com::sun::star::uno::Sequence<com::sun::star::uno::Reference<com::sun::star::awt::XControl> > SAL_CALL getControls() throw (com::sun::star::uno::RuntimeException)
+        { return UnoDialogControl_Base::ControlContainerBase::getControls(); }
+    virtual com::sun::star::uno::Reference<com::sun::star::awt::XControl> SAL_CALL getControl(const rtl::OUString& p1) throw (com::sun::star::uno::RuntimeException)
+        { return UnoDialogControl_Base::ControlContainerBase::getControl(p1); }
+    virtual void SAL_CALL addControl(const rtl::OUString& p1, const com::sun::star::uno::Reference<com::sun::star::awt::XControl>& p2) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::addControl(p1, p2); }
+    virtual void SAL_CALL removeControl(const com::sun::star::uno::Reference<com::sun::star::awt::XControl>& p1) throw (com::sun::star::uno::RuntimeException)
+        { UnoDialogControl_Base::ControlContainerBase::removeControl(p1); }
+
+
     // ::com::sun::star::lang::XServiceInfo
     DECLIMPL_SERVICEINFO( UnoDialogControl, szServiceName2_UnoControlDialog )
 
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 0313680..796fff5 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt,\
 	PopupMenu \
 	TabController \
 	Toolkit \
+	UnoControlDialog \
 	UnoControlDialogModel \
 	UnoControlDialogModelProvider \
 ))
@@ -514,7 +515,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/awt,\
 	UnoControlCurrencyFieldModel \
 	UnoControlDateField \
 	UnoControlDateFieldModel \
-	UnoControlDialog \
 	UnoControlDialogElement \
 	UnoControlEdit \
 	UnoControlEditModel \
@@ -1874,6 +1874,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/awt,\
 	XTopWindowListener \
 	XUnitConversion \
 	XUnoControlContainer \
+	XUnoControlDialog \
 	XUnoControlDialogModel \
 	XUserInputInterception \
 	XVclContainer \
diff --git a/offapi/com/sun/star/awt/UnoControlDialog.idl b/offapi/com/sun/star/awt/UnoControlDialog.idl
index 4cc079e..67e0b79 100644
--- a/offapi/com/sun/star/awt/UnoControlDialog.idl
+++ b/offapi/com/sun/star/awt/UnoControlDialog.idl
@@ -19,28 +19,14 @@
 #ifndef __com_sun_star_awt_UnoControlDialog_idl__
 #define __com_sun_star_awt_UnoControlDialog_idl__
 
-#include <com/sun/star/awt/UnoControlContainer.idl>
+#include <com/sun/star/awt/XUnoControlDialog.idl>
 
-#include <com/sun/star/awt/XTopWindow.idl>
-
-#include <com/sun/star/awt/XDialog2.idl>
-
-
-
- module com {  module sun {  module star {  module awt {
+module com {  module sun {  module star {  module awt {
 
 
 /** specifies a dialog control.
  */
-published service UnoControlDialog
-{
-    service com::sun::star::awt::UnoControlContainer;
-
-    interface com::sun::star::awt::XTopWindow;
-
-    interface com::sun::star::awt::XDialog2;
-
-};
+published service UnoControlDialog : XUnoControlDialog;
 
 
 }; }; }; };
diff --git a/offapi/com/sun/star/awt/XUnoControlDialog.idl b/offapi/com/sun/star/awt/XUnoControlDialog.idl
new file mode 100644
index 0000000..3d513b7
--- /dev/null

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list