[Libreoffice-commits] core.git: 7 commits - chart2/source cui/source framework/inc framework/source linguistic/source offapi/com offapi/type_reference offapi/UnoApi_offapi.mk oox/source reportdesign/source sc/inc sc/source sw/source unotools/source vcl/source

Noel Grandin noel at peralex.com
Mon May 13 00:38:40 PDT 2013


 chart2/source/inc/FormattedStringHelper.hxx                |    4 
 chart2/source/model/main/FormattedString.hxx               |   69 +++--
 chart2/source/tools/FormattedStringHelper.cxx              |   14 -
 chart2/source/tools/TitleHelper.cxx                        |   36 +-
 chart2/source/view/inc/LegendEntryProvider.hxx             |    4 
 chart2/source/view/main/VLegend.cxx                        |    2 
 cui/source/customize/acccfg.cxx                            |   29 +-
 cui/source/customize/cfg.cxx                               |   31 +-
 cui/source/customize/cfgutil.cxx                           |   39 +--
 cui/source/customize/selector.cxx                          |   54 +---
 cui/source/inc/acccfg.hxx                                  |    2 
 cui/source/inc/cfgutil.hxx                                 |    6 
 cui/source/options/optpath.cxx                             |  150 +++++-------
 cui/source/tabpages/macroass.cxx                           |    2 
 framework/inc/services.h                                   |    4 
 framework/inc/services/pathsettings.hxx                    |  146 +++++++++++
 framework/source/accelerators/presethandler.cxx            |   22 -
 framework/source/services/pathsettings.cxx                 |   32 ++
 framework/source/uiconfiguration/uicategorydescription.cxx |    4 
 linguistic/source/misc2.cxx                                |   41 +--
 offapi/UnoApi_offapi.mk                                    |   17 +
 offapi/com/sun/star/chart2/CartesianCoordinateSystem2d.idl |   35 ++
 offapi/com/sun/star/chart2/CartesianCoordinateSystem3d.idl |   35 ++
 offapi/com/sun/star/chart2/FormattedString.idl             |   35 --
 offapi/com/sun/star/chart2/PolarCoordinateSystem2d.idl     |   35 ++
 offapi/com/sun/star/chart2/PolarCoordinateSystem3d.idl     |   35 ++
 offapi/com/sun/star/chart2/XFormattedString2.idl           |   48 +++
 offapi/com/sun/star/sheet/GlobalSheetSettings.idl          |  126 ----------
 offapi/com/sun/star/sheet/XGlobalSheetSettings.idl         |  161 +++++++++++++
 offapi/com/sun/star/ui/UICategoryDescription.idl           |   37 +-
 offapi/com/sun/star/util/PathSettings.idl                  |  111 --------
 offapi/com/sun/star/util/XPathSettings.idl                 |  138 +++++++++++
 offapi/type_reference/offapi.rdb                           |binary
 oox/source/drawingml/chart/titleconverter.cxx              |    6 
 oox/source/drawingml/chart/typegroupconverter.cxx          |   20 -
 reportdesign/source/ui/inspection/DataProviderHandler.cxx  |    6 
 sc/inc/appluno.hxx                                         |   94 +++++++
 sc/inc/xmlwrap.hxx                                         |    4 
 sc/source/filter/chart/chart_imp.cxx                       |    8 
 sc/source/filter/excel/xichart.cxx                         |   65 ++---
 sc/source/filter/ftools/fapihelper.cxx                     |   10 
 sc/source/filter/inc/fapihelper.hxx                        |   70 ++---
 sc/source/filter/inc/xlchart.hxx                           |    5 
 sc/source/filter/xml/xmlexprt.cxx                          |   37 +-
 sc/source/filter/xml/xmlwrap.cxx                           |   41 +--
 sc/source/ui/unoobj/appluno.cxx                            |   16 +
 sc/source/ui/vba/excelvbahelper.cxx                        |   15 -
 sc/source/ui/vba/vbaapplication.cxx                        |   35 +-
 sc/source/ui/vba/vbahelper.cxx                             |   23 -
 sw/source/ui/vba/vbaoptions.cxx                            |   10 
 sw/source/ui/vba/vbaoptions.hxx                            |    3 
 unotools/source/config/pathoptions.cxx                     |   20 -
 vcl/source/window/dialog.cxx                               |   11 
 53 files changed, 1206 insertions(+), 797 deletions(-)

New commits:
commit 49e422e58e3193f1614298eb61c756abb299330f
Author: Noel Grandin <noel at peralex.com>
Date:   Mon May 13 08:20:58 2013 +0200

    fdo#46808, Convert ui::UICategoryDescripion to new style
    
    Change-Id: I4fbba222b8429b5935c8e15c74d1670edd4fb303

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index fd8a03b..a5770f1 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -822,47 +822,46 @@ SfxAcceleratorConfigPage::~SfxAcceleratorConfigPage()
 void SfxAcceleratorConfigPage::InitAccCfg()
 {
     // already initialized ?
-    if (m_xSMGR.is())
+    if (m_xContext.is())
         return; // yes -> do nothing
 
     try
     {
         // no - initialize this instance
-        m_xSMGR = ::comphelper::getProcessServiceFactory();
+        m_xContext = ::comphelper::getProcessComponentContext();
 
-        m_xUICmdDescription = css::frame::UICommandDescription::create(
-                comphelper::getComponentContext(m_xSMGR));
+        m_xUICmdDescription = css::frame::UICommandDescription::create(m_xContext);
 
         // get the current active frame, which should be our "parent"
         // for this session
         m_xFrame = GetFrame();
         if ( !m_xFrame.is() )
         {
-            css::uno::Reference< css::frame::XDesktop2 > xDesktop = css::frame::Desktop::create( comphelper::getComponentContext(m_xSMGR) );
+            css::uno::Reference< css::frame::XDesktop2 > xDesktop = css::frame::Desktop::create( m_xContext );
             m_xFrame = xDesktop->getActiveFrame();
         }
 
         // identify module
-        css::uno::Reference< css::frame::XModuleManager2 > xModuleManager(
-                 css::frame::ModuleManager::create(comphelper::getComponentContext(m_xSMGR)));
+        css::uno::Reference< css::frame::XModuleManager2 > xModuleManager =
+                 css::frame::ModuleManager::create(m_xContext);
         m_sModuleLongName = xModuleManager->identify(m_xFrame);
         ::comphelper::SequenceAsHashMap lModuleProps(xModuleManager->getByName(m_sModuleLongName));
         m_sModuleShortName = lModuleProps.getUnpackedValueOrDefault(MODULEPROP_SHORTNAME, OUString());
         m_sModuleUIName    = lModuleProps.getUnpackedValueOrDefault(MODULEPROP_UINAME   , OUString());
 
         // get global accelerator configuration
-        m_xGlobal = css::ui::GlobalAcceleratorConfiguration::create(comphelper::getComponentContext(m_xSMGR));
+        m_xGlobal = css::ui::GlobalAcceleratorConfiguration::create(m_xContext);
 
         // get module accelerator configuration
 
-        css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(css::ui::ModuleUIConfigurationManagerSupplier::create(comphelper::getComponentContext(m_xSMGR)));
+        css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier( css::ui::ModuleUIConfigurationManagerSupplier::create(m_xContext) );
         css::uno::Reference< css::ui::XUIConfigurationManager > xUICfgManager = xModuleCfgSupplier->getUIConfigurationManager(m_sModuleLongName);
         m_xModule = css::uno::Reference< css::ui::XAcceleratorConfiguration >(xUICfgManager->getShortCutManager(), css::uno::UNO_QUERY_THROW);
     }
     catch(const css::uno::RuntimeException&)
         { throw; }
     catch(const css::uno::Exception&)
-        { m_xSMGR.clear(); }
+        { m_xContext.clear(); }
 }
 
 //-----------------------------------------------
@@ -1185,7 +1184,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, RadioHdl)
     aEntriesBox.SetUpdateMode( sal_True );
     aEntriesBox.Invalidate();
 
-     pGroupLBox->Init(m_xSMGR, m_xFrame, m_sModuleLongName);
+    pGroupLBox->Init(m_xContext, m_xFrame, m_sModuleLongName);
 
     // pb: #133213# do not select NULL entries
     SvTreeListEntry* pEntry = aEntriesBox.GetEntry( 0, 0 );
@@ -1231,7 +1230,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, LoadHdl)
         {
             // URL doesn't point to a loaded document, try to access it as a single storage
             // dont forget to release the storage afterwards!
-            css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory( css::embed::StorageFactory::create( comphelper::getComponentContext(m_xSMGR) ) );
+            css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory( css::embed::StorageFactory::create( m_xContext ) );
             css::uno::Sequence< css::uno::Any >                     lArgs(2);
             lArgs[0] <<= sCfgName;
             lArgs[1] <<= css::embed::ElementModes::READ;
@@ -1240,7 +1239,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, LoadHdl)
             css::uno::Reference< css::embed::XStorage > xUIConfig = xRootStorage->openStorageElement(FOLDERNAME_UICONFIG, css::embed::ElementModes::READ);
             if (xUIConfig.is())
             {
-                css::uno::Reference< css::ui::XUIConfigurationManager2 > xCfgMgr2 = css::ui::UIConfigurationManager::create( comphelper::getComponentContext(m_xSMGR) );
+                css::uno::Reference< css::ui::XUIConfigurationManager2 > xCfgMgr2 = css::ui::UIConfigurationManager::create( m_xContext );
                 xCfgMgr2->setStorage(xUIConfig);
                 xCfgMgr.set( xCfgMgr2, css::uno::UNO_QUERY_THROW );
             }
@@ -1314,7 +1313,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl)
         else
         {
             // URL doesn't point to a loaded document, try to access it as a single storage
-            css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory( css::embed::StorageFactory::create( comphelper::getComponentContext(m_xSMGR) ) );
+            css::uno::Reference< css::lang::XSingleServiceFactory > xStorageFactory( css::embed::StorageFactory::create( m_xContext ) );
             css::uno::Sequence< css::uno::Any >                     lArgs(2);
             lArgs[0] <<= sCfgName;
             lArgs[1] <<= css::embed::ElementModes::WRITE;
@@ -1336,7 +1335,7 @@ IMPL_LINK_NOARG(SfxAcceleratorConfigPage, SaveHdl)
             if (sMediaType.isEmpty())
                 xUIConfigProps->setPropertyValue(MEDIATYPE_PROPNAME, css::uno::makeAny(MEDIATYPE_UICONFIG));
 
-            css::uno::Reference< css::ui::XUIConfigurationManager2 > xCfgMgr2 = css::ui::UIConfigurationManager::create( comphelper::getComponentContext(m_xSMGR) );
+            css::uno::Reference< css::ui::XUIConfigurationManager2 > xCfgMgr2 = css::ui::UIConfigurationManager::create( m_xContext );
             xCfgMgr2->setStorage(xUIConfig);
             xCfgMgr.set( xCfgMgr2, css::uno::UNO_QUERY_THROW );
         }
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 2fce78c..98bec2a 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -20,22 +20,22 @@
 #include "cfgutil.hxx"
 
 #include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/container/XEnumeration.hpp>
+#include <com/sun/star/document/XScriptInvocationContext.hpp>
+#include <com/sun/star/frame/ModuleManager.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/frame/UICommandDescription.hpp>
 #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
-#include <com/sun/star/uno/RuntimeException.hpp>
-#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
-#include <com/sun/star/script/provider/XScriptProvider.hpp>
 #include <com/sun/star/script/browse/XBrowseNode.hpp>
 #include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
-
 #include <com/sun/star/script/browse/XBrowseNodeFactory.hpp>
 #include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
-#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/Desktop.hpp>
-#include <com/sun/star/container/XEnumerationAccess.hpp>
-#include <com/sun/star/container/XEnumeration.hpp>
-#include <com/sun/star/document/XScriptInvocationContext.hpp>
+#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
+#include <com/sun/star/script/provider/XScriptProvider.hpp>
 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
-#include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/ui/UICategoryDescription.hpp>
 
 #include "acccfg.hrc"
 #include "helpid.hrc"
@@ -66,8 +66,6 @@ using namespace ::com::sun::star::script;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::document;
 
-static OUString SERVICE_UICATEGORYDESCRIPTION ("com.sun.star.ui.UICategoryDescription");
-
 SfxStylesInfo_Impl::SfxStylesInfo_Impl()
 {}
 
@@ -540,23 +538,22 @@ namespace
 }
 
 //-----------------------------------------------
-void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR          ,
-                                      const css::uno::Reference< css::frame::XFrame >&              xFrame         ,
+void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
+                                      const css::uno::Reference< css::frame::XFrame >&          xFrame,
                                       const OUString&                                        sModuleLongName)
 {
     SetUpdateMode(sal_False);
     ClearAll(); // Remove all old entries from treelist box
 
     m_xFrame = xFrame;
-    if ( xSMGR.is())
+    if( xContext.is() )
     {
-        m_xSMGR           = xSMGR;
+        m_xContext        = xContext;
         m_sModuleLongName = sModuleLongName;
 
-        m_xGlobalCategoryInfo = css::uno::Reference< css::container::XNameAccess >(m_xSMGR->createInstance(SERVICE_UICATEGORYDESCRIPTION), css::uno::UNO_QUERY_THROW);
-        m_xModuleCategoryInfo = css::uno::Reference< css::container::XNameAccess >(m_xGlobalCategoryInfo->getByName(m_sModuleLongName)   , css::uno::UNO_QUERY_THROW);
-        m_xUICmdDescription   = css::frame::UICommandDescription::create(
-                ::comphelper::getComponentContext(m_xSMGR));
+        m_xGlobalCategoryInfo = css::ui::UICategoryDescription::create( m_xContext );
+        m_xModuleCategoryInfo = css::uno::Reference< css::container::XNameAccess >(m_xGlobalCategoryInfo->getByName(m_sModuleLongName), css::uno::UNO_QUERY_THROW);
+        m_xUICmdDescription   = css::frame::UICommandDescription::create( m_xContext );
 
         InitModule();
         InitBasic();
@@ -699,7 +696,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul
     }
 
     // add styles
-    if ( m_xSMGR.is() )
+    if ( m_xContext.is() )
     {
         String sStyle( pImp->m_aStrGroupStyles );
         SvTreeListEntry *pEntry = InsertEntry( sStyle, 0 );
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 9a8e5d0..89d0a76 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -37,22 +37,24 @@
 #include <comphelper/processfactory.hxx>
 
 #include <com/sun/star/beans/XPropertySet.hpp>
-#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
-#include <com/sun/star/script/provider/XScriptProvider.hpp>
-#include <com/sun/star/script/browse/XBrowseNode.hpp>
-#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
-#include <com/sun/star/script/browse/XBrowseNodeFactory.hpp>
-#include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
-#include <com/sun/star/frame/ModuleManager.hpp>
-#include <com/sun/star/frame/Desktop.hpp>
+#include <com/sun/star/container/XChild.hpp>
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #include <com/sun/star/container/XEnumeration.hpp>
 #include <com/sun/star/document/XEmbeddedScripts.hpp>
 #include <com/sun/star/document/XScriptInvocationContext.hpp>
+#include <com/sun/star/frame/ModuleManager.hpp>
+#include <com/sun/star/frame/Desktop.hpp>
 #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
 #include <com/sun/star/frame/DispatchInformation.hpp>
-#include <com/sun/star/container/XChild.hpp>
 #include <com/sun/star/frame/UICommandDescription.hpp>
+#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
+#include <com/sun/star/script/provider/XScriptProvider.hpp>
+#include <com/sun/star/script/browse/XBrowseNode.hpp>
+#include <com/sun/star/script/browse/BrowseNodeTypes.hpp>
+#include <com/sun/star/script/browse/XBrowseNodeFactory.hpp>
+#include <com/sun/star/script/browse/BrowseNodeFactoryViewTypes.hpp>
+#include <com/sun/star/ui/UICategoryDescription.hpp>
+
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -396,9 +398,6 @@ void SvxConfigGroupListBox::Init(bool bShowSlots, const Reference< frame::XFrame
     // are we showing builtin commands?
     if ( m_bShowSlots && m_xFrame.is() )
     {
-        Reference< lang::XMultiComponentFactory > xMCF =
-            xContext->getServiceManager();
-
         Reference< frame::XDispatchInformationProvider > xDIP(
             m_xFrame, UNO_QUERY );
 
@@ -414,34 +413,27 @@ void SvxConfigGroupListBox::Init(bool bShowSlots, const Reference< frame::XFrame
                 frame::UICommandDescription::create(xContext) );
         xNameAccess->getByName( aModuleId ) >>= m_xModuleCommands;
 
-        Reference< container::XNameAccess > xAllCategories(
-            xMCF->createInstanceWithContext(
-                OUString(
-                    "com.sun.star.ui.UICategoryDescription" ),
-                xContext ),
-            UNO_QUERY );
+        Reference< container::XNameAccess > xAllCategories =
+            ui::UICategoryDescription::create( xContext );
 
         Reference< container::XNameAccess > xModuleCategories;
-        if ( xAllCategories.is() )
+        if ( !aModuleId.isEmpty() )
         {
-            if ( !aModuleId.isEmpty() )
+            try
             {
-                try
-                {
-                    xModuleCategories = Reference< container::XNameAccess >(
-                           xAllCategories->getByName( aModuleId ), UNO_QUERY );
-                }
-                catch ( container::NoSuchElementException& )
-                {
-                }
+                xModuleCategories = Reference< container::XNameAccess >(
+                       xAllCategories->getByName( aModuleId ), UNO_QUERY );
             }
-
-            if ( !xModuleCategories.is() )
+            catch ( container::NoSuchElementException& )
             {
-                xModuleCategories = xAllCategories;
             }
         }
 
+         if ( !xModuleCategories.is() )
+         {
+             xModuleCategories = xAllCategories;
+         }
+
         if ( xModuleCategories.is() )
         {
             Sequence< sal_Int16 > gids =
diff --git a/cui/source/inc/acccfg.hxx b/cui/source/inc/acccfg.hxx
index 2354998..417a456 100644
--- a/cui/source/inc/acccfg.hxx
+++ b/cui/source/inc/acccfg.hxx
@@ -138,7 +138,7 @@ private:
     SfxStylesInfo_Impl              m_aStylesInfo;
     sal_Bool                        m_bStylesInfoInitialized;
 
-    css::uno::Reference< css::lang::XMultiServiceFactory >     m_xSMGR;
+    css::uno::Reference< css::uno::XComponentContext >     m_xContext;
     css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xGlobal;
     css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xModule;
     css::uno::Reference< css::ui::XAcceleratorConfiguration > m_xAct;
diff --git a/cui/source/inc/cfgutil.hxx b/cui/source/inc/cfgutil.hxx
index 66ea8db..609ef34 100644
--- a/cui/source/inc/cfgutil.hxx
+++ b/cui/source/inc/cfgutil.hxx
@@ -134,7 +134,7 @@ class SfxConfigGroupListBox_Impl : public SvTreeListBox
     sal_uLong                       nMode;
 
     OUString m_sModuleLongName;
-    css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
+    css::uno::Reference< css::uno::XComponentContext > m_xContext;
     css::uno::Reference< css::frame::XFrame > m_xFrame;
     css::uno::Reference< css::container::XNameAccess > m_xGlobalCategoryInfo;
     css::uno::Reference< css::container::XNameAccess > m_xModuleCategoryInfo;
@@ -172,8 +172,8 @@ public:
     ~SfxConfigGroupListBox_Impl();
     void                ClearAll();
 
-    void                Init(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR          ,
-                             const css::uno::Reference< css::frame::XFrame >&              xFrame         ,
+    void                Init(const css::uno::Reference< css::uno::XComponentContext >& xContext,
+                             const css::uno::Reference< css::frame::XFrame >&          xFrame,
                              const OUString&                                        sModuleLongName);
     void                SetFunctionListBox( SfxConfigFunctionListBox_Impl *pBox )
                         { pFunctionListBox = pBox; }
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index 92db6dd..084a171 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -424,7 +424,7 @@ void _SfxMacroTabPage::FillMacroList()
 {
     mpImpl->pGroupLB->Init(
         ::com::sun::star::uno::Reference<
-            ::com::sun::star::lang::XMultiServiceFactory >(),
+            ::com::sun::star::uno::XComponentContext >(),
         GetFrame(),
         OUString() );
 }
diff --git a/framework/inc/services.h b/framework/inc/services.h
index b77c0a6..810bc99 100644
--- a/framework/inc/services.h
+++ b/framework/inc/services.h
@@ -47,7 +47,6 @@ namespace framework{
 #define SERVICENAME_TOOLBARFACTORY                              DECLARE_ASCII("com.sun.star.ui.ToolBarFactory"               )
 #define SERVICENAME_LICENSE                                     SERVICENAME_JOB
 #define SERVICENAME_STATUSBARFACTORY                            DECLARE_ASCII("com.sun.star.ui.StatusBarFactory"             )
-#define SERVICENAME_UICATEGORYDESCRIPTION                       DECLARE_ASCII("com.sun.star.ui.UICategoryDescription"               )
 #define SERVICENAME_STATUSBARCONTROLLERFACTORY                  DECLARE_ASCII("com.sun.star.frame.StatusbarControllerFactory"       )
 #define SERVICENAME_STATUSBARCONTROLLER                         DECLARE_ASCII("com.sun.star.frame.StatusbarController"              )
 #define SERVICENAME_TABWINFACTORY                               DECLARE_ASCII("com.sun.star.frame.TabWindowFactory"                 )
@@ -106,7 +105,6 @@ namespace framework{
 #define IMPLEMENTATIONNAME_RECENTFILESMENUCONTROLLER            DECLARE_ASCII("com.sun.star.comp.framework.RecentFilesMenuController" )
 #define IMPLEMENTATIONNAME_STATUSBARFACTORY                     DECLARE_ASCII("com.sun.star.comp.framework.StatusBarFactory"        )
 #define IMPLEMENTATIONNAME_STATUSBARCONTROLLERFACTORY           DECLARE_ASCII("com.sun.star.comp.framework.StatusBarControllerFactory" )
-#define IMPLEMENTATIONNAME_UICATEGORYDESCRIPTION                DECLARE_ASCII("com.sun.star.comp.framework.UICategoryDescription"   )
 #define IMPLEMENTATIONNAME_APPDISPATCHPROVIDER                  DECLARE_ASCII("com.sun.star.comp.sfx2.AppDispatchProvider"          )
 #define IMPLEMENTATIONNAME_SESSIONLISTENER                      DECLARE_ASCII("com.sun.star.comp.frame.SessionListener"             )
 #define IMPLEMENTATIONNAME_HELPONSTARTUP                        DECLARE_ASCII("com.sun.star.comp.framework.HelpOnStartup"           )
diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx
index 78f97f4..84dec3b 100644
--- a/framework/source/uiconfiguration/uicategorydescription.cxx
+++ b/framework/source/uiconfiguration/uicategorydescription.cxx
@@ -415,6 +415,10 @@ void SAL_CALL ConfigurationAccess_UICategory::disposing( const EventObject& aEve
 //*****************************************************************************************************************
 //  XInterface, XTypeProvider, XServiceInfo
 //*****************************************************************************************************************
+
+#define SERVICENAME_UICATEGORYDESCRIPTION                       DECLARE_ASCII("com.sun.star.ui.UICategoryDescription"               )
+#define IMPLEMENTATIONNAME_UICATEGORYDESCRIPTION                DECLARE_ASCII("com.sun.star.comp.framework.UICategoryDescription"   )
+
 DEFINE_XSERVICEINFO_ONEINSTANCESERVICE_2  (   UICategoryDescription                   ,
                                             ::cppu::OWeakObject                     ,
                                             SERVICENAME_UICATEGORYDESCRIPTION       ,
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 05f7da2..f11dd38 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -395,6 +395,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/ui,\
     AddressBookSourceDialog \
 	GlobalAcceleratorConfiguration \
     ModuleUIConfigurationManagerSupplier \
+	UICategoryDescription \
 	UIConfigurationManager \
     UIElementFactoryManager \
 	WindowContentFactory \
@@ -1522,7 +1523,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/ui,\
 	ModuleUICommandDescription \
 	ModuleUIConfigurationManager \
 	ModuleWindowStateConfiguration \
-	UICategoryDescription \
 	UIElement \
 	UIElementFactory \
 	UIElementSettings \
diff --git a/offapi/com/sun/star/ui/UICategoryDescription.idl b/offapi/com/sun/star/ui/UICategoryDescription.idl
index a5a84a8..e058268 100644
--- a/offapi/com/sun/star/ui/UICategoryDescription.idl
+++ b/offapi/com/sun/star/ui/UICategoryDescription.idl
@@ -35,30 +35,23 @@ module com {  module sun {  module star {  module ui {
     implementations which provides all commands to a user.
     </p>
 
-    @since OOo 2.0
-*/
-
-
-service UICategoryDescription
-{
-    /** provides access to user interface command categories of the installed
-        modules.
-
-        <p>
-        To access the user interface command categories of a module, a unique
-        module specifier must be provided to
-        <member scope="com::sun::star::container">XNameAccess::getByName()</member>
-        function. The module specifier can be retrieved from the
-        <type scope="com::sun::star::frame">ModuleManager</type>
-        service. The interface provides references to
-        <type scope="com::sun:star::ui">ModuleUICommandDescription</type>.
-        </p>
+    Provides access to user interface command categories of the installed
+    modules.
 
-        @see com::sun::star::frame::ModuleManager
-    */
+    <p>
+    To access the user interface command categories of a module, a unique
+    module specifier must be provided to
+    <member scope="com::sun::star::container">XNameAccess::getByName()</member>
+    function. The module specifier can be retrieved from the
+    <type scope="com::sun::star::frame">ModuleManager</type>
+    service. The interface provides references to
+    <type scope="com::sun:star::ui">ModuleUICommandDescription</type>.
+    </p>
 
-    interface com::sun::star::container::XNameAccess;
-};
+    @see com::sun::star::frame::ModuleManager
+    @since OOo 2.0
+*/
+service UICategoryDescription : com::sun::star::container::XNameAccess;
 
 }; }; }; }; // com.sun.star.ui
 
commit 088e86b865062dd4cc5ba0c85c6068dea62238db
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 9 14:03:18 2013 +0200

    fdo#46808, Convert some chart2 services to new style
    
    The services already existed, they just needed IDL files
    
    Change-Id: Ia7bdae932c5fb4b47d23afd2bb0756ecc9cbf6f7

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index b500e72..05f7da2 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -76,7 +76,11 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/tree,\
 	TreeControl \
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2,\
+	CartesianCoordinateSystem2d \
+	CartesianCoordinateSystem3d \
 	FormattedString \
+	PolarCoordinateSystem2d \
+	PolarCoordinateSystem3d \
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2/data,\
 	DatabaseDataProvider \
diff --git a/offapi/com/sun/star/chart2/CartesianCoordinateSystem2d.idl b/offapi/com/sun/star/chart2/CartesianCoordinateSystem2d.idl
new file mode 100644
index 0000000..c547575
--- /dev/null
+++ b/offapi/com/sun/star/chart2/CartesianCoordinateSystem2d.idl
@@ -0,0 +1,35 @@
+/* -*- 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_CartesianCoordinateSystem2d_idl
+#define com_sun_star_chart2_CartesianCoordinateSystem2d_idl
+
+#include <com/sun/star/chart2/XCoordinateSystem.idl>
+
+module com { module sun { module star { module chart2 {
+
+/**
+    @since LibreOffice 4.1
+ */
+service CartesianCoordinateSystem2d : XCoordinateSystem;
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/chart2/CartesianCoordinateSystem3d.idl b/offapi/com/sun/star/chart2/CartesianCoordinateSystem3d.idl
new file mode 100644
index 0000000..05f4752
--- /dev/null
+++ b/offapi/com/sun/star/chart2/CartesianCoordinateSystem3d.idl
@@ -0,0 +1,35 @@
+/* -*- 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_CartesianCoordinateSystem3d_idl
+#define com_sun_star_chart2_CartesianCoordinateSystem3d_idl
+
+#include <com/sun/star/chart2/XCoordinateSystem.idl>
+
+module com { module sun { module star { module chart2 {
+
+/**
+    @since LibreOffice 4.1
+ */
+service CartesianCoordinateSystem3d : XCoordinateSystem;
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/chart2/PolarCoordinateSystem2d.idl b/offapi/com/sun/star/chart2/PolarCoordinateSystem2d.idl
new file mode 100644
index 0000000..1459784
--- /dev/null
+++ b/offapi/com/sun/star/chart2/PolarCoordinateSystem2d.idl
@@ -0,0 +1,35 @@
+/* -*- 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_PolarCoordinateSystem2d_idl
+#define com_sun_star_chart2_PolarCoordinateSystem2d_idl
+
+#include <com/sun/star/chart2/XCoordinateSystem.idl>
+
+module com { module sun { module star { module chart2 {
+
+/**
+    @since LibreOffice 4.1
+ */
+service PolarCoordinateSystem2d : XCoordinateSystem;
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/chart2/PolarCoordinateSystem3d.idl b/offapi/com/sun/star/chart2/PolarCoordinateSystem3d.idl
new file mode 100644
index 0000000..afbdf5d
--- /dev/null
+++ b/offapi/com/sun/star/chart2/PolarCoordinateSystem3d.idl
@@ -0,0 +1,35 @@
+/* -*- 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_PolarCoordinateSystem3d_idl
+#define com_sun_star_chart2_PolarCoordinateSystem3d_idl
+
+#include <com/sun/star/chart2/XCoordinateSystem.idl>
+
+module com { module sun { module star { module chart2 {
+
+/**
+    @since LibreOffice 4.1
+ */
+service PolarCoordinateSystem3d : XCoordinateSystem;
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
index 7f996bf..12d086d 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -20,6 +20,10 @@
 #include "oox/drawingml/chart/typegroupconverter.hxx"
 
 #include <com/sun/star/chart/DataLabelPlacement.hpp>
+#include <com/sun/star/chart2/CartesianCoordinateSystem2d.hpp>
+#include <com/sun/star/chart2/CartesianCoordinateSystem3d.hpp>
+#include <com/sun/star/chart2/PolarCoordinateSystem2d.hpp>
+#include <com/sun/star/chart2/PolarCoordinateSystem3d.hpp>
 #include <com/sun/star/chart2/CurveStyle.hpp>
 #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
 #include <com/sun/star/chart2/StackingDirection.hpp>
@@ -238,26 +242,24 @@ OUString TypeGroupConverter::getSingleSeriesTitle() const
 
 Reference< XCoordinateSystem > TypeGroupConverter::createCoordinateSystem()
 {
-    // find service name for coordinate system
-    OUString aServiceName;
+    // create the coordinate system object
+    Reference< css::uno::XComponentContext > xContext = getComponentContext();
+    Reference< XCoordinateSystem > xCoordSystem;
     if( maTypeInfo.mbPolarCoordSystem )
     {
         if( mb3dChart )
-            aServiceName = "com.sun.star.chart2.PolarCoordinateSystem3d";
+            xCoordSystem = css::chart2::PolarCoordinateSystem2d::create(xContext);
         else
-            aServiceName = "com.sun.star.chart2.PolarCoordinateSystem2d";
+            xCoordSystem = css::chart2::PolarCoordinateSystem3d::create(xContext);
     }
     else
     {
         if( mb3dChart )
-            aServiceName = "com.sun.star.chart2.CartesianCoordinateSystem3d";
+            xCoordSystem = css::chart2::CartesianCoordinateSystem3d::create(xContext);
         else
-            aServiceName = "com.sun.star.chart2.CartesianCoordinateSystem2d";
+            xCoordSystem = css::chart2::CartesianCoordinateSystem2d::create(xContext);
     }
 
-    // create the coordinate system object
-    Reference< XCoordinateSystem > xCoordSystem( createInstance( aServiceName ), UNO_QUERY );
-
     // swap X and Y axis
     if( maTypeInfo.mbSwappedAxesSet )
     {
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 50d36d2..e73b0da 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -37,7 +37,14 @@
 #include <com/sun/star/chart/TimeUnit.hpp>
 #include <com/sun/star/chart/XChartDocument.hpp>
 #include <com/sun/star/chart/XDiagramPositioning.hpp>
+#include <com/sun/star/chart/DataLabelPlacement.hpp>
+#include <com/sun/star/chart/ErrorBarStyle.hpp>
+#include <com/sun/star/chart/MissingValueTreatment.hpp>
+#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/PolarCoordinateSystem2d.hpp>
+#include <com/sun/star/chart2/PolarCoordinateSystem3d.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/XDiagram.hpp>
 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
@@ -45,9 +52,6 @@
 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
 #include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
-#include <com/sun/star/chart2/data/XDataProvider.hpp>
-#include <com/sun/star/chart2/data/XDataReceiver.hpp>
-#include <com/sun/star/chart2/data/XDataSink.hpp>
 #include <com/sun/star/chart2/AxisType.hpp>
 #include <com/sun/star/chart2/CurveStyle.hpp>
 #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
@@ -57,10 +61,10 @@
 #include <com/sun/star/chart2/TickmarkStyle.hpp>
 #include <com/sun/star/chart2/RelativePosition.hpp>
 #include <com/sun/star/chart2/RelativeSize.hpp>
+#include <com/sun/star/chart2/data/XDataProvider.hpp>
+#include <com/sun/star/chart2/data/XDataReceiver.hpp>
+#include <com/sun/star/chart2/data/XDataSink.hpp>
 #include <com/sun/star/chart2/data/LabeledDataSequence.hpp>
-#include <com/sun/star/chart/DataLabelPlacement.hpp>
-#include <com/sun/star/chart/ErrorBarStyle.hpp>
-#include <com/sun/star/chart/MissingValueTreatment.hpp>
 
 #include <sfx2/objsh.hxx>
 #include <svx/svdpage.hxx>
@@ -2316,26 +2320,24 @@ bool XclImpChType::HasCategoryLabels() const
 
 Reference< XCoordinateSystem > XclImpChType::CreateCoordSystem( bool b3dChart ) const
 {
-    // service name
-    OUString aCoordSysService;
+    // create the coordinate system object
+    Reference< css::uno::XComponentContext > xContext = comphelper::getProcessComponentContext();
+    Reference< XCoordinateSystem > xCoordSystem;
     if( maTypeInfo.mbPolarCoordSystem )
     {
         if( b3dChart )
-            aCoordSysService = SERVICE_CHART2_POLARCOORDSYS3D;
+            xCoordSystem = css::chart2::PolarCoordinateSystem2d::create(xContext);
         else
-            aCoordSysService = SERVICE_CHART2_POLARCOORDSYS2D;
+            xCoordSystem = css::chart2::PolarCoordinateSystem3d::create(xContext);
     }
     else
     {
         if( b3dChart )
-            aCoordSysService = SERVICE_CHART2_CARTESIANCOORDSYS3D;
+            xCoordSystem = css::chart2::CartesianCoordinateSystem3d::create(xContext);
         else
-            aCoordSysService = SERVICE_CHART2_CARTESIANCOORDSYS2D;
+            xCoordSystem = css::chart2::CartesianCoordinateSystem2d::create(xContext);
     }
 
-    // create the coordinate system object
-    Reference< XCoordinateSystem > xCoordSystem( ScfApiHelper::CreateInstance( aCoordSysService ), UNO_QUERY );
-
     // swap X and Y axis
     if( maTypeInfo.mbSwappedAxesSet )
     {
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 9743bee..5ea9a7e 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -49,8 +49,6 @@ class XclRoot;
 #define SERVICE_DRAWING_HATCHTABLE          "com.sun.star.drawing.HatchTable"
 
 #define SERVICE_CHART2_AXIS                 "com.sun.star.chart2.Axis"
-#define SERVICE_CHART2_CARTESIANCOORDSYS2D  "com.sun.star.chart2.CartesianCoordinateSystem2d"
-#define SERVICE_CHART2_CARTESIANCOORDSYS3D  "com.sun.star.chart2.CartesianCoordinateSystem3d"
 #define SERVICE_CHART2_DATAPROVIDER         "com.sun.star.chart2.data.DataProvider"
 #define SERVICE_CHART2_DATASERIES           "com.sun.star.chart2.DataSeries"
 #define SERVICE_CHART2_DIAGRAM              "com.sun.star.chart2.Diagram"
@@ -61,8 +59,6 @@ class XclRoot;
 #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_POLARCOORDSYS2D      "com.sun.star.chart2.PolarCoordinateSystem2d"
-#define SERVICE_CHART2_POLARCOORDSYS3D      "com.sun.star.chart2.PolarCoordinateSystem3d"
 #define SERVICE_CHART2_POTREGCURVE          "com.sun.star.chart2.PotentialRegressionCurve"
 #define SERVICE_CHART2_TITLE                "com.sun.star.chart2.Title"
 
commit 5d1ad167294878789e644452f23ef883af93fe87
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 9 11:12:06 2013 +0200

    fdo#46808 Convert chart2::FormattedString service to new style
    
    API CHANGE: dropped the following services from the new unified
    interface because the current service does not implement them.
        service ::com::sun::star::style::CharacterProperties;
        [optional] service ::com::sun::star::style::CharacterPropertiesAsian;
        [optional] service ::com::sun::star::style::CharacterPropertiesComplex;
    
    Change-Id: I7cb6a5d4e998975b1272f4f4da03feea30cd30b6

diff --git a/chart2/source/inc/FormattedStringHelper.hxx b/chart2/source/inc/FormattedStringHelper.hxx
index 0dadc93..cd24645 100644
--- a/chart2/source/inc/FormattedStringHelper.hxx
+++ b/chart2/source/inc/FormattedStringHelper.hxx
@@ -19,7 +19,7 @@
 #ifndef _CHART2_TOOLS_FORMATTEDSTRINGHELPER_HXX
 #define _CHART2_TOOLS_FORMATTEDSTRINGHELPER_HXX
 
-#include <com/sun/star/chart2/XFormattedString.hpp>
+#include <com/sun/star/chart2/XFormattedString2.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 #include "charttoolsdllapi.hxx"
@@ -34,7 +34,7 @@ class OOO_DLLPUBLIC_CHARTTOOLS FormattedStringHelper
 public:
     static ::com::sun::star::uno::Sequence<
             ::com::sun::star::uno::Reference<
-                    ::com::sun::star::chart2::XFormattedString > >
+                    ::com::sun::star::chart2::XFormattedString2 > >
             createFormattedStringSequence(
                      const ::com::sun::star::uno::Reference<
                         ::com::sun::star::uno::XComponentContext > & xContext
diff --git a/chart2/source/model/main/FormattedString.hxx b/chart2/source/model/main/FormattedString.hxx
index c88fff0..90f864b 100644
--- a/chart2/source/model/main/FormattedString.hxx
+++ b/chart2/source/model/main/FormattedString.hxx
@@ -26,7 +26,7 @@
 #include "ServiceMacros.hxx"
 #include "ModifyListenerHelper.hxx"
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/chart2/XFormattedString.hpp>
+#include <com/sun/star/chart2/XFormattedString2.hpp>
 #include <com/sun/star/util/XCloneable.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
 
@@ -36,11 +36,11 @@ namespace chart
 namespace impl
 {
 typedef ::cppu::WeakImplHelper5<
-    ::com::sun::star::chart2::XFormattedString,
-    ::com::sun::star::lang::XServiceInfo,
-    ::com::sun::star::util::XCloneable,
-    ::com::sun::star::util::XModifyBroadcaster,
-    ::com::sun::star::util::XModifyListener >
+    ::css::chart2::XFormattedString2,
+    ::css::lang::XServiceInfo,
+    ::css::util::XCloneable,
+    ::css::util::XModifyBroadcaster,
+    ::css::util::XModifyListener >
     FormattedString_Base;
 }
 
@@ -50,8 +50,8 @@ class FormattedString :
     public ::property::OPropertySet
 {
 public:
-    FormattedString( ::com::sun::star::uno::Reference<
-           ::com::sun::star::uno::XComponentContext > const & xContext );
+    FormattedString( ::css::uno::Reference<
+           ::css::uno::XComponentContext > const & xContext );
     virtual ~FormattedString();
 
     /// declare XServiceInfo methods
@@ -60,52 +60,67 @@ public:
     APPHELPER_SERVICE_FACTORY_HELPER( FormattedString )
 
     /// merge XInterface implementations
-     DECLARE_XINTERFACE()
+    DECLARE_XINTERFACE()
     /// merge XTypeProvider implementations
-     DECLARE_XTYPEPROVIDER()
+    DECLARE_XTYPEPROVIDER()
+
+
+    virtual void SAL_CALL setPropertyValue(const OUString& p1, const css::uno::Any& p2) throw (css::uno::RuntimeException)
+        { ::property::OPropertySet::setPropertyValue(p1, p2); }
+    virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& p1) throw (css::uno::RuntimeException)
+        { return ::property::OPropertySet::getPropertyValue(p1); }
+    virtual void SAL_CALL addPropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) throw (css::uno::RuntimeException)
+        { ::property::OPropertySet::addPropertyChangeListener(p1, p2); }
+    virtual void SAL_CALL removePropertyChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XPropertyChangeListener>& p2) throw (css::uno::RuntimeException)
+        { ::property::OPropertySet::removePropertyChangeListener(p1, p2); }
+    virtual void SAL_CALL addVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) throw (css::uno::RuntimeException)
+        { ::property::OPropertySet::addVetoableChangeListener(p1, p2); }
+    virtual void SAL_CALL removeVetoableChangeListener(const OUString& p1, const css::uno::Reference<css::beans::XVetoableChangeListener>& p2) throw (css::uno::RuntimeException)
+        { ::property::OPropertySet::removeVetoableChangeListener(p1, p2); }
+
 
 protected:
     explicit FormattedString( const FormattedString & rOther );
 
     // ____ XFormattedString ____
     virtual OUString SAL_CALL getString()
-        throw (::com::sun::star::uno::RuntimeException);
+        throw (::css::uno::RuntimeException);
     virtual void SAL_CALL setString( const OUString& String )
-        throw (::com::sun::star::uno::RuntimeException);
+        throw (::css::uno::RuntimeException);
 
     // ____ OPropertySet ____
-    virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
-        throw(::com::sun::star::beans::UnknownPropertyException);
+    virtual ::css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
+        throw(::css::beans::UnknownPropertyException);
 
     // ____ OPropertySet ____
     virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
 
     // ____ XPropertySet ____
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
+    virtual ::css::uno::Reference< ::css::beans::XPropertySetInfo > SAL_CALL
         getPropertySetInfo()
-        throw (::com::sun::star::uno::RuntimeException);
+        throw (::css::uno::RuntimeException);
 
     // ____ XCloneable ____
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
-        throw (::com::sun::star::uno::RuntimeException);
+    virtual ::css::uno::Reference< ::css::util::XCloneable > SAL_CALL createClone()
+        throw (::css::uno::RuntimeException);
 
     // ____ XModifyBroadcaster ____
     virtual void SAL_CALL addModifyListener(
-        const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
-        throw (::com::sun::star::uno::RuntimeException);
+        const ::css::uno::Reference< ::css::util::XModifyListener >& aListener )
+        throw (::css::uno::RuntimeException);
     virtual void SAL_CALL removeModifyListener(
-        const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
-        throw (::com::sun::star::uno::RuntimeException);
+        const ::css::uno::Reference< ::css::util::XModifyListener >& aListener )
+        throw (::css::uno::RuntimeException);
 
     // ____ XModifyListener ____
     virtual void SAL_CALL modified(
-        const ::com::sun::star::lang::EventObject& aEvent )
-        throw (::com::sun::star::uno::RuntimeException);
+        const ::css::lang::EventObject& aEvent )
+        throw (::css::uno::RuntimeException);
 
     // ____ XEventListener (base of XModifyListener) ____
     virtual void SAL_CALL disposing(
-        const ::com::sun::star::lang::EventObject& Source )
-        throw (::com::sun::star::uno::RuntimeException);
+        const ::css::lang::EventObject& Source )
+        throw (::css::uno::RuntimeException);
 
     // ____ OPropertySet ____
     virtual void firePropertyChangeEvent();
@@ -116,7 +131,7 @@ protected:
 private:
     OUString m_aString;
 
-    ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
+    ::css::uno::Reference< ::css::util::XModifyListener > m_xModifyEventForwarder;
 };
 
 } //  namespace chart
diff --git a/chart2/source/tools/FormattedStringHelper.cxx b/chart2/source/tools/FormattedStringHelper.cxx
index 82ad239..f3a2644 100644
--- a/chart2/source/tools/FormattedStringHelper.cxx
+++ b/chart2/source/tools/FormattedStringHelper.cxx
@@ -21,6 +21,7 @@
 #include "FormattedStringHelper.hxx"
 #include "macros.hxx"
 #include "PropertyHelper.hxx"
+#include <com/sun/star/chart2/FormattedString.hpp>
 
 //.............................................................................
 namespace chart
@@ -32,27 +33,24 @@ using namespace ::com::sun::star::chart2;
 using ::com::sun::star::uno::Reference;
 using ::com::sun::star::uno::Sequence;
 
-Sequence< Reference< chart2::XFormattedString > >
+Sequence< Reference< chart2::XFormattedString2 > >
             FormattedStringHelper::createFormattedStringSequence(
                      const Reference< uno::XComponentContext > & xContext
                     , const OUString & rString
                     , const Reference< beans::XPropertySet > & xTextProperties ) throw()
 {
-    Reference< XFormattedString > xFormStr;
+    Reference< XFormattedString2 > xFormStr;
     try
     {
         if( xContext.is() )
         {
-            xFormStr.set(
-                xContext->getServiceManager()->createInstanceWithContext(
-                    "com.sun.star.chart2.FormattedString", xContext ),
-                uno::UNO_QUERY_THROW );
+            xFormStr = chart2::FormattedString::create(xContext);
 
             xFormStr->setString( rString );
 
             // set character properties
             comphelper::copyProperties(
-                xTextProperties, Reference< beans::XPropertySet >( xFormStr, uno::UNO_QUERY ) );
+                xTextProperties, Reference< beans::XPropertySet >( xFormStr, uno::UNO_QUERY_THROW ) );
         }
     }
     catch( const uno::Exception & ex )
@@ -60,7 +58,7 @@ Sequence< Reference< chart2::XFormattedString > >
         ASSERT_EXCEPTION( ex );
     }
 
-    return Sequence< Reference< XFormattedString > >( & xFormStr, 1 );
+    return Sequence< Reference< XFormattedString2 > >( & xFormStr, 1 );
 }
 
 //.............................................................................
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index c5b74b5..a8a0b00 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -22,6 +22,7 @@
 #include "macros.hxx"
 #include "AxisHelper.hxx"
 #include "DiagramHelper.hxx"
+#include <com/sun/star/chart2/FormattedString.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <rtl/ustrbuf.hxx>
 
@@ -300,30 +301,23 @@ void TitleHelper::setCompleteString( const OUString& rNewText
     }
     else
     {
-        uno::Reference< uno::XInterface > xI(
-            xContext->getServiceManager()->createInstanceWithContext(
-            "com.sun.star.chart2.FormattedString", xContext ) );
-        uno::Reference< XFormattedString > xFormattedString( xI, uno::UNO_QUERY );
+        uno::Reference< chart2::XFormattedString2 > xFormattedString =
+            chart2::FormattedString::create( xContext );
 
-        if(xFormattedString.is())
+        xFormattedString->setString( aNewText );
+        aNewStringList[0].set( xFormattedString );
+        if( pDefaultCharHeight != 0 )
         {
-            xFormattedString->setString( aNewText );
-            aNewStringList[0].set( xFormattedString );
-            if( pDefaultCharHeight != 0 )
+            try
             {
-                try
-                {
-                    uno::Reference< beans::XPropertySet > xProp( xFormattedString, uno::UNO_QUERY_THROW );
-
-                    uno::Any aFontSize( uno::makeAny( *pDefaultCharHeight ));
-                    xProp->setPropertyValue( "CharHeight", aFontSize );
-                    xProp->setPropertyValue( "CharHeightAsian", aFontSize );
-                    xProp->setPropertyValue( "CharHeightComplex", aFontSize );
-                }
-                catch( const uno::Exception & ex )
-                {
-                    ASSERT_EXCEPTION( ex );
-                }
+                uno::Any aFontSize( uno::makeAny( *pDefaultCharHeight ));
+                xFormattedString->setPropertyValue( "CharHeight", aFontSize );
+                xFormattedString->setPropertyValue( "CharHeightAsian", aFontSize );
+                xFormattedString->setPropertyValue( "CharHeightComplex", aFontSize );
+            }
+            catch( const uno::Exception & ex )
+            {
+                ASSERT_EXCEPTION( ex );
             }
         }
     }
diff --git a/chart2/source/view/inc/LegendEntryProvider.hxx b/chart2/source/view/inc/LegendEntryProvider.hxx
index b9acba3..940f884 100644
--- a/chart2/source/view/inc/LegendEntryProvider.hxx
+++ b/chart2/source/view/inc/LegendEntryProvider.hxx
@@ -21,7 +21,7 @@
 
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/chart/ChartLegendExpansion.hpp>
-#include <com/sun/star/chart2/XFormattedString.hpp>
+#include <com/sun/star/chart2/XFormattedString2.hpp>
 #include <com/sun/star/drawing/XShape.hpp>
 #include <com/sun/star/drawing/XShapes.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -60,7 +60,7 @@ struct ViewLegendEntry
      */
     ::com::sun::star::uno::Sequence<
         ::com::sun::star::uno::Reference<
-            ::com::sun::star::chart2::XFormattedString > >  aLabel;
+            ::com::sun::star::chart2::XFormattedString2 > >  aLabel;
 };
 
 class LegendEntryProvider
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 4b7d699..2bc9a65 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -168,7 +168,7 @@ awt::Size lcl_createTextShapes(
             xTarget->add( xEntry );
 
             // set label text
-            Sequence< Reference< XFormattedString > > aLabelSeq = (*aIt).aLabel;
+            Sequence< Reference< XFormattedString2 > > aLabelSeq = (*aIt).aLabel;
             for( sal_Int32 i = 0; i < aLabelSeq.getLength(); ++i )
             {
                 // todo: support more than one text range
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 825182a..b500e72 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -75,6 +75,9 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/tree,\
 	MutableTreeNode \
 	TreeControl \
 ))
+$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2,\
+	FormattedString \
+))
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/chart2/data,\
 	DatabaseDataProvider \
     LabeledDataSequence \
@@ -609,7 +612,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/chart2,
 	Diagram \
 	ErrorBar \
 	ExponentialScaling \
-	FormattedString \
 	GridProperties \
 	Legend \
 	LinearScaling \
@@ -2004,6 +2006,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/chart2,\
 	XDiagram \
 	XDiagramProvider \
 	XFormattedString \
+	XFormattedString2 \
 	XInternalDataProvider \
 	XLabeled \
 	XLegend \
diff --git a/offapi/com/sun/star/chart2/FormattedString.idl b/offapi/com/sun/star/chart2/FormattedString.idl
index e4be3c7..e4d80e7 100644
--- a/offapi/com/sun/star/chart2/FormattedString.idl
+++ b/offapi/com/sun/star/chart2/FormattedString.idl
@@ -20,40 +20,13 @@
 #ifndef com_sun_star_chart2_FormattedString_idl
 #define com_sun_star_chart2_FormattedString_idl
 
-#include <com/sun/star/beans/PropertySet.idl>
-#include <com/sun/star/style/CharacterProperties.idl>
-#include <com/sun/star/style/CharacterPropertiesAsian.idl>
-#include <com/sun/star/style/CharacterPropertiesComplex.idl>
-#include <com/sun/star/chart2/XFormattedString.idl>
+#include <com/sun/star/chart2/XFormattedString2.idl>
 
-module com
-{
-module sun
-{
-module star
-{
-module chart2
-{
+module com { module sun { module star { module chart2 {
 
-service FormattedString
-{
-    /**
-     */
-    service com::sun::star::beans::PropertySet;
+service FormattedString : XFormattedString2;
 
-    service ::com::sun::star::style::CharacterProperties;
-    [optional] service ::com::sun::star::style::CharacterPropertiesAsian;
-    [optional] service ::com::sun::star::style::CharacterPropertiesComplex;
-
-    /**
-     */
-    interface ::com::sun::star::chart2::XFormattedString;
-};
-
-} ; // chart2
-} ; // com
-} ; // sun
-} ; // star
+}; }; }; };
 
 #endif
 
diff --git a/offapi/com/sun/star/chart2/XFormattedString2.idl b/offapi/com/sun/star/chart2/XFormattedString2.idl
new file mode 100644
index 0000000..ea80fce
--- /dev/null
+++ b/offapi/com/sun/star/chart2/XFormattedString2.idl
@@ -0,0 +1,48 @@
+/* -*- 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_XFormattedString2_idl
+#define com_sun_star_chart2_XFormattedString2_idl
+
+#include <com/sun/star/beans/XPropertySet.idl>
+#include <com/sun/star/style/CharacterProperties.idl>
+#include <com/sun/star/style/CharacterPropertiesAsian.idl>
+#include <com/sun/star/style/CharacterPropertiesComplex.idl>
+#include <com/sun/star/chart2/XFormattedString.idl>
+
+module com { module sun { module star { module chart2 {
+
+/**
+    Provides unified interface for FormattedString service.
+
+    @since LibreOffice 4.1
+*/
+interface XFormattedString2
+{
+    interface com::sun::star::beans::XPropertySet;
+
+    interface com::sun::star::chart2::XFormattedString;
+
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
index d71cb97..32fb37f 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -20,9 +20,9 @@
 #include "oox/drawingml/chart/titleconverter.hxx"
 
 #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/XDiagram.hpp>
-#include <com/sun/star/chart2/XFormattedString.hpp>
 #include <com/sun/star/chart2/XLegend.hpp>
 #include <com/sun/star/chart2/XTitle.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
@@ -117,10 +117,10 @@ Sequence< Reference< XFormattedString > > TextConverter::createStringSequence(
 Reference< XFormattedString > TextConverter::appendFormattedString(
         ::std::vector< Reference< XFormattedString > >& orStringVec, const OUString& rString, bool bAddNewLine ) const
 {
-    Reference< XFormattedString > xFmtStr;
+    Reference< XFormattedString2 > xFmtStr;
     try
     {
-        xFmtStr.set( ConverterRoot::createInstance( "com.sun.star.chart2.FormattedString" ), UNO_QUERY_THROW );
+        xFmtStr = FormattedString::create( ConverterRoot::getComponentContext() );
         xFmtStr->setString( bAddNewLine ? (rString + OUString( sal_Unicode( '\n' ) )) : rString );
         orStringVec.push_back( xFmtStr );
     }
diff --git a/reportdesign/source/ui/inspection/DataProviderHandler.cxx b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
index 6b4bb49..72842e7 100644
--- a/reportdesign/source/ui/inspection/DataProviderHandler.cxx
+++ b/reportdesign/source/ui/inspection/DataProviderHandler.cxx
@@ -28,11 +28,11 @@
 #include <com/sun/star/inspection/PropertyControlType.hpp>
 #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/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/XFormattedString.hpp>
 #include <com/sun/star/chart2/XTitled.hpp>
 #include <com/sun/star/chart2/XTitle.hpp>
 #include <com/sun/star/chart2/data/XDataReceiver.hpp>
@@ -246,9 +246,9 @@ void DataProviderHandler::impl_updateChartTitle_throw(const uno::Any& _aValue)
         }
         if ( xTitle.is() )
         {
-            uno::Reference< chart2::XFormattedString> xFormatted(m_xContext->getServiceManager()->createInstanceWithContext(OUString("com.sun.star.chart2.FormattedString"),m_xContext),uno::UNO_QUERY);
+            uno::Reference< chart2::XFormattedString2> xFormatted = chart2::FormattedString::create(m_xContext);
             OUString sStr;
-            _aValue>>= sStr;
+            _aValue >>= sStr;
             xFormatted->setString(sStr);
             uno::Sequence< uno::Reference< chart2::XFormattedString> > aArgs(1);
             aArgs[0] = xFormatted;
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index f783eed..50d36d2 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -37,6 +37,7 @@
 #include <com/sun/star/chart/TimeUnit.hpp>
 #include <com/sun/star/chart/XChartDocument.hpp>
 #include <com/sun/star/chart/XDiagramPositioning.hpp>
+#include <com/sun/star/chart2/FormattedString.hpp>
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/XDiagram.hpp>
 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
@@ -875,25 +876,21 @@ Sequence< Reference< XFormattedString > > XclImpChSourceLink::CreateStringSequen
     {
         for( XclImpStringIterator aIt( *mxString ); aIt.Is(); ++aIt )
         {
-            Reference< XFormattedString > xFmtStr(
-                ScfApiHelper::CreateInstance( SERVICE_CHART2_FORMATTEDSTRING ), UNO_QUERY );
-            if( xFmtStr.is() )
-            {
-                // set text data
-                xFmtStr->setString( aIt.GetPortionText() );
-
-                // set font formatting and font color
-                ScfPropertySet aStringProp( xFmtStr );
-                sal_uInt16 nFontIdx = aIt.GetPortionFont();
-                if( (nFontIdx == EXC_FONT_NOTFOUND) && (aIt.GetPortionIndex() == 0) )
-                    // leading unformatted portion - use passed font settings
-                    rRoot.ConvertFont( aStringProp, nLeadFontIdx, &rLeadFontColor );
-                else
-                    rRoot.ConvertFont( aStringProp, nFontIdx );
+            Reference< css::chart2::XFormattedString2 > xFmtStr = css::chart2::FormattedString::create( comphelper::getProcessComponentContext() );
+            // set text data
+            xFmtStr->setString( aIt.GetPortionText() );
+
+            // set font formatting and font color
+            ScfPropertySet aStringProp( xFmtStr );
+            sal_uInt16 nFontIdx = aIt.GetPortionFont();
+            if( (nFontIdx == EXC_FONT_NOTFOUND) && (aIt.GetPortionIndex() == 0) )
+                // leading unformatted portion - use passed font settings
+                rRoot.ConvertFont( aStringProp, nLeadFontIdx, &rLeadFontColor );
+            else
+                rRoot.ConvertFont( aStringProp, nFontIdx );
 
-                // add string to vector of strings
-                aStringVec.push_back( xFmtStr );
-            }
+            // add string to vector of strings
+            aStringVec.push_back( xFmtStr );
         }
     }
     return ScfApiHelper::VectorToSequence( aStringVec );
diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx
index 47f35c0d..3bf0f3e 100644
--- a/sc/source/filter/ftools/fapihelper.cxx
+++ b/sc/source/filter/ftools/fapihelper.cxx
@@ -56,7 +56,7 @@ using namespace ::com::sun::star;
 
 // Static helper functions ====================================================
 
-OUString ScfApiHelper::GetServiceName( Reference< XInterface > xInt )
+OUString ScfApiHelper::GetServiceName( const Reference< XInterface >& xInt )
 {
     OUString aService;
     Reference< XServiceName > xServiceName( xInt, UNO_QUERY );
@@ -74,7 +74,7 @@ Reference< XMultiServiceFactory > ScfApiHelper::GetServiceFactory( SfxObjectShel
 }
 
 Reference< XInterface > ScfApiHelper::CreateInstance(
-        Reference< XMultiServiceFactory > xFactory, const OUString& rServiceName )
+        const Reference< XMultiServiceFactory >& xFactory, const OUString& rServiceName )
 {
     Reference< XInterface > xInt;
     if( xFactory.is() )
@@ -323,9 +323,9 @@ void ScfPropSetHelper::ReadFromPropertySet( const ScfPropertySet& rPropSet )
     mnNextIdx = 0;
 }
 
-bool ScfPropSetHelper::ReadValue( UnoAny& rAny )
+bool ScfPropSetHelper::ReadValue( Any& rAny )
 {
-    UnoAny* pAny = GetNextAny();
+    Any* pAny = GetNextAny();
     if( pAny )
         rAny = *pAny;
     return pAny != 0;
@@ -367,7 +367,7 @@ void ScfPropSetHelper::InitializeWrite( bool bClearAllAnys )
 
 void ScfPropSetHelper::WriteValue( const Any& rAny )
 {
-    if( UnoAny* pAny = GetNextAny() )
+    if( Any* pAny = GetNextAny() )
         *pAny = rAny;
 }
 
diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx
index b4b696a..1238220 100644
--- a/sc/source/filter/inc/fapihelper.hxx
+++ b/sc/source/filter/inc/fapihelper.hxx
@@ -46,11 +46,6 @@ class SfxObjectShell;
 class ScfApiHelper
 {
 public:
-    typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >               XInterfaceRef;
-    typedef ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >    XServiceFactoryRef;
-    typedef ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >                       UnoAnySequence;
-
-public:
     /** Converts a tools color to a UNO color value. */
     inline static sal_Int32 ConvertToApiColor( const Color& rColor )
                             { return static_cast< sal_Int32 >( rColor.GetColor() ); }
@@ -64,23 +59,23 @@ public:
                             VectorToSequence( const ::std::vector< Type >& rVector );
 
     /** Returns the service name provided via the XServiceName interface, or an empty string on error. */
-    static OUString GetServiceName( XInterfaceRef xInt );
+    static OUString GetServiceName( const css::uno::Reference< css::uno::XInterface >& xInt );
 
     /** Returns the multi service factory from a document shell. */
-    static XServiceFactoryRef GetServiceFactory( SfxObjectShell* pShell );
+    static css::uno::Reference< css::lang::XMultiServiceFactory > GetServiceFactory( SfxObjectShell* pShell );
 
     /** Creates an instance from the passed service name, using the passed service factory. */
-    static XInterfaceRef CreateInstance(
-                            XServiceFactoryRef xFactory,
+    static css::uno::Reference< css::uno::XInterface > CreateInstance(
+                            const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory,
                             const OUString& rServiceName );
 
     /** Creates an instance from the passed service name, using the service factory of the passed object. */
-    static XInterfaceRef CreateInstance(
+    static css::uno::Reference< css::uno::XInterface > CreateInstance(
                             SfxObjectShell* pShell,
                             const OUString& rServiceName );
 
     /** Creates an instance from the passed service name, using the process service factory. */
-    static XInterfaceRef CreateInstance( const OUString& rServiceName );
+    static css::uno::Reference< css::uno::XInterface > CreateInstance( const OUString& rServiceName );
 
     /** Opens a password dialog and returns the encryption data.
         @return  The encryption data or an empty sequence on 'Cancel' or any error. */
@@ -116,36 +111,27 @@ template< typename Type >
 class ScfPropertySet
 {
 public:
-    typedef ::com::sun::star::uno::Reference<
-                ::com::sun::star::beans::XPropertySet >         XPropertySetRef;
-    typedef ::com::sun::star::uno::Reference<
-                ::com::sun::star::beans::XMultiPropertySet >    XMultiPropSetRef;
-    typedef ::com::sun::star::uno::Any                          UnoAny;
-    typedef ::com::sun::star::uno::Sequence< UnoAny >           UnoAnySequence;
-    typedef ::com::sun::star::uno::Sequence< OUString >  OUStringSequence;
-
-public:
     inline explicit     ScfPropertySet() {}
     /** Constructs a property set wrapper with the passed UNO property set. */
-    inline explicit     ScfPropertySet( XPropertySetRef xPropSet ) { Set( xPropSet ); }
+    inline explicit     ScfPropertySet( const css::uno::Reference< css::beans::XPropertySet > & xPropSet ) { Set( xPropSet ); }
     /** Constructs a property set wrapper after querying the XPropertySet interface. */
     template< typename InterfaceType >
-    inline explicit     ScfPropertySet( ::com::sun::star::uno::Reference< InterfaceType > xInterface ) { Set( xInterface ); }
+    inline explicit     ScfPropertySet( const css::uno::Reference< InterfaceType >& xInterface ) { Set( xInterface ); }
 
                         ~ScfPropertySet();
 
     /** Sets the passed UNO property set and releases the old UNO property set. */
-    void                Set( XPropertySetRef xPropSet );
+    void                Set( css::uno::Reference< css::beans::XPropertySet > xPropSet );
     /** Queries the passed interface for an XPropertySet and releases the old UNO property set. */
     template< typename InterfaceType >
     inline void         Set( ::com::sun::star::uno::Reference< InterfaceType > xInterface )
-                            { Set( XPropertySetRef( xInterface, ::com::sun::star::uno::UNO_QUERY ) ); }
+                            { Set( css::uno::Reference< css::beans::XPropertySet >( xInterface, ::com::sun::star::uno::UNO_QUERY ) ); }
 
     /** Returns true, if the contained XPropertySet interface is valid. */
     inline bool         Is() const { return mxPropSet.is(); }
 
     /** Returns the contained XPropertySet interface. */
-    inline XPropertySetRef GetApiPropertySet() const { return mxPropSet; }
+    inline css::uno::Reference< css::beans::XPropertySet > GetApiPropertySet() const { return mxPropSet; }
 
     /** Returns the service name provided via the XServiceName interface, or an empty string on error. */
     OUString     GetServiceName() const;
@@ -157,13 +143,13 @@ public:
 
     /** Gets the specified property from the property set.
         @return  true, if the Any could be filled with the property value. */
-    bool                GetAnyProperty( UnoAny& rValue, const OUString& rPropName ) const;
+    bool                GetAnyProperty( css::uno::Any& rValue, const OUString& rPropName ) const;
 
     /** Gets the specified property from the property set.
         @return  true, if the passed variable could be filled with the property value. */
     template< typename Type >
     inline bool         GetProperty( Type& rValue, const OUString& rPropName ) const
-                            { UnoAny aAny; return GetAnyProperty( aAny, rPropName ) && (aAny >>= rValue); }
+                            { css::uno::Any aAny; return GetAnyProperty( aAny, rPropName ) && (aAny >>= rValue); }
 
     /** Gets the specified Boolean property from the property set.
         @return  true = property contains true; false = property contains false or error occurred. */
@@ -179,12 +165,12 @@ public:
     /** Gets the specified properties from the property set. Tries to use the XMultiPropertySet interface.
         @param rPropNames  The property names. MUST be ordered alphabetically.
         @param rValues  The related property values. */
-    void                GetProperties( UnoAnySequence& rValues, const OUStringSequence& rPropNames ) const;
+    void                GetProperties( css::uno::Sequence< css::uno::Any >& rValues, const css::uno::Sequence< OUString >& rPropNames ) const;
 
     // Set properties ---------------------------------------------------------
 
     /** Puts the passed Any into the property set. */
-    void                SetAnyProperty( const OUString& rPropName, const UnoAny& rValue );
+    void                SetAnyProperty( const OUString& rPropName, const css::uno::Any& rValue );
 
     /** Puts the passed value into the property set. */
     template< typename Type >
@@ -206,12 +192,12 @@ public:
     /** Puts the passed properties into the property set. Tries to use the XMultiPropertySet interface.
         @param rPropNames  The property names. MUST be ordered alphabetically.
         @param rValues  The related property values. */
-    void                SetProperties( const OUStringSequence& rPropNames, const UnoAnySequence& rValues );
+    void                SetProperties( const css::uno::Sequence< OUString > & rPropNames, const css::uno::Sequence< css::uno::Any >& rValues );
 
     // ------------------------------------------------------------------------
 private:
-    XPropertySetRef     mxPropSet;          /// The mandatory property set interface.
-    XMultiPropSetRef    mxMultiPropSet;     /// The optional multi property set interface.
+    css::uno::Reference< css::beans::XPropertySet >       mxPropSet;          /// The mandatory property set interface.
+    css::uno::Reference< css::beans::XMultiPropertySet >  mxMultiPropSet;     /// The optional multi property set interface.
 };
 
 // ----------------------------------------------------------------------------
@@ -233,9 +219,6 @@ private:
 class ScfPropSetHelper
 {
 public:
-    typedef ::com::sun::star::uno::Any UnoAny;
-
-public:
     /** @param ppPropNames  A null-terminated array of ASCII property names. */
     explicit            ScfPropSetHelper( const sal_Char* const* ppcPropNames );
 
@@ -248,7 +231,7 @@ public:
     template< typename Type >
     bool                ReadValue( Type& rValue );
     /** Reads an Any from the value sequence. */
-    bool                ReadValue( UnoAny& rAny );
+    bool                ReadValue( css::uno::Any& rAny );
     /** Reads a tools string from the value sequence. */
     bool                ReadValue( String& rString );
     /** Reads a color value from the value sequence. */
@@ -265,7 +248,7 @@ public:
     template< typename Type >
     void                WriteValue( const Type& rValue );
     /** Writes an Any to the value sequence. */
-    void                WriteValue( const UnoAny& rAny );
+    void                WriteValue( const css::uno::Any& rAny );
     /** Writes a tools string to the value sequence. */
     inline void         WriteValue( const String& rString )
                             { WriteValue( OUString( rString ) ); }
@@ -281,14 +264,11 @@ public:
     // ------------------------------------------------------------------------
 private:
     /** Returns a pointer to the next Any to be written to. */
-    UnoAny*             GetNextAny();
+    css::uno::Any*             GetNextAny();
 
 private:
-    typedef ::com::sun::star::uno::Sequence< OUString >  OUStringSequence;
-    typedef ::com::sun::star::uno::Sequence< UnoAny >           UnoAnySequence;
-
-    OUStringSequence    maNameSeq;          /// Sequence of property names.
-    UnoAnySequence      maValueSeq;         /// Sequence of property values.
+    css::uno::Sequence< OUString >       maNameSeq;          /// Sequence of property names.
+    css::uno::Sequence< css::uno::Any >  maValueSeq;         /// Sequence of property values.
     ScfInt32Vec         maNameOrder;        /// Maps initial order to alphabetical order.
     size_t              mnNextIdx;          /// Counter for next Any to be processed.
 };
@@ -298,14 +278,14 @@ private:
 template< typename Type >
 bool ScfPropSetHelper::ReadValue( Type& rValue )
 {
-    UnoAny* pAny = GetNextAny();
+    css::uno::Any* pAny = GetNextAny();
     return pAny && (*pAny >>= rValue);
 }
 
 template< typename Type >
 void ScfPropSetHelper::WriteValue( const Type& rValue )
 {
-    UnoAny* pAny = GetNextAny();
+    css::uno::Any* pAny = GetNextAny();
     if( pAny )
         *pAny <<= rValue;
 }
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 0df3408..9743bee 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -56,7 +56,6 @@ class XclRoot;
 #define SERVICE_CHART2_DIAGRAM              "com.sun.star.chart2.Diagram"
 #define SERVICE_CHART2_ERRORBAR             "com.sun.star.chart2.ErrorBar"
 #define SERVICE_CHART2_EXPREGCURVE          "com.sun.star.chart2.ExponentialRegressionCurve"
-#define SERVICE_CHART2_FORMATTEDSTRING      "com.sun.star.chart2.FormattedString"
 #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"
commit 39ab9c4e4f4fb26326d8b1f08e4ef45cbe268cfb
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 9 09:34:26 2013 +0200

    remove dead code
    
    Change-Id: I501ad5d514fa9f33f92efa3756d2a7c7801bd45a

diff --git a/sc/source/filter/chart/chart_imp.cxx b/sc/source/filter/chart/chart_imp.cxx
index 00975e7..4dda833b 100644
--- a/sc/source/filter/chart/chart_imp.cxx
+++ b/sc/source/filter/chart/chart_imp.cxx
@@ -25,14 +25,6 @@ ScXMLChartExportWrapper::ScXMLChartExportWrapper( com::sun::star::uno::Reference
 
 bool ScXMLChartExportWrapper::Export()
 {
-    uno::Reference<lang::XMultiServiceFactory> xServiceFactory(comphelper::getProcessServiceFactory());
-    uno::Reference<uno::XComponentContext> xContext(comphelper::getProcessComponentContext());
-    OSL_ENSURE( xServiceFactory.is(), "got no service manager" );
-    if( !xServiceFactory.is() )
-        return false;
-
-    //uno::Reference<xml::sax::XWriter> xWriter = xml::sax::Writer::create(xContext);
-
     if ( !mxStorage.is() )
         mxStorage = mrMedium.GetOutputStorage();
 
commit a39c96af53ec3364de70012ebfa7c09c4a55a7c3
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 9 09:09:52 2013 +0200

    fdo#46808, Convert sheet::GlobalSheetSettings service to new style
    
    Change-Id: If5fc10e408427fe5d87968a0ad51a3142f895709

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 56c4f4a..825182a 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -343,6 +343,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/sheet,\
 	ExternalDocLinks \
 	ExternalSheetCache \
 	FilterFormulaParser \
+	GlobalSheetSettings \
 	FormulaOpCodeMapper \
 	RecentFunctions \
 	Solver \
@@ -1185,7 +1186,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/sheet,\
 	FunctionDescription \
 	FunctionDescriptionEnumeration \
 	FunctionDescriptions \
-	GlobalSheetSettings \
 	HeaderFooterContent \
 	LabelRange \
 	LabelRanges \
@@ -3440,6 +3440,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/sheet,\
 	XFormulaTokens \
 	XFunctionAccess \
 	XFunctionDescriptions \
+	XGlobalSheetSettings \
 	XGoalSeek \
 	XHeaderFooterContent \
 	XHierarchiesSupplier \
diff --git a/offapi/com/sun/star/sheet/GlobalSheetSettings.idl b/offapi/com/sun/star/sheet/GlobalSheetSettings.idl
index 0360988..44438f3 100644
--- a/offapi/com/sun/star/sheet/GlobalSheetSettings.idl
+++ b/offapi/com/sun/star/sheet/GlobalSheetSettings.idl
@@ -20,7 +20,7 @@
 #ifndef __com_sun_star_sheet_GlobalSheetSettings_idl__
 #define __com_sun_star_sheet_GlobalSheetSettings_idl__
 
-#include <com/sun/star/beans/XPropertySet.idl>
+#include <com/sun/star/sheet/XGlobalSheetSettings.idl>
 
 
 module com {  module sun {  module star {  module sheet {
@@ -29,129 +29,7 @@ module com {  module sun {  module star {  module sheet {
 /** contributes properties to access the settings for all spreadsheets of
     a spreadsheet document.
  */
-published service GlobalSheetSettings
-{
-
-//! service com::sun::star::beans::PropertySet;
-    /** provides access to the properties.
-     */
-    interface com::sun::star::beans::XPropertySet;
-
-
-    /** specifies whether the cursor is moved after entering into cells.
-     */
-    [property] boolean MoveSelection;
-
-
-    /** contains the direction the cursor moves after entering cells.
-
-        @see com::sun::star::sheet::MoveDirection
-     */
-    [property] short MoveDirection;
-
-
-    /** specifies whether the enter key can be used to start editing a cell.
-     */
-    [property] boolean EnterEdit;
-
-
-    /** specifies whether cell formatting is extended when entering data.
-     */
-    [property] boolean ExtendFormat;
-
-
-    /** specifies whether ranges are highlighted on the sheet when
-        editing a formula.
-     */
-    [property] boolean RangeFinder;
-
-
-    /** specifies whether formula references are extended when cells
-        are inserted below or to the right of them.
-     */
-    [property] boolean ExpandReferences;
-
-
-    /** specifies whether the current selection is highlighted in
-        column and row headers.
-     */
-    [property] boolean MarkHeader;
-
-
-    /** specifies whether the enter key moves the cursor to the column
-        it was in before using the tab key to change columns.
-     */
-    [property] boolean UseTabCol;
-
-
-    /** contains the metric for all spreadsheet documents.
-
-        @see com::sun::star::util::MeasureUnit
-     */
-    [property] short Metric;
-
-
-    /** contains the default scale for new spreadsheet documents
-        (in percent).
-
-        <p>There are several special values:</p>
-        <p>-1 = Optimal width</p>
-        <p>-2 = Show whole page</p>
-        <p>-3 = Page width</p>
-     */
-    [property] short Scale;
-
-
-    /** specifies whether automatic completion of text in a cell is used.
-     */
-    [property] boolean DoAutoComplete;
-
-
-    /** contains the function that is displayed in the status bar.
-
-        @see com::sun::star::sheet::StatusBarFunction
-     */
-    [property] short StatusBarFunction;
-
-
-    /** contains the string lists used for sorting and filling.
-
-        <p>Each string contains the members of a list, separated by
-        commas.</p>
-     */
-    [property] sequence< string > UserLists;
-
-
-    /** specifies the update mode for external linked data.
-
-        <p>0 = always</p>
-        <p>1 = never</p>
-        <p>2 = on demand</p>
-     */
-    [optional, property] short LinkUpdateMode;
-
-
-    /** specifies whether all sheets or only selected sheets are printed.
-     */
-    [optional, property] boolean PrintAllSheets;
-
-
-    /** specifies whether empty pages are printed.
-     */
-    [optional, property] boolean PrintEmptyPages;
-
-
-    /** specifies whether printer metrics are used for display.
-     */
-    [optional, property] boolean UsePrinterMetrics;
-
-
-    /** specifies whether a warning is shown before replacing cells
-        (i.e. when pasting from clipboard).
-     */
-    [optional, property] boolean ReplaceCellsWarning;
-
-};
+published service GlobalSheetSettings : XGlobalSheetSettings;
 
 
 }; }; }; };
diff --git a/offapi/com/sun/star/sheet/XGlobalSheetSettings.idl b/offapi/com/sun/star/sheet/XGlobalSheetSettings.idl
new file mode 100644
index 0000000..0843d30
--- /dev/null
+++ b/offapi/com/sun/star/sheet/XGlobalSheetSettings.idl
@@ -0,0 +1,161 @@
+/* -*- 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_sheet_XGlobalSheetSettings_idl__
+#define __com_sun_star_sheet_XGlobalSheetSettings_idl__
+
+#include <com/sun/star/beans/XPropertySet.idl>
+
+
+module com {  module sun {  module star {  module sheet {
+
+
+/**
+    @since LibreOffice 4.1
+ */
+published interface XGlobalSheetSettings
+{
+
+//! service com::sun::star::beans::PropertySet;
+    /** provides access to the properties.
+     */
+    interface com::sun::star::beans::XPropertySet;
+
+
+    /** specifies whether the cursor is moved after entering into cells.
+     */
+    [attribute] boolean MoveSelection;
+
+
+    /** contains the direction the cursor moves after entering cells.
+
+        @see com::sun::star::sheet::MoveDirection
+     */
+    [attribute] short MoveDirection;
+
+
+    /** specifies whether the enter key can be used to start editing a cell.
+     */
+    [attribute] boolean EnterEdit;
+
+
+    /** specifies whether cell formatting is extended when entering data.
+     */
+    [attribute] boolean ExtendFormat;
+
+
+    /** specifies whether ranges are highlighted on the sheet when
+        editing a formula.
+     */
+    [attribute] boolean RangeFinder;
+
+
+    /** specifies whether formula references are extended when cells
+        are inserted below or to the right of them.
+     */
+    [attribute] boolean ExpandReferences;
+
+
+    /** specifies whether the current selection is highlighted in
+        column and row headers.
+     */
+    [attribute] boolean MarkHeader;
+
+
+    /** specifies whether the enter key moves the cursor to the column
+        it was in before using the tab key to change columns.
+     */
+    [attribute] boolean UseTabCol;
+
+
+    /** contains the metric for all spreadsheet documents.
+
+        @see com::sun::star::util::MeasureUnit
+     */
+    [attribute] short Metric;
+
+
+    /** contains the default scale for new spreadsheet documents
+        (in percent).
+
+        <p>There are several special values:</p>
+        <p>-1 = Optimal width</p>
+        <p>-2 = Show whole page</p>
+        <p>-3 = Page width</p>
+     */
+    [attribute] short Scale;
+
+
+    /** specifies whether automatic completion of text in a cell is used.
+     */
+    [attribute] boolean DoAutoComplete;
+
+
+    /** contains the function that is displayed in the status bar.
+
+        @see com::sun::star::sheet::StatusBarFunction
+     */
+    [attribute] short StatusBarFunction;
+
+
+    /** contains the string lists used for sorting and filling.
+
+        <p>Each string contains the members of a list, separated by
+        commas.</p>
+     */
+    [attribute] sequence< string > UserLists;
+
+
+    /** specifies the update mode for external linked data.
+
+        <p>0 = always</p>
+        <p>1 = never</p>
+        <p>2 = on demand</p>
+     */
+    [attribute] short LinkUpdateMode;
+
+
+    /** specifies whether all sheets or only selected sheets are printed.
+     */
+    [attribute] boolean PrintAllSheets;
+
+
+    /** specifies whether empty pages are printed.
+     */
+    [attribute] boolean PrintEmptyPages;
+
+
+    /** specifies whether printer metrics are used for display.
+     */
+    [attribute] boolean UsePrinterMetrics;
+
+
+    /** specifies whether a warning is shown before replacing cells
+        (i.e. when pasting from clipboard).
+     */
+    [attribute] boolean ReplaceCellsWarning;
+
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/type_reference/offapi.rdb b/offapi/type_reference/offapi.rdb
index 2aa5361..fc2dc32 100644
Binary files a/offapi/type_reference/offapi.rdb and b/offapi/type_reference/offapi.rdb differ
diff --git a/sc/inc/appluno.hxx b/sc/inc/appluno.hxx
index aba493b..2189fa1 100644
--- a/sc/inc/appluno.hxx
+++ b/sc/inc/appluno.hxx
@@ -22,9 +22,9 @@
 
 #include <svl/itemprop.hxx>
 #include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/sheet/XRecentFunctions.hpp>
 #include <com/sun/star/sheet/XFunctionDescriptions.hpp>
+#include <com/sun/star/sheet/XGlobalSheetSettings.hpp>
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
 #include <cppuhelper/implbase2.hxx>
@@ -48,12 +48,19 @@ com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL
 
 
 class ScSpreadsheetSettings : public cppu::WeakImplHelper2<
-                                        com::sun::star::beans::XPropertySet,
+                                        com::sun::star::sheet::XGlobalSheetSettings,
                                         com::sun::star::lang::XServiceInfo>
 {
 private:
     SfxItemPropertySet      aPropSet;
 
+
+    sal_Bool getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException);
+    sal_Int16 getPropertyInt16(const OUString& aPropertyName) throw (css::uno::RuntimeException);
+    void setProperty(const OUString& aPropertyName, sal_Bool p1) throw (css::uno::RuntimeException)
+        { setPropertyValue( aPropertyName, css::uno::Any(p1) ); }
+    void setProperty(const OUString& aPropertyName, sal_Int16 p1) throw (css::uno::RuntimeException)
+        { setPropertyValue( aPropertyName, css::uno::Any(p1) ); }
 public:
                             ScSpreadsheetSettings();
     virtual                 ~ScSpreadsheetSettings();
@@ -61,7 +68,86 @@ public:
     static OUString  getImplementationName_Static();
     static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static();
 
-                            // XPropertySet
+    // XGlobalSheetSettings
+    virtual sal_Bool SAL_CALL getMoveSelection() throw (css::uno::RuntimeException)
+        { return getPropertyBool("MoveSelection"); }
+    virtual void SAL_CALL setMoveSelection(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("MoveSelection", p1); }
+    virtual sal_Int16 SAL_CALL getMoveDirection() throw (css::uno::RuntimeException)
+        { return getPropertyInt16("MoveDirection"); }
+    virtual void SAL_CALL setMoveDirection(sal_Int16 p1) throw (css::uno::RuntimeException)
+        { setProperty("MoveDirection", p1); }
+    virtual sal_Bool SAL_CALL getEnterEdit() throw (css::uno::RuntimeException)
+        { return getPropertyBool("EnterEdit"); }
+    virtual void SAL_CALL setEnterEdit(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("EnterEdit", p1); }
+    virtual sal_Bool SAL_CALL getExtendFormat() throw (css::uno::RuntimeException)
+        { return getPropertyBool("ExtendFormat"); }
+    virtual void SAL_CALL setExtendFormat(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("ExtendFormat", p1); }
+    virtual sal_Bool SAL_CALL getRangeFinder() throw (css::uno::RuntimeException)
+        { return getPropertyBool("RangeFinder"); }
+    virtual void SAL_CALL setRangeFinder(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("RangeFinder", p1); }
+    virtual sal_Bool SAL_CALL getExpandReferences() throw (css::uno::RuntimeException)
+        { return getPropertyBool("ExpandReferences"); }
+    virtual void SAL_CALL setExpandReferences(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("ExpandReferences", p1); }
+    virtual sal_Bool SAL_CALL getMarkHeader() throw (css::uno::RuntimeException)
+        { return getPropertyBool("MarkHeader"); }
+    virtual void SAL_CALL setMarkHeader(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("MarkHeader", p1); }
+    virtual sal_Bool SAL_CALL getUseTabCol() throw (css::uno::RuntimeException)
+        { return getPropertyBool("UseTabCol"); }
+    virtual void SAL_CALL setUseTabCol(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("UseTabCol", p1); }
+    virtual sal_Int16 SAL_CALL getMetric() throw (css::uno::RuntimeException)
+        { return getPropertyInt16("Metric"); }
+    virtual void SAL_CALL setMetric(sal_Int16 p1) throw (css::uno::RuntimeException)
+        { setProperty("Metric", p1); }
+    virtual sal_Int16 SAL_CALL getScale() throw (css::uno::RuntimeException)
+        { return getPropertyInt16("Scale"); }
+    virtual void SAL_CALL setScale(sal_Int16 p1) throw (css::uno::RuntimeException)
+        { setProperty("Scale", p1); }
+    virtual sal_Bool SAL_CALL getDoAutoComplete() throw (css::uno::RuntimeException)
+        { return getPropertyBool("DoAutoComplete"); }
+    virtual void SAL_CALL setDoAutoComplete(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("DoAutoComplete", p1); }
+    virtual sal_Int16 SAL_CALL getStatusBarFunction() throw (css::uno::RuntimeException)
+        { return getPropertyInt16("StatusBarFunction"); }
+    virtual void SAL_CALL setStatusBarFunction(sal_Int16 p1) throw (css::uno::RuntimeException)
+        { setProperty("StatusBarFunction", p1); }
+    virtual css::uno::Sequence<OUString> SAL_CALL getUserLists() throw (css::uno::RuntimeException)
+        {
+           css::uno::Any any = getPropertyValue("UserLists");
+           css::uno::Sequence<OUString> b;
+           any >>= b;
+           return b;
+        }
+    virtual void SAL_CALL setUserLists(const css::uno::Sequence<OUString>& p1) throw (css::uno::RuntimeException)
+        { setPropertyValue( "UserLists", css::uno::Any(p1) ); }
+    virtual sal_Int16 SAL_CALL getLinkUpdateMode() throw (css::uno::RuntimeException)
+        { return getPropertyInt16("LinkUpdateMode"); }
+    virtual void SAL_CALL setLinkUpdateMode(sal_Int16 p1) throw (css::uno::RuntimeException)
+        { setProperty("LinkUpdateMode", p1); }
+    virtual sal_Bool SAL_CALL getPrintAllSheets() throw (css::uno::RuntimeException)
+        { return getPropertyBool("PrintAllSheets"); }
+    virtual void SAL_CALL setPrintAllSheets(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("PrintAllSheets", p1); }
+    virtual sal_Bool SAL_CALL getPrintEmptyPages() throw (css::uno::RuntimeException)
+        { return getPropertyBool("PrintEmptyPages"); }
+    virtual void SAL_CALL setPrintEmptyPages(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("PrintEmptyPages", p1); }
+    virtual sal_Bool SAL_CALL getUsePrinterMetrics() throw (css::uno::RuntimeException)
+        { return getPropertyBool("UsePrinterMetrics"); }
+    virtual void SAL_CALL setUsePrinterMetrics(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("UsePrinterMetrics", p1); }
+    virtual sal_Bool SAL_CALL getReplaceCellsWarning() throw (css::uno::RuntimeException)
+        { return getPropertyBool("ReplaceCellsWarning"); }
+    virtual void SAL_CALL setReplaceCellsWarning(sal_Bool p1) throw (css::uno::RuntimeException)
+        { setProperty("ReplaceCellsWarning", p1); }
+
+    // XPropertySet
     virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >
                             SAL_CALL getPropertySetInfo()
                                 throw(::com::sun::star::uno::RuntimeException);
@@ -102,7 +188,7 @@ public:
                                     ::com::sun::star::lang::WrappedTargetException,
                                     ::com::sun::star::uno::RuntimeException);
 
-                            // XServiceInfo
+    // XServiceInfo
     virtual OUString SAL_CALL getImplementationName()
                                 throw(::com::sun::star::uno::RuntimeException);
     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index c78c4df..28a155a 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -88,22 +88,21 @@
 #include <svx/svdpage.hxx>
 
 #include <comphelper/processfactory.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/container/XNamed.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/form/XFormsSupplier2.hpp>
+#include <com/sun/star/io/XActiveDataSource.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
 #include <com/sun/star/sheet/XUsedAreaCursor.hpp>
 #include <com/sun/star/sheet/XCellRangeAddressable.hpp>
 #include <com/sun/star/sheet/XAreaLinks.hpp>
 #include <com/sun/star/sheet/XAreaLink.hpp>
-#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
-#include <com/sun/star/table/XColumnRowRange.hpp>
 #include <com/sun/star/sheet/XPrintAreas.hpp>
-#include <com/sun/star/container/XNamed.hpp>
-#include <com/sun/star/util/XProtectable.hpp>
-#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
 #include <com/sun/star/sheet/XUniqueCellFormatRangesSupplier.hpp>
 #include <com/sun/star/sheet/XCellRangesQuery.hpp>
 #include <com/sun/star/sheet/CellFlags.hpp>
-#include <com/sun/star/util/XMergeable.hpp>
 #include <com/sun/star/sheet/XArrayFormulaRange.hpp>
-#include <com/sun/star/text/XText.hpp>
 #include <com/sun/star/sheet/XLabelRanges.hpp>
 #include <com/sun/star/sheet/XLabelRange.hpp>
 #include <com/sun/star/sheet/XNamedRanges.hpp>
@@ -111,10 +110,12 @@
 #include <com/sun/star/sheet/XCellRangeReferrer.hpp>
 #include <com/sun/star/sheet/NamedRangeFlag.hpp>
 #include <com/sun/star/sheet/XSheetLinkable.hpp>
-#include <com/sun/star/form/XFormsSupplier2.hpp>
-#include <com/sun/star/io/XActiveDataSource.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/sheet/GlobalSheetSettings.hpp>
+#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
+#include <com/sun/star/table/XColumnRowRange.hpp>
+#include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/util/XMergeable.hpp>
+#include <com/sun/star/util/XProtectable.hpp>
 
 #include <com/sun/star/chart2/XChartDocument.hpp>
 #include <com/sun/star/chart2/data/XRangeXMLConversion.hpp>
@@ -418,17 +419,9 @@ void ScXMLShapeExport::onExport( const uno::Reference < drawing::XShape >& xShap
 
 sal_Int16 ScXMLExport::GetFieldUnit()
 {
-    com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xProperties(
-                comphelper::getProcessServiceFactory()->createInstance(
-                    OUString( "com.sun.star.sheet.GlobalSheetSettings" ) ),
-                com::sun::star::uno::UNO_QUERY);
-    if (xProperties.is())
-    {
-        sal_Int16 nFieldUnit = 0;
-        if (xProperties->getPropertyValue(OUString("Metric")) >>= nFieldUnit)
-            return nFieldUnit;
-    }
-    return 0;
+    css::uno::Reference<css::sheet::XGlobalSheetSettings> xProperties =
+                css::sheet::GlobalSheetSettings::create( comphelper::getProcessComponentContext() );
+    return xProperties->getMetric();
 }
 
 
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 07eb115..1862f9d 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -378,6 +378,22 @@ uno::Sequence<OUString> ScSpreadsheetSettings::getSupportedServiceNames_Static()
     return aRet;
 }
 
+sal_Bool ScSpreadsheetSettings::getPropertyBool(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+   uno::Any any = getPropertyValue(aPropertyName);
+   sal_Bool b;
+   any >>= b;
+   return b;
+}
+
+sal_Int16 ScSpreadsheetSettings::getPropertyInt16(const OUString& aPropertyName) throw (css::uno::RuntimeException)
+{
+   uno::Any any = getPropertyValue(aPropertyName);
+   sal_Int16 b;
+   any >>= b;
+   return b;
+}
+
 // XPropertySet
 
 uno::Reference<beans::XPropertySetInfo> SAL_CALL ScSpreadsheetSettings::getPropertySetInfo()
diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx
index 86943a2..d8eb7f3 100644
--- a/sc/source/ui/vba/excelvbahelper.cxx
+++ b/sc/source/ui/vba/excelvbahelper.cxx
@@ -21,6 +21,8 @@
 
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/sheet/XSheetCellRange.hpp>
+#include <com/sun/star/sheet/GlobalSheetSettings.hpp>
+
 #include "docuno.hxx"
 #include "tabvwsh.hxx"
 #include "transobj.hxx"
@@ -107,26 +109,21 @@ class PasteCellsWarningReseter
 {
 private:
     bool bInitialWarningState;
-    static uno::Reference< beans::XPropertySet > getGlobalSheetSettings() throw ( uno::RuntimeException )
+    static uno::Reference< sheet::XGlobalSheetSettings > getGlobalSheetSettings() throw ( uno::RuntimeException )
     {
-        static uno::Reference<uno::XComponentContext > xContext(
-            comphelper::getProcessComponentContext() );
-        static uno::Reference<lang::XMultiComponentFactory > xServiceManager(
-                xContext->getServiceManager() );
-        static uno::Reference< beans::XPropertySet > xProps( xServiceManager->createInstanceWithContext( OUString( "com.sun.star.sheet.GlobalSheetSettings" ) ,xContext ), uno::UNO_QUERY_THROW );
+        static uno::Reference< sheet::XGlobalSheetSettings > xProps = sheet::GlobalSheetSettings::create( comphelper::getProcessComponentContext() );
         return xProps;
     }
 
     bool getReplaceCellsWarning() throw ( uno::RuntimeException )
     {
-        sal_Bool res = false;
-        getGlobalSheetSettings()->getPropertyValue( REPLACE_CELLS_WARNING ) >>= res;
+        sal_Bool res = getGlobalSheetSettings()->getReplaceCellsWarning();
         return ( res == sal_True );
     }
 
     void setReplaceCellsWarning( bool bState ) throw ( uno::RuntimeException )
     {

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list