[Libreoffice-commits] core.git: 2 commits - include/tools vcl/source

Caolán McNamara caolanm at redhat.com
Fri Oct 18 12:33:56 PDT 2013


 include/tools/string.hxx             |    2 +-
 vcl/source/uipreviewer/previewer.cxx |   30 +++++++++++++++++-------------
 2 files changed, 18 insertions(+), 14 deletions(-)

New commits:
commit adfb02be9a326e3be37bcb0511986826027ce5f5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 18 20:31:56 2013 +0100

    rework Init/Main ui-previewer post early language detect
    
    i.e. due to d07e7d692ddd2a9ab956a59bcc0f676c7d76bc10
    "wait until we know the UI language before initializing gtk"
    we need to have uno working earlier
    
    Change-Id: I77dbea78113c1c95b622a2367472a0111d0d32d1

diff --git a/vcl/source/uipreviewer/previewer.cxx b/vcl/source/uipreviewer/previewer.cxx
index 9cf4fe7..923c79d 100644
--- a/vcl/source/uipreviewer/previewer.cxx
+++ b/vcl/source/uipreviewer/previewer.cxx
@@ -23,11 +23,28 @@
 class UIPreviewApp : public Application
 {
 public:
+    virtual void Init();
     virtual int Main();
 };
 
 using namespace com::sun::star;
 
+void UIPreviewApp::Init()
+{
+    uno::Reference<uno::XComponentContext> xContext =
+        cppu::defaultBootstrap_InitialComponentContext();
+    uno::Reference<lang::XMultiComponentFactory> xFactory =
+        xContext->getServiceManager();
+    uno::Reference<lang::XMultiServiceFactory> xSFactory =
+        uno::Reference<lang::XMultiServiceFactory> (xFactory, uno::UNO_QUERY_THROW);
+    comphelper::setProcessServiceFactory(xSFactory);
+
+    // Create UCB (for backwards compatibility, in case some code still uses
+    // plain createInstance w/o args directly to obtain an instance):
+    ::ucb::UniversalContentBroker::create(
+        comphelper::getProcessComponentContext() );
+}
+
 int UIPreviewApp::Main()
 {
     std::vector<OUString> uifiles;
@@ -44,19 +61,6 @@ int UIPreviewApp::Main()
         return EXIT_FAILURE;
     }
 
-    uno::Reference<uno::XComponentContext> xContext =
-        cppu::defaultBootstrap_InitialComponentContext();
-    uno::Reference<lang::XMultiComponentFactory> xFactory =
-        xContext->getServiceManager();
-    uno::Reference<lang::XMultiServiceFactory> xSFactory =
-        uno::Reference<lang::XMultiServiceFactory> (xFactory, uno::UNO_QUERY_THROW);
-    comphelper::setProcessServiceFactory(xSFactory);
-
-    // Create UCB (for backwards compatibility, in case some code still uses
-    // plain createInstance w/o args directly to obtain an instance):
-    ::ucb::UniversalContentBroker::create(
-        comphelper::getProcessComponentContext() );
-
     // turn on tooltips
     Help::EnableQuickHelp();
 
commit 5712a06f2c6f0616df777053242803c3723bc743
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Oct 18 16:37:37 2013 +0100

    Related: fdo#38838 make String::Erase private
    
    Change-Id: I0a04798a38288eaa0cd4bc729303f8549ce4081a

diff --git a/include/tools/string.hxx b/include/tools/string.hxx
index 2e9e1cb..99d5f4a 100644
--- a/include/tools/string.hxx
+++ b/include/tools/string.hxx
@@ -107,6 +107,7 @@ private:
 
     StringCompare       CompareTo( const UniString& rStr,
                                    xub_StrLen nLen = STRING_LEN ) const;
+    UniString&          Erase( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN );
 
                         UniString( const int* pDummy );    // not implemented: to prevent UniString( NULL )
                         UniString(int); // not implemented; to detect misuses of
@@ -222,7 +223,6 @@ public:
                                 xub_StrLen nIndex = STRING_LEN );
     UniString&          Insert( sal_Unicode c, xub_StrLen nIndex = STRING_LEN );
     UniString&          Replace( xub_StrLen nIndex, xub_StrLen nLen, const UniString& rStr );
-    UniString&          Erase( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN );
     UniString           Copy( xub_StrLen nIndex = 0, xub_StrLen nCount = STRING_LEN ) const;
 
     sal_Bool            Equals( const UniString& rStr ) const;


More information about the Libreoffice-commits mailing list