include/sfx2/sfxuno.hxx             |    5 -----
 sfx2/source/bastyp/mieclip.cxx      |    2 +-
 sfx2/source/bastyp/sfxhtml.cxx      |    2 +-
 sfx2/source/control/shell.cxx       |    2 +-
 sw/source/core/unocore/unodraw.cxx  |    2 +-
 sw/source/core/unocore/unoframe.cxx |    2 +-
 sw/source/core/unocore/unotext.cxx  |    2 +-
 sw/source/ui/utlui/unotools.cxx     |    9 ++++++++-
 8 files changed, 14 insertions(+), 12 deletions(-)

New commits:
commit d8fa15f0ea3bbf38f5142f83121b7c72c483c7f5
Author: Noel Grandin <n...@peralex.com>
Date:   Tue Jul 23 14:55:38 2013 +0200

    fdo#67213 - crash on opening AutoText dialog (Ctrl+F3)
    
    I created this bug with commit
    32eaa77db33b3b1f5793e92167b9f8c2708ea543
    "fdo#46808, Convert frame::FrameControl service to new style"
    
    If we cannot create a css::frame::FrameControl service, just continue.
    
    Change-Id: Iffd6952fd5153af5a1ab72af2bc55864816a750d

diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index 62fadcc..64d97c9 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -112,7 +112,14 @@ void SwOneExampleFrame::CreateControl()
     uno::Reference< lang::XMultiServiceFactory >
                                     xMgr = 
comphelper::getProcessServiceFactory();
     uno::Reference< uno::XComponentContext > xContext = 
comphelper::getProcessComponentContext();
-    m_xFrameControl = frame::FrameControl::create(xContext);
+    try
+    {
+        m_xFrameControl = frame::FrameControl::create(xContext);
+    }
+    catch ( css::uno::DeploymentException& )
+    {
+        return;
+    }
 
     uno::Reference< awt::XWindowPeer >  xParent( 
aTopWindow.GetComponentInterface() );
 
commit 312f3aac56b410021bdf3db70d36b7fe88b3744f
Author: Noel Grandin <n...@peralex.com>
Date:   Tue Jul 23 14:32:10 2013 +0200

    expand out the U2S and S2U macros from sfxuno.hxx
    
    They are vestiges of the old string classes.
    
    Change-Id: I5dd458bd2dac5f2e867ddaa731190f159b8a3b65

diff --git a/include/sfx2/sfxuno.hxx b/include/sfx2/sfxuno.hxx
index 3dee2ba..cab9200 100644
--- a/include/sfx2/sfxuno.hxx
+++ b/include/sfx2/sfxuno.hxx
@@ -66,11 +66,6 @@ bool GetEncryptionData_Impl( const SfxItemSet* pSet, 
css::uno::Sequence< css::be
 
 #define FrameSearchFlags            sal_Int32
 
-// Macros to convert string -> unicode and unicode -> string.
-// We use UTF8 everytime. Its the best way to do this!
-#define S2U(STRING)                             OStringToOUString(STRING, 
RTL_TEXTENCODING_UTF8)
-#define U2S(STRING)                             OUStringToOString(STRING, 
RTL_TEXTENCODING_UTF8)
-
 
//________________________________________________________________________________________________________________________
 //  macros for declaration and definition of uno-services
 
//________________________________________________________________________________________________________________________
diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx
index 71776fd..45404d8 100644
--- a/sfx2/source/bastyp/mieclip.cxx
+++ b/sfx2/source/bastyp/mieclip.cxx
@@ -60,7 +60,7 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream )
             else if (sTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("EndFragment")))
                 nFragEnd = sLine.copy(nIndex).toInt32();
             else if (sTmp.equalsL(RTL_CONSTASCII_STRINGPARAM("SourceURL")))
-                sBaseURL = S2U(sLine.copy(nIndex));
+                sBaseURL = OStringToOUString( sLine.copy(nIndex), 
RTL_TEXTENCODING_UTF8 );
 
             if (nEnd >= 0 && nStt >= 0 &&
                 (sBaseURL.Len() || rStream.Tell() >= 
static_cast<sal_Size>(nStt)))
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index bbbd5de..e45fcc1 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -255,7 +255,7 @@ sal_Bool SfxHTMLParser::FinishFileDownload( String& rStr )
 
         aStream.Seek( 0 );
         OString sBuffer = read_uInt8s_ToOString(aStream, nLen);
-        rStr = S2U(sBuffer);
+        rStr = OStringToOUString( sBuffer, RTL_TEXTENCODING_UTF8 );
     }
 
     delete pDLMedium;
diff --git a/sfx2/source/control/shell.cxx b/sfx2/source/control/shell.cxx
index 5542998..4f8b945 100644
--- a/sfx2/source/control/shell.cxx
+++ b/sfx2/source/control/shell.cxx
@@ -992,7 +992,7 @@ void SfxShell::SetVerbs(const com::sun::star::uno::Sequence 
< com::sun::star::em
         pNewSlot->fnExec = SFX_STUB_PTR(SfxShell,VerbExec);
         pNewSlot->fnState = SFX_STUB_PTR(SfxShell,VerbState);
         pNewSlot->pType = 0; // HACK(SFX_TYPE(SfxVoidItem)) ???
-        pNewSlot->pName = U2S(aVerbs[n].VerbName).getStr();
+        pNewSlot->pName = OUStringToOString( aVerbs[n].VerbName, 
RTL_TEXTENCODING_UTF8 ).getStr();
         pNewSlot->pLinkedSlot = 0;
         pNewSlot->nArgDefCount = 0;
         pNewSlot->pFirstArgDef = 0;
diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index 70b6528..b382b2e7 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -2028,7 +2028,7 @@ void SwXShape::attach(const uno::Reference< 
text::XTextRange > & xTextRange)
             {
                 uno::Any aPos;
                 aPos <<= xTextRange;
-                setPropertyValue(S2U("TextRange"), aPos);
+                setPropertyValue("TextRange", aPos);
                 uno::Reference< drawing::XShape > xTemp( (cppu::OWeakObject*) 
this, uno::UNO_QUERY );
                 xDP->add( xTemp );
             }
diff --git a/sw/source/core/unocore/unoframe.cxx 
b/sw/source/core/unocore/unoframe.cxx
index a667b37..d0ec1ef 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -2653,7 +2653,7 @@ uno::Reference< text::XTextCursor >  
SwXTextFrame::createTextCursor(void) throw(
         if(!pNewStartNode || pNewStartNode != pOwnStartNode)
         {
             uno::RuntimeException aExcept;
-            aExcept.Message = S2U("no text available");
+            aExcept.Message = "no text available";
             throw aExcept;
         }
 
diff --git a/sw/source/core/unocore/unotext.cxx 
b/sw/source/core/unocore/unotext.cxx
index 441e714..888d87c 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -2802,7 +2802,7 @@ SwXHeadFootText::createTextCursor() throw 
(uno::RuntimeException)
     if (!pNewStartNode || (pNewStartNode != pOwnStartNode))
     {
         uno::RuntimeException aExcept;
-        aExcept.Message = S2U("no text available");
+        aExcept.Message = "no text available";
         throw aExcept;
     }
     xRet = static_cast<text::XWordCursor*>(pXCursor);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to