[Libreoffice-commits] .: basctl/source chart2/source comphelper/inc cui/source dbaccess/source sc/source sfx2/source svl/source svtools/source svx/source sw/source vcl/aqua vcl/unx

Stephan Bergmann sbergmann at kemper.freedesktop.org
Tue Jan 31 08:28:29 PST 2012


 basctl/source/basicide/baside2b.cxx         |   11 ++---
 chart2/source/model/main/UndoManager.cxx    |    4 --
 comphelper/inc/comphelper/configuration.hxx |   35 +++++++++--------
 cui/source/options/fontsubs.cxx             |   24 ++++--------
 cui/source/options/optmemory.cxx            |   41 ++++++++------------
 dbaccess/source/ui/control/sqledit.cxx      |   11 +----
 sc/source/ui/unoobj/docuno.cxx              |    5 --
 sfx2/source/appl/appbas.cxx                 |   10 +----
 sfx2/source/appl/appcfg.cxx                 |   55 ++++++++++------------------
 sfx2/source/control/shell.cxx               |    4 --
 sfx2/source/doc/docfile.cxx                 |    2 -
 svl/source/config/asiancfg.cxx              |    6 +--
 svtools/source/graphic/grfmgr.cxx           |   13 +++---
 svx/source/svdraw/svdetc.cxx                |    4 --
 svx/source/svdraw/svdmodel.cxx              |    5 +-
 sw/source/ui/docvw/srcedtw.cxx              |   11 +----
 sw/source/ui/ribbar/inputwin.cxx            |    4 --
 sw/source/ui/uiview/view.cxx                |    4 --
 vcl/aqua/source/gdi/salprn.cxx              |   10 +++--
 vcl/unx/generic/plugadapt/salplug.cxx       |    4 --
 vcl/unx/gtk/gdi/salprn-gtk.cxx              |    5 +-
 21 files changed, 105 insertions(+), 163 deletions(-)

New commits:
commit 6fca59d9c2d3ee3833da6a71d390a2a5b6b73299
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Jan 31 17:25:42 2012 +0100

    Simplify code by making getProcessComponentContext() implicit.

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index a1f0766..f74e134 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -195,8 +195,8 @@ EditorWindow::EditorWindow( Window* pParent ) :
     // long as there are no derivations:
     listener_ = new ChangesListener(*this);
     Reference< beans::XMultiPropertySet > n(
-        officecfg::Office::Common::Font::SourceViewFont::get(
-            comphelper::getProcessComponentContext()), UNO_QUERY_THROW);
+        officecfg::Office::Common::Font::SourceViewFont::get(),
+        UNO_QUERY_THROW);
     {
         osl::MutexGuard g(mutex_);
         notifier_ = n;
@@ -816,8 +816,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine )
 void EditorWindow::ImplSetFont()
 {
     rtl::OUString sFontName(
-        officecfg::Office::Common::Font::SourceViewFont::FontName::get(
-            comphelper::getProcessComponentContext() ).
+        officecfg::Office::Common::Font::SourceViewFont::FontName::get().
         get_value_or( rtl::OUString() ) );
     if ( sFontName.isEmpty() )
     {
@@ -825,9 +824,7 @@ void EditorWindow::ImplSetFont()
         sFontName = aTmpFont.GetName();
     }
     Size aFontSize(
-        0,
-        officecfg::Office::Common::Font::SourceViewFont::FontHeight::get(
-            comphelper::getProcessComponentContext() ) );
+        0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() );
     Font aFont( sFontName, aFontSize );
     aFont.SetColor( GetSettings().GetStyleSettings().GetFieldTextColor() );
     SetPointFont( aFont );
diff --git a/chart2/source/model/main/UndoManager.cxx b/chart2/source/model/main/UndoManager.cxx
index a4b876f..e5e6c46 100644
--- a/chart2/source/model/main/UndoManager.cxx
+++ b/chart2/source/model/main/UndoManager.cxx
@@ -33,7 +33,6 @@
 #include <com/sun/star/lang/DisposedException.hpp>
 /** === end UNO includes === **/
 
-#include <comphelper/processfactory.hxx>
 #include <framework/undomanagerhelper.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <svl/undo.hxx>
@@ -87,8 +86,7 @@ namespace chart
                 ,m_aUndoHelper( *this )
             {
                 m_aUndoManager.SetMaxUndoActionCount(
-                    officecfg::Office::Common::Undo::Steps::get(
-                        comphelper::getProcessComponentContext()));
+                    officecfg::Office::Common::Undo::Steps::get());
             }
 
             virtual ~UndoManager_Impl()
diff --git a/comphelper/inc/comphelper/configuration.hxx b/comphelper/inc/comphelper/configuration.hxx
index 85f45f9..1cf4a26 100644
--- a/comphelper/inc/comphelper/configuration.hxx
+++ b/comphelper/inc/comphelper/configuration.hxx
@@ -38,6 +38,7 @@
 #include "com/sun/star/uno/Any.hxx"
 #include "com/sun/star/uno/Reference.hxx"
 #include "comphelper/comphelperdllapi.h"
+#include "comphelper/processfactory.hxx"
 #include "sal/types.h"
 
 namespace com { namespace sun { namespace star {
@@ -67,7 +68,7 @@ class COMPHELPER_DLLPUBLIC ConfigurationChanges: private boost::noncopyable {
 public:
     static boost::shared_ptr< ConfigurationChanges > create(
         com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-            const & context);
+            const & context = comphelper::getProcessComponentContext());
 
     ~ConfigurationChanges();
 
@@ -205,7 +206,7 @@ template< typename T, typename U > struct ConfigurationProperty:
     /// For nillable properties, U is of type boost::optional<U'>.
     static U get(
         com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-            const & context)
+            const & context = comphelper::getProcessComponentContext())
     {
         // Folding this into one statement causes a bogus error at least with
         // Red Hat GCC 4.6.2-1:
@@ -220,10 +221,10 @@ template< typename T, typename U > struct ConfigurationProperty:
     ///
     /// For nillable properties, U is of type boost::optional<U'>.
     static void set(
-        com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-            const & context,
+        U const & value,
         boost::shared_ptr< ConfigurationChanges > const & batch,
-        U const & value)
+        com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+            const & context = comphelper::getProcessComponentContext())
     {
         detail::ConfigurationWrapper::get(context).setPropertyValue(
             batch, T::path(), detail::Convert< U >::toAny(value));
@@ -249,7 +250,7 @@ template< typename T, typename U > struct ConfigurationLocalizedProperty:
     /// For nillable properties, U is of type boost::optional<U'>.
     static U get(
         com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-            const & context)
+            const & context = comphelper::getProcessComponentContext())
     {
         // Folding this into one statement causes a bogus error at least with
         // Red Hat GCC 4.6.2-1:
@@ -266,10 +267,10 @@ template< typename T, typename U > struct ConfigurationLocalizedProperty:
     ///
     /// For nillable properties, U is of type boost::optional<U'>.
     static void set(
-        com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-            const & context,
+        U const & value,
         boost::shared_ptr< ConfigurationChanges > const & batch,
-        U const & value)
+        com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+            const & context = comphelper::getProcessComponentContext())
     {
         detail::ConfigurationWrapper::get(context).setLocalizedPropertyValue(
             batch, T::path(), detail::Convert< U >::toAny(value));
@@ -290,7 +291,7 @@ template< typename T > struct ConfigurationGroup: private boost::noncopyable {
     static com::sun::star::uno::Reference<
         com::sun::star::container::XHierarchicalNameAccess >
     get(com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-            const & context)
+            const & context = comphelper::getProcessComponentContext())
     {
         return detail::ConfigurationWrapper::get(context).getGroupReadOnly(
             T::path());
@@ -300,9 +301,9 @@ template< typename T > struct ConfigurationGroup: private boost::noncopyable {
     /// modifications via the given changes batch.
     static com::sun::star::uno::Reference<
         com::sun::star::container::XHierarchicalNameReplace >
-    get(com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-            const & context,
-        boost::shared_ptr< ConfigurationChanges > const & batch)
+    get(boost::shared_ptr< ConfigurationChanges > const & batch,
+        com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+            const & context = comphelper::getProcessComponentContext())
     {
         return detail::ConfigurationWrapper::get(context).getGroupReadWrite(
             batch, T::path());
@@ -323,7 +324,7 @@ template< typename T > struct ConfigurationSet: private boost::noncopyable {
     static
     com::sun::star::uno::Reference< com::sun::star::container::XNameAccess >
     get(com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-            const & context)
+            const & context = comphelper::getProcessComponentContext())
     {
         return detail::ConfigurationWrapper::get(context).getSetReadOnly(
             T::path());
@@ -333,9 +334,9 @@ template< typename T > struct ConfigurationSet: private boost::noncopyable {
     /// modifications via the given changes batch.
     static
     com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >
-    get(com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-            const & context,
-        boost::shared_ptr< ConfigurationChanges > const & batch)
+    get(boost::shared_ptr< ConfigurationChanges > const & batch,
+        com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
+            const & context = comphelper::getProcessComponentContext())
     {
         return detail::ConfigurationWrapper::get(context).getSetReadWrite(
             batch, T::path());
diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx
index 961c40a..44e7cef 100644
--- a/cui/source/options/fontsubs.cxx
+++ b/cui/source/options/fontsubs.cxx
@@ -28,7 +28,6 @@
 
 #include "sal/config.h"
 
-#include <comphelper/processfactory.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <tools/shl.hxx>
 #include <svtools/ctrltool.hxx>
@@ -232,24 +231,21 @@ sal_Bool  SvxFontSubstTabPage::FillItemSet( SfxItemSet& )
         pConfig->Commit();
     pConfig->Apply();
     boost::shared_ptr< comphelper::ConfigurationChanges > batch(
-        comphelper::ConfigurationChanges::create(
-            comphelper::getProcessComponentContext()));
+        comphelper::ConfigurationChanges::create());
     if(aFontHeightLB.GetSavedValue() != aFontHeightLB.GetSelectEntryPos())
         officecfg::Office::Common::Font::SourceViewFont::FontHeight::set(
-            comphelper::getProcessComponentContext(), batch,
-            static_cast< sal_Int16 >(aFontHeightLB.GetSelectEntry().ToInt32()));
+            static_cast< sal_Int16 >(aFontHeightLB.GetSelectEntry().ToInt32()),
+            batch);
     if(aNonPropFontsOnlyCB.GetSavedValue() != aNonPropFontsOnlyCB.IsChecked())
         officecfg::Office::Common::Font::SourceViewFont::
             NonProportionalFontsOnly::set(
-                comphelper::getProcessComponentContext(), batch,
-                aNonPropFontsOnlyCB.IsChecked());
+                aNonPropFontsOnlyCB.IsChecked(), batch);
     //font name changes cannot be detected by saved values
     rtl::OUString sFontName;
     if(aFontNameLB.GetSelectEntryPos())
         sFontName = aFontNameLB.GetSelectEntry();
     officecfg::Office::Common::Font::SourceViewFont::FontName::set(
-        comphelper::getProcessComponentContext(), batch,
-        boost::optional< rtl::OUString >(sFontName));
+        boost::optional< rtl::OUString >(sFontName), batch);
     batch->commit();
 
     return sal_False;
@@ -290,12 +286,10 @@ void  SvxFontSubstTabPage::Reset( const SfxItemSet& )
     //fill font name box first
     aNonPropFontsOnlyCB.Check(
         officecfg::Office::Common::Font::SourceViewFont::
-            NonProportionalFontsOnly::get(
-                comphelper::getProcessComponentContext()));
+        NonProportionalFontsOnly::get());
     NonPropFontsHdl(&aNonPropFontsOnlyCB);
     rtl::OUString sFontName(
-        officecfg::Office::Common::Font::SourceViewFont::FontName::get(
-            comphelper::getProcessComponentContext()).
+        officecfg::Office::Common::Font::SourceViewFont::FontName::get().
         get_value_or(rtl::OUString()));
     if(!sFontName.isEmpty())
         aFontNameLB.SelectEntry(sFontName);
@@ -303,8 +297,8 @@ void  SvxFontSubstTabPage::Reset( const SfxItemSet& )
         aFontNameLB.SelectEntryPos(0);
     aFontHeightLB.SelectEntry(
         String::CreateFromInt32(
-            officecfg::Office::Common::Font::SourceViewFont::FontHeight::get(
-                comphelper::getProcessComponentContext())));
+            officecfg::Office::Common::Font::SourceViewFont::FontHeight::
+            get()));
     aNonPropFontsOnlyCB.SaveValue();
     aFontHeightLB.SaveValue();
 }
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index 69bdf4e..ffe2a4d 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -30,7 +30,6 @@
 
 #include <algorithm>
 
-#include <comphelper/processfactory.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <svtools/langtab.hxx>
 #include <svl/zforlist.hxx>
@@ -185,28 +184,26 @@ sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet )
     sal_Bool bModified = sal_False;
 
     boost::shared_ptr< comphelper::ConfigurationChanges > batch(
-        comphelper::ConfigurationChanges::create(
-            comphelper::getProcessComponentContext()));
+        comphelper::ConfigurationChanges::create());
 
     // Undo-Schritte
     if ( aUndoEdit.GetText() != aUndoEdit.GetSavedValue() )
         officecfg::Office::Common::Undo::Steps::set(
-            comphelper::getProcessComponentContext(), batch,
-            aUndoEdit.GetValue());
+            aUndoEdit.GetValue(), batch);
 
     // GraphicCache
     sal_Int32 totalCacheSize = GetNfGraphicCacheVal();
     officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::set(
-        comphelper::getProcessComponentContext(), batch, totalCacheSize);
+        totalCacheSize, batch);
     sal_Int32 objectCacheSize = GetNfGraphicObjectCacheVal();
     officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::set(
-        comphelper::getProcessComponentContext(), batch, objectCacheSize);
+        objectCacheSize, batch);
 
     const Time aTime( aTfGraphicObjectTime.GetTime() );
     sal_Int32 objectReleaseTime =
         aTime.GetSec() + aTime.GetMin() * 60 + aTime.GetHour() * 3600;
     officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::set(
-        comphelper::getProcessComponentContext(), batch, objectReleaseTime);
+        objectReleaseTime, batch);
 
     // create a dummy graphic object to get access to the common GraphicManager
     GraphicObject       aDummyObject;
@@ -218,11 +215,9 @@ sal_Bool OfaMemoryOptionsPage::FillItemSet( SfxItemSet& rSet )
 
     // OLECache
     officecfg::Office::Common::Cache::Writer::OLE_Objects::set(
-        comphelper::getProcessComponentContext(), batch,
-        aNfOLECache.GetValue());
+        aNfOLECache.GetValue(), batch);
     officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::set(
-        comphelper::getProcessComponentContext(), batch,
-        aNfOLECache.GetValue());
+        aNfOLECache.GetValue(), batch);
 
     batch->commit();
 
@@ -242,25 +237,22 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet )
     const SfxPoolItem*  pItem;
 
     // Undo-Schritte
-    aUndoEdit.SetValue(
-        officecfg::Office::Common::Undo::Steps::get(
-            comphelper::getProcessComponentContext()));
+    aUndoEdit.SetValue(officecfg::Office::Common::Undo::Steps::get());
     aUndoEdit.SaveValue();
 
     // GraphicCache
     long n =
-        officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::get(
-            comphelper::getProcessComponentContext());
+        officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::get();
     SetNfGraphicCacheVal( n );
     SetNfGraphicObjectCacheVal(
         std::min(
             GetNfGraphicCacheVal(),
-            officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::get(
-                comphelper::getProcessComponentContext())));
+            (officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::
+             get())));
 
     sal_Int32 nTime =
-        officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::get(
-            comphelper::getProcessComponentContext());
+        officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::
+        get();
     Time aTime( (sal_uInt16)( nTime / 3600 ), (sal_uInt16)( ( nTime % 3600 ) / 60 ), (sal_uInt16)( ( nTime % 3600 ) % 60 ) );
     aTfGraphicObjectTime.SetTime( aTime );
 
@@ -269,10 +261,9 @@ void OfaMemoryOptionsPage::Reset( const SfxItemSet& rSet )
     // OLECache
     aNfOLECache.SetValue(
         std::max(
-            officecfg::Office::Common::Cache::Writer::OLE_Objects::get(
-                comphelper::getProcessComponentContext()),
-            officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get(
-                comphelper::getProcessComponentContext())));
+            officecfg::Office::Common::Cache::Writer::OLE_Objects::get(),
+            (officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::
+             get())));
 
     SfxItemState eState = rSet.GetItemState( SID_ATTR_QUICKLAUNCHER, sal_False, &pItem );
     if ( SFX_ITEM_SET == eState )
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 5a47883..afa0e7f 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -32,7 +32,6 @@
 
 #include "com/sun/star/beans/XMultiPropertySet.hpp"
 #include "com/sun/star/beans/XPropertiesChangeListener.hpp"
-#include "comphelper/processfactory.hxx"
 #include "officecfg/Office/Common.hxx"
 #include "sqledit.hxx"
 #include "QueryTextView.hxx"
@@ -108,8 +107,7 @@ OSqlEdit::OSqlEdit( OQueryTextView* pParent,  WinBits nWinStyle ) :
     // long as there are no derivations:
     m_listener = new ChangesListener(*this);
     css::uno::Reference< css::beans::XMultiPropertySet > n(
-        officecfg::Office::Common::Font::SourceViewFont::get(
-            comphelper::getProcessComponentContext()),
+        officecfg::Office::Common::Font::SourceViewFont::get(),
         css::uno::UNO_QUERY_THROW);
     {
         osl::MutexGuard g(m_mutex);
@@ -270,8 +268,7 @@ void OSqlEdit::ImplSetFont()
     AllSettings aSettings = GetSettings();
     StyleSettings aStyleSettings = aSettings.GetStyleSettings();
     rtl::OUString sFontName(
-        officecfg::Office::Common::Font::SourceViewFont::FontName::get(
-            comphelper::getProcessComponentContext() ).
+        officecfg::Office::Common::Font::SourceViewFont::FontName::get().
         get_value_or( rtl::OUString() ) );
     if ( sFontName.isEmpty() )
     {
@@ -279,9 +276,7 @@ void OSqlEdit::ImplSetFont()
         sFontName = aTmpFont.GetName();
     }
     Size aFontSize(
-        0,
-        officecfg::Office::Common::Font::SourceViewFont::FontHeight::get(
-            comphelper::getProcessComponentContext() ) );
+        0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() );
     Font aFont( sFontName, aFontSize );
     aStyleSettings.SetFieldFont(aFont);
     aSettings.SetStyleSettings(aStyleSettings);
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index eb2cff7..ba7157e 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -35,7 +35,6 @@
 #include <svx/svxids.hrc>
 #include <svx/unoshape.hxx>
 
-#include <comphelper/processfactory.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <svl/numuno.hxx>
 #include <svl/smplhint.hxx>
@@ -1683,9 +1682,7 @@ void SAL_CALL ScModelObj::setPropertyValue(
             pDoc->EnableUndo( bUndoEnabled );
             pDocShell->GetUndoManager()->SetMaxUndoActionCount(
                 bUndoEnabled
-                ? officecfg::Office::Common::Undo::Steps::get(
-                    comphelper::getProcessComponentContext())
-                : 0);
+                ? officecfg::Office::Common::Undo::Steps::get() : 0);
         }
         else if ( aString.EqualsAscii( SC_UNO_ISADJUSTHEIGHTENABLED ) )
         {
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 58b95c0..c16338b 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -28,7 +28,6 @@
 
 #include <com/sun/star/frame/XDesktop.hpp>
 #include <com/sun/star/script/XLibraryContainer.hpp>
-#include <comphelper/processfactory.hxx>
 #include <com/sun/star/uno/Reference.h>
 #include <basic/basrdll.hxx>
 #include <officecfg/Office/Common.hxx>
@@ -183,11 +182,9 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
         {
             SFX_REQUEST_ARG(rReq, pCountItem, SfxUInt16Item, nSID, sal_False);
             boost::shared_ptr< comphelper::ConfigurationChanges > batch(
-                comphelper::ConfigurationChanges::create(
-                    comphelper::getProcessComponentContext()));
+                comphelper::ConfigurationChanges::create());
             officecfg::Office::Common::Undo::Steps::set(
-                comphelper::getProcessComponentContext(), batch,
-                pCountItem->GetValue());
+                pCountItem->GetValue(), batch);
             batch->commit();
             break;
         }
@@ -254,8 +251,7 @@ void SfxApplication::PropState_Impl( SfxItemSet &rSet )
                 rSet.Put(
                     SfxUInt16Item(
                         SID_ATTR_UNDO_COUNT,
-                        officecfg::Office::Common::Undo::Steps::get(
-                            comphelper::getProcessComponentContext())));
+                        officecfg::Office::Common::Undo::Steps::get()));
                 break;
 
             case SID_UPDATE_VERSION:
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 006d977..4b8d786 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -62,7 +62,6 @@
 #include <svtools/miscopt.hxx>
 #include <vcl/toolbox.hxx>
 #include <unotools/localfilehelper.hxx>
-#include <comphelper/processfactory.hxx>
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
 
@@ -298,8 +297,7 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
                     if (rSet.Put(
                             SfxUInt16Item (
                                 rPool.GetWhich(SID_ATTR_UNDO_COUNT),
-                                officecfg::Office::Common::Undo::Steps::get(
-                                    comphelper::getProcessComponentContext()))))
+                                officecfg::Office::Common::Undo::Steps::get())))
                     {
                         bRet = true;
                     }
@@ -401,9 +399,8 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
                     if (rSet.Put(
                             SfxUInt16Item(
                                 rPool.GetWhich(SID_INET_PROXY_TYPE),
-                                (officecfg::Inet::Settings::ooInetProxyType::get(
-                                    comphelper::getProcessComponentContext()).
-                                 get_value_or(0)))))
+                                (officecfg::Inet::Settings::ooInetProxyType::
+                                 get().get_value_or(0)))))
                     {
                         bRet = true;
                     }
@@ -412,8 +409,8 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
                     if (rSet.Put(
                             SfxStringItem(
                                 rPool.GetWhich(SID_INET_HTTP_PROXY_NAME),
-                                officecfg::Inet::Settings::ooInetHTTPProxyName::get(
-                                    comphelper::getProcessComponentContext()))))
+                                officecfg::Inet::Settings::ooInetHTTPProxyName::
+                                get())))
                     {
                         bRet = true;
                     }
@@ -422,9 +419,8 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
                     if (rSet.Put(
                             SfxInt32Item(
                                 rPool.GetWhich(SID_INET_HTTP_PROXY_PORT),
-                                (officecfg::Inet::Settings::ooInetHTTPProxyPort::get(
-                                    comphelper::getProcessComponentContext()).
-                                 get_value_or(0)))))
+                                (officecfg::Inet::Settings::
+                                 ooInetHTTPProxyPort::get().get_value_or(0)))))
                     {
                         bRet = true;
                     }
@@ -433,8 +429,8 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
                     if (rSet.Put(
                             SfxStringItem(
                                 rPool.GetWhich(SID_INET_FTP_PROXY_NAME),
-                                officecfg::Inet::Settings::ooInetFTPProxyName::get(
-                                    comphelper::getProcessComponentContext()))))
+                                officecfg::Inet::Settings::ooInetFTPProxyName::
+                                get())))
                     {
                         bRet = true;
                     }
@@ -443,9 +439,8 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
                     if (rSet.Put(
                             SfxInt32Item(
                                 rPool.GetWhich(SID_INET_FTP_PROXY_PORT),
-                                (officecfg::Inet::Settings::ooInetFTPProxyPort::get(
-                                    comphelper::getProcessComponentContext()).
-                                 get_value_or(0)))))
+                                (officecfg::Inet::Settings::ooInetFTPProxyPort::
+                                 get().get_value_or(0)))))
                     {
                         bRet = true;
                     }
@@ -460,8 +455,8 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
                     if (rSet.Put(
                             SfxStringItem(
                                 rPool.GetWhich( SID_INET_NOPROXY),
-                                officecfg::Inet::Settings::ooInetNoProxy::get(
-                                    comphelper::getProcessComponentContext()))))
+                                (officecfg::Inet::Settings::ooInetNoProxy::
+                                 get()))))
                     {
                         bRet = true;
                     }
@@ -543,8 +538,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
     SvtPathOptions aPathOptions;
     SvtMiscOptions aMiscOptions;
     boost::shared_ptr< comphelper::ConfigurationChanges > batch(
-        comphelper::ConfigurationChanges::create(
-            comphelper::getProcessComponentContext()));
+        comphelper::ConfigurationChanges::create());
     if ( SFX_ITEM_SET == rSet.GetItemState(rPool.GetWhich(SID_ATTR_BUTTON_OUTSTYLE3D), sal_True, &pItem) )
     {
         DBG_ASSERT(pItem->ISA(SfxBoolItem), "BoolItem expected");
@@ -709,8 +703,7 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
     {
         DBG_ASSERT(pItem->ISA(SfxUInt16Item), "UInt16Item expected");
         sal_uInt16 nUndoCount = ((const SfxUInt16Item*)pItem)->GetValue();
-        officecfg::Office::Common::Undo::Steps::set(
-            comphelper::getProcessComponentContext(), batch, nUndoCount);
+        officecfg::Office::Common::Undo::Steps::set(nUndoCount, batch);
 
         // To catch all Undo-Managers: Iterate over all Frames
         for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst();
@@ -759,44 +752,38 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
     {
         DBG_ASSERT( pItem->ISA(SfxUInt16Item), "UInt16Item expected" );
         officecfg::Inet::Settings::ooInetProxyType::set(
-            comphelper::getProcessComponentContext(), batch,
-            static_cast< SfxUInt16Item const * >(pItem)->GetValue());
+            static_cast< SfxUInt16Item const * >(pItem)->GetValue(), batch);
     }
 
     if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_NAME ), sal_True, &pItem ) )
     {
         DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" );
         officecfg::Inet::Settings::ooInetHTTPProxyName::set(
-            comphelper::getProcessComponentContext(), batch,
-            static_cast< SfxStringItem const * >(pItem)->GetValue());
+            static_cast< SfxStringItem const * >(pItem)->GetValue(), batch);
     }
     if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_HTTP_PROXY_PORT ), sal_True, &pItem ) )
     {
         DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" );
         officecfg::Inet::Settings::ooInetHTTPProxyPort::set(
-            comphelper::getProcessComponentContext(), batch,
-            static_cast< SfxInt32Item const * >(pItem)->GetValue());
+            static_cast< SfxInt32Item const * >(pItem)->GetValue(), batch);
     }
     if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_NAME ), sal_True, &pItem ) )
     {
         DBG_ASSERT( pItem->ISA(SfxStringItem), "StringItem expected" );
         officecfg::Inet::Settings::ooInetFTPProxyName::set(
-            comphelper::getProcessComponentContext(), batch,
-            static_cast< SfxStringItem const * >(pItem)->GetValue());
+            static_cast< SfxStringItem const * >(pItem)->GetValue(), batch);
     }
     if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( SID_INET_FTP_PROXY_PORT ), sal_True, &pItem ) )
     {
         DBG_ASSERT( pItem->ISA(SfxInt32Item), "Int32Item expected" );
         officecfg::Inet::Settings::ooInetFTPProxyPort::set(
-            comphelper::getProcessComponentContext(), batch,
-            static_cast< SfxInt32Item const * >(pItem)->GetValue());
+            static_cast< SfxInt32Item const * >(pItem)->GetValue(), batch);
     }
     if ( SFX_ITEM_SET == rSet.GetItemState(SID_INET_NOPROXY, sal_True, &pItem))
     {
         DBG_ASSERT(pItem->ISA(SfxStringItem), "StringItem expected");
         officecfg::Inet::Settings::ooInetNoProxy::set(
-            comphelper::getProcessComponentContext(), batch,
-            static_cast< SfxStringItem const * >(pItem)->GetValue());
+            static_cast< SfxStringItem const * >(pItem)->GetValue(), batch);
     }
 
     // Secure-Referers
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index de87975..ecc5fb4 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -28,7 +28,6 @@
 
 #include <com/sun/star/embed/VerbDescriptor.hpp>
 #include <com/sun/star/embed/VerbAttributes.hpp>
-#include <comphelper/processfactory.hxx>
 #include <basic/sbstar.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <rtl/oustringostreaminserter.hxx>
@@ -487,8 +486,7 @@ void SfxShell::SetUndoManager( ::svl::IUndoManager *pNewUndoMgr )
     pUndoMgr = pNewUndoMgr;
     if ( pUndoMgr )
         pUndoMgr->SetMaxUndoActionCount(
-            officecfg::Office::Common::Undo::Steps::get(
-                comphelper::getProcessComponentContext()));
+            officecfg::Office::Common::Undo::Steps::get());
 }
 
 //--------------------------------------------------------------------
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index b030d4e..c4685ab 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -205,7 +205,7 @@ sal_Bool IsOOoLockFileUsed()
 
 bool IsLockingUsed()
 {
-    return officecfg::Office::Common::Misc::UseLocking::get(comphelper::getProcessComponentContext());
+    return officecfg::Office::Common::Misc::UseLocking::get();
 }
 
 } // anonymous namespace
diff --git a/svl/source/config/asiancfg.cxx b/svl/source/config/asiancfg.cxx
index 2e9e43f..5c0c4fa 100644
--- a/svl/source/config/asiancfg.cxx
+++ b/svl/source/config/asiancfg.cxx
@@ -108,7 +108,7 @@ bool SvxAsianConfig::IsKerningWesternTextOnly() const {
 
 void SvxAsianConfig::SetKerningWesternTextOnly(bool value) {
     officecfg::Office::Common::AsianLayout::IsKerningWesternTextOnly::set(
-        impl_->context, impl_->batch, value);
+        value, impl_->batch, impl_->context);
 }
 
 sal_Int16 SvxAsianConfig::GetCharDistanceCompression() const {
@@ -119,7 +119,7 @@ sal_Int16 SvxAsianConfig::GetCharDistanceCompression() const {
 
 void SvxAsianConfig::SetCharDistanceCompression(sal_Int16 value) {
     officecfg::Office::Common::AsianLayout::CompressCharacterDistance::set(
-        impl_->context, impl_->batch, value);
+        value, impl_->batch, impl_->context);
 }
 
 css::uno::Sequence< css::lang::Locale > SvxAsianConfig::GetStartEndCharLocales()
@@ -173,7 +173,7 @@ void SvxAsianConfig::SetStartEndChars(
     assert((startChars == 0) == (endChars == 0));
     css::uno::Reference< css::container::XNameContainer > set(
         officecfg::Office::Common::AsianLayout::StartEndCharacters::get(
-            impl_->context, impl_->batch));
+            impl_->batch, impl_->context));
     rtl::OUString name(toString(locale));
     if (startChars == 0) {
         try {
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 8098e77..28fc1c9 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -30,7 +30,6 @@
 
 #include <algorithm>
 
-#include <comphelper/processfactory.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <tools/vcompat.hxx>
 #include <unotools/ucbstreamhelper.hxx>
@@ -179,13 +178,13 @@ void GraphicObject::ImplSetGraphicManager( const GraphicManager* pMgr, const rtl
                 if( !mpGlobalMgr )
                 {
                     mpGlobalMgr = new GraphicManager(
-                        officecfg::Office::Common::Cache::GraphicManager::TotalCacheSize::get(
-                            comphelper::getProcessComponentContext()),
-                        officecfg::Office::Common::Cache::GraphicManager::ObjectCacheSize::get(
-                            comphelper::getProcessComponentContext()));
+                        (officecfg::Office::Common::Cache::GraphicManager::
+                         TotalCacheSize::get()),
+                        (officecfg::Office::Common::Cache::GraphicManager::
+                         ObjectCacheSize::get()));
                     mpGlobalMgr->SetCacheTimeout(
-                        officecfg::Office::Common::Cache::GraphicManager::ObjectReleaseTime::get(
-                            comphelper::getProcessComponentContext()));
+                        officecfg::Office::Common::Cache::GraphicManager::
+                        ObjectReleaseTime::get());
                 }
 
                 mpMgr = mpGlobalMgr;
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 68406f6..2672e82 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -58,7 +58,6 @@
 #include <svl/itempool.hxx>
 #include <unotools/localedatawrapper.hxx>
 #include <com/sun/star/lang/Locale.hpp>
-#include <comphelper/processfactory.hxx>
 #include <i18npool/lang.h>
 #include <unotools/charclass.hxx>
 #include <unotools/syslocale.hxx>
@@ -108,8 +107,7 @@ const LocaleDataWrapper*    SdrGlobalData::GetLocaleData()
 OLEObjCache::OLEObjCache()
 :   Container( 0 )
 {
-    nSize = officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get(
-        comphelper::getProcessComponentContext());
+    nSize = officecfg::Office::Common::Cache::DrawingEngine::OLE_Objects::get();
     pTimer = new AutoTimer();
     Link aLink = LINK(this, OLEObjCache, UnloadCheckHdl);
 
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 6eda968..079162b 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -87,7 +87,6 @@
 #include <editeng/outlobj.hxx>
 #include "editeng/forbiddencharacterstable.hxx"
 #include <svl/zforlist.hxx>
-#include <comphelper/processfactory.hxx>
 #include <comphelper/servicehelper.hxx>
 #include <comphelper/storagehelper.hxx>
 
@@ -179,7 +178,9 @@ void SdrModel::ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* _pEmbe
     mbAddExtLeading = sal_False;
     mnHandoutPageCount = 0;
 
-    mnCharCompressType = officecfg::Office::Common::AsianLayout::CompressCharacterDistance::get(comphelper::getProcessComponentContext());
+    mnCharCompressType =
+        officecfg::Office::Common::AsianLayout::CompressCharacterDistance::
+        get();
 
 #ifdef OSL_LITENDIAN
     nStreamNumberFormat=NUMBERFORMAT_INT_LITTLEENDIAN;
diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx
index 91dbf07..9bd534c 100644
--- a/sw/source/ui/docvw/srcedtw.cxx
+++ b/sw/source/ui/docvw/srcedtw.cxx
@@ -33,7 +33,6 @@
 
 #include <com/sun/star/beans/XMultiPropertySet.hpp>
 #include <com/sun/star/beans/XPropertiesChangeListener.hpp>
-#include <comphelper/processfactory.hxx>
 #include <cppuhelper/implbase1.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <rtl/oustringostreaminserter.hxx>
@@ -273,8 +272,7 @@ SwSrcEditWindow::SwSrcEditWindow( Window* pParent, SwSrcView* pParentView ) :
     // long as there are no derivations:
     listener_ = new ChangesListener(*this);
     css::uno::Reference< css::beans::XMultiPropertySet > n(
-        officecfg::Office::Common::Font::SourceViewFont::get(
-            comphelper::getProcessComponentContext()),
+        officecfg::Office::Common::Font::SourceViewFont::get(),
         css::uno::UNO_QUERY_THROW);
     {
         osl::MutexGuard g(mutex_);
@@ -978,8 +976,7 @@ sal_Bool  lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType aLangu
 void SwSrcEditWindow::SetFont()
 {
     rtl::OUString sFontName(
-        officecfg::Office::Common::Font::SourceViewFont::FontName::get(
-            comphelper::getProcessComponentContext()).
+        officecfg::Office::Common::Font::SourceViewFont::FontName::get().
         get_value_or(rtl::OUString()));
     if(sFontName.isEmpty())
     {
@@ -1008,9 +1005,7 @@ void SwSrcEditWindow::SetFont()
     Size aSize(rFont.GetSize());
     //font height is stored in point and set in twip
     aSize.Height() =
-        officecfg::Office::Common::Font::SourceViewFont::FontHeight::get(
-            comphelper::getProcessComponentContext())
-        * 20;
+        officecfg::Office::Common::Font::SourceViewFont::FontHeight::get() * 20;
     aFont.SetSize(pOutWin->LogicToPixel(aSize, MAP_TWIP));
     GetTextEngine()->SetFont( aFont );
     pOutWin->SetFont(aFont);
diff --git a/sw/source/ui/ribbar/inputwin.cxx b/sw/source/ui/ribbar/inputwin.cxx
index 34497e8..fe643d9 100644
--- a/sw/source/ui/ribbar/inputwin.cxx
+++ b/sw/source/ui/ribbar/inputwin.cxx
@@ -28,7 +28,6 @@
 
 #include "sal/config.h"
 
-#include <comphelper/processfactory.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <tools/gen.hxx>
 #include <sfx2/imgmgr.hxx>
@@ -243,8 +242,7 @@ void SwInputWindow::ShowWin()
             {
                 m_bResetUndo = true;
                 SAL_WARN_IF(
-                    officecfg::Office::Common::Undo::Steps::get(
-                        comphelper::getProcessComponentContext()) <= 0,
+                    officecfg::Office::Common::Undo::Steps::get() <= 0,
                     "sw", "/org.openoffice.Office.Common/Undo/Steps <= 0");
 
                 m_bDoesUndo = pWrtShell->DoesUndo();
diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx
index 0b10a46..c2ee944 100644
--- a/sw/source/ui/uiview/view.cxx
+++ b/sw/source/ui/uiview/view.cxx
@@ -31,7 +31,6 @@
 #include <stdlib.h>
 #include <hintids.hxx>
 #include <comphelper/string.hxx>
-#include <comphelper/processfactory.hxx>
 #include <officecfg/Office/Common.hxx>
 #include <rtl/logfile.hxx>
 #include <vcl/graph.hxx>
@@ -948,8 +947,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
         SetVisArea( pDocSh->GetVisArea(ASPECT_CONTENT),sal_False);
 
     SAL_WARN_IF(
-        officecfg::Office::Common::Undo::Steps::get(
-            comphelper::getProcessComponentContext()) <= 0,
+        officecfg::Office::Common::Undo::Steps::get() <= 0,
         "sw", "/org.openoffice.Office.Common/Undo/Steps <= 0");
     pWrtShell->DoUndo( true );
 
diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx
index 0b659f8..1a27433 100644
--- a/vcl/aqua/source/gdi/salprn.cxx
+++ b/vcl/aqua/source/gdi/salprn.cxx
@@ -29,8 +29,6 @@
 
 #include <boost/bind.hpp>
 
-#include "comphelper/processfactory.hxx"
-
 #include "officecfg/Office/Common.hxx"
 
 #include "vcl/print.hxx"
@@ -325,7 +323,8 @@ sal_uLong AquaSalInfoPrinter::GetCapabilities( const ImplJobSetup*, sal_uInt16 i
         case PRINTER_CAPABILITIES_SETPAPER:
             return 1;
         case PRINTER_CAPABILITIES_EXTERNALDIALOG:
-            return officecfg::Office::Common::Misc::UseSystemPrintDialog::get(comphelper::getProcessComponentContext()) ? 1 : 0;
+            return officecfg::Office::Common::Misc::UseSystemPrintDialog::get()
+                ? 1 : 0;
         case PRINTER_CAPABILITIES_PDF:
             return 1;
         case PRINTER_CAPABILITIES_USEPULLMODEL:
@@ -520,7 +519,10 @@ sal_Bool AquaSalInfoPrinter::StartJob( const rtl::OUString* i_pFileName,
             if( pPrintOperation )
             {
                 NSObject* pReleaseAfterUse = nil;
-                bool bShowPanel = (! i_rController.isDirectPrint() && officecfg::Office::Common::Misc::UseSystemPrintDialog::get(comphelper::getProcessComponentContext()) && i_rController.isShowDialogs() );
+                bool bShowPanel = !i_rController.isDirectPrint()
+                    && (officecfg::Office::Common::Misc::UseSystemPrintDialog::
+                        get())
+                    && i_rController.isShowDialogs();
                 [pPrintOperation setShowsPrintPanel: bShowPanel ? YES : NO ];
                 [pPrintOperation setShowsProgressPanel: bShowProgressPanel ? YES : NO];
 
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index 4449914..801788d 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -26,8 +26,6 @@
  *
  ************************************************************************/
 
-#include "comphelper/processfactory.hxx"
-
 #include "officecfg/Office/Common.hxx"
 
 #include "osl/module.h"
@@ -58,7 +56,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase )
 #ifndef ANDROID
     // Disable gtk3 plugin load except in experimental mode for now.
     if( rModuleBase.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gtk3" ) ) &&
-        !officecfg::Office::Common::Misc::ExperimentalMode::get( comphelper::getProcessComponentContext() ) )
+        !officecfg::Office::Common::Misc::ExperimentalMode::get() )
         return NULL;
 #endif
     OUStringBuffer aModName( 128 );
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index 587a754..ffa584c 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -183,9 +183,8 @@ lcl_getGtkSalInstance()
 bool
 lcl_useSystemPrintDialog()
 {
-    uno::Reference<uno::XComponentContext> const xCtxt(comphelper::getProcessComponentContext());
-    return officecfg::Office::Common::Misc::UseSystemPrintDialog::get(xCtxt)
-        && officecfg::Office::Common::Misc::ExperimentalMode::get(xCtxt)
+    return officecfg::Office::Common::Misc::UseSystemPrintDialog::get()
+        && officecfg::Office::Common::Misc::ExperimentalMode::get()
         && lcl_getGtkSalInstance().getPrintWrapper()->supportsPrinting();
 }
 


More information about the Libreoffice-commits mailing list