[Libreoffice-commits] .: sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Wed Nov 3 13:40:11 PDT 2010


 sw/source/filter/html/htmlform.cxx           |    2 +-
 sw/source/filter/ww8/docxattributeoutput.cxx |    6 +++---
 sw/source/filter/ww8/docxexportfilter.cxx    |    8 ++++----
 sw/source/filter/ww8/wrtw8nds.cxx            |    8 ++++----
 sw/source/filter/ww8/wrtww8.cxx              |    4 ++--
 sw/source/filter/ww8/ww8par3.cxx             |   14 +++++++-------
 sw/source/filter/ww8/ww8par5.cxx             |   16 ++++++++--------
 sw/source/ui/app/docsh.cxx                   |    4 ++--
 sw/source/ui/config/mailconfigpage.cxx       |    3 +--
 sw/source/ui/dbui/mailmergehelper.cxx        |    2 +-
 sw/source/ui/docvw/SidebarWin.cxx            |    6 +++---
 sw/source/ui/uiview/viewling.cxx             |    8 ++++----
 sw/source/ui/uno/dlelstnr.cxx                |    8 +++-----
 sw/source/ui/vba/vbacheckbox.cxx             |    2 +-
 14 files changed, 44 insertions(+), 47 deletions(-)

New commits:
commit 3fb951dae5277d1b1ddda749ff3d1266ede274c0
Author: Gert Faller <gertfaller at aliceadsl.fr>
Date:   Wed Nov 3 20:39:57 2010 +0000

    use RTL_CONSTASCII_USTRINGPARAM macro

diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index fbd61c0..a40a9a8 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -1758,7 +1758,7 @@ void SwHTMLParser::InsertInput()
     case HTML_IT_RADIO:
         {
             if( !bValue )
-                aTmp <<= OUString::createFromAscii( OOO_STRING_SVTOOLS_HTML_on );
+                aTmp <<= OUString(RTL_CONSTASCII_USTRINGPARAM( OOO_STRING_SVTOOLS_HTML_on ));
             xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("RefValue")),
                                         aTmp );
             aTmp <<= OUString();
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 40c31e7..6f585cc 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -799,7 +799,7 @@ void DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, co
                 rNode.GetLang( nPos ) ) );
     OUString sLang( aLocale.Language );
     if ( aLocale.Country.getLength( ) > 0 )
-        sLang += OUString::createFromAscii( "-" ) + OUString( aLocale.Country );
+        sLang += OUString(RTL_CONSTASCII_USTRINGPARAM( "-" )) + OUString( aLocale.Country );
     m_pSerializer->singleElementNS( XML_w, XML_lid,
             FSNS( XML_w, XML_val ),
             OUStringToOString( sLang, RTL_TEXTENCODING_UTF8 ).getStr( ), FSEND );
@@ -1756,7 +1756,7 @@ void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* pSdrObj, const Size& rS
     {
         uno::Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
         if( xPropSet.is() )
-            xChartDoc.set( xPropSet->getPropertyValue( rtl::OUString::createFromAscii("Model") ), uno::UNO_QUERY );
+            xChartDoc.set( xPropSet->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Model")) ), uno::UNO_QUERY );
     }
 
     if( xChartDoc.is() )
@@ -1781,7 +1781,7 @@ void DocxAttributeOutput::WriteOLE2Obj( const SdrObject* pSdrObj, const Size& rS
 
         // should get the unique id
         sal_Int32 nID = 1;
-        OUString sName = rtl::OUString::createFromAscii("Object 1");
+        OUString sName(RTL_CONSTASCII_USTRINGPARAM("Object 1"));
         uno::Reference< container::XNamed > xNamed( xShape, uno::UNO_QUERY );
         if( xNamed.is() )
             sName = xNamed->getName();
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index 771e495..ed3d29a 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -154,7 +154,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan
         {
             uno::Reference< registry::XRegistryKey > xNewKey1(
                     static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
-                        OUString::createFromAscii( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" ) ) );
+                        OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" )) ) );
             xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
 
             bRet = sal_True;
@@ -168,7 +168,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan
         {
             uno::Reference< registry::XRegistryKey > xNewKey1(
                     static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
-                        OUString::createFromAscii( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" ) ) );
+                        OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" )) ) );
             xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
 
             bRet = sal_True;
@@ -202,7 +202,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplN
                     DocxExport_createInstance,
                     DocxExport_getSupportedServiceNames() ) );
     } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFEXPORT ) == 0 ) {
-        const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFEXPORT ) );
+        const OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT));
 
         xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
                     reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
@@ -210,7 +210,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplN
                     RtfExport_createInstance,
                     RtfExport_getSupportedServiceNames() ) );
     } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) {
-        const OUString aServiceName( OUString::createFromAscii( IMPL_NAME_RTFIMPORT ) );
+        const OUString aServiceName( OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT )) );
 
         xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
                     reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 277387a..16fcfa3 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1823,7 +1823,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
                 if ( pFieldmark->GetFieldname().equalsAscii( ODF_UNHANDLED ) )
                 {
                     IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find(
-                            rtl::OUString::createFromAscii( ODF_ID_PARAM ) );
+                            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )) );
                     if ( it != pFieldmark->GetParameters()->end() )
                     {
                         rtl::OUString sFieldId;
@@ -1832,7 +1832,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
                     }
 
                     it = pFieldmark->GetParameters()->find(
-                            rtl::OUString::createFromAscii( ODF_CODE_PARAM ) );
+                            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_CODE_PARAM )) );
                     if ( it != pFieldmark->GetParameters()->end() )
                     {
                         rtl::OUString sOUCode;
@@ -1851,7 +1851,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
                 {
                     // Check for the presence of a linked OLE object
                     IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find(
-                            rtl::OUString::createFromAscii( ODF_OLE_PARAM ) );
+                            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_OLE_PARAM )) );
                     if ( it != pFieldmark->GetParameters()->end() )
                     {
                         rtl::OUString sOleId;
@@ -1872,7 +1872,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
                 if ( pFieldmark->GetFieldname().equalsAscii( ODF_UNHANDLED ) )
                 {
                     IFieldmark::parameter_map_t::const_iterator it = pFieldmark->GetParameters()->find(
-                            rtl::OUString::createFromAscii( ODF_ID_PARAM ) );
+                            rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )) );
                     if ( it != pFieldmark->GetParameters()->end() )
                     {
                         rtl::OUString sFieldId;
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 798bfe0..1ef3a03 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3565,7 +3565,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
         ffres = 1;
     else if ( type == 2 )
     {
-        ::sw::mark::IFieldmark::parameter_map_t::const_iterator pResParameter = rFieldmark.GetParameters()->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN));
+        ::sw::mark::IFieldmark::parameter_map_t::const_iterator pResParameter = rFieldmark.GetParameters()->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN)));
         if(pResParameter != rFieldmark.GetParameters()->end())
             pResParameter->second >>= ffres;
         else
@@ -3578,7 +3578,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
     {
         aFldHeader[5] |= 0x80; // ffhaslistbox
         const ::sw::mark::IFieldmark::parameter_map_t* const pParameters = rFieldmark.GetParameters();
-        ::sw::mark::IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY));
+        ::sw::mark::IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY)));
         if(pListEntries != pParameters->end())
         {
             uno::Sequence< ::rtl::OUString > vListEntries;
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 62ee798..cae7e92 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -173,7 +173,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
 
     if (aBookmarkName.Len()>0) {
         maFieldStack.back().SetBookmarkName(aBookmarkName);
-        maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_FORMTEXT));
+        maFieldStack.back().SetBookmarkType(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMTEXT)));
         maFieldStack.back().getParameters()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Description"))] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
         maFieldStack.back().getParameters()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"))] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
     }
@@ -223,13 +223,13 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
         IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
         IFieldmark* pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeNoTextFieldBookmark(
                 *pPaM, aBookmarkName,
-                rtl::OUString::createFromAscii( ODF_FORMCHECKBOX ) ) );
+                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_FORMCHECKBOX )) ) );
         ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
         if (pFieldmark!=NULL) {
             IFieldmark::parameter_map_t* const pParameters = pFieldmark->GetParameters();
             ICheckboxFieldmark* pCheckboxFm = dynamic_cast<ICheckboxFieldmark*>(pFieldmark);
-            (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_NAME)] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
-            (*pParameters)[::rtl::OUString::createFromAscii(ODF_FORMCHECKBOX_HELPTEXT)] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
+            (*pParameters)[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMCHECKBOX_NAME))] = uno::makeAny(::rtl::OUString(aFormula.sTitle));
+            (*pParameters)[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMCHECKBOX_HELPTEXT))] = uno::makeAny(::rtl::OUString(aFormula.sToolTip));
             if(pCheckboxFm)
                 pCheckboxFm->SetChecked(aFormula.nChecked);
             // set field data here...
@@ -296,15 +296,15 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
             IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
             IFieldmark *pFieldmark = dynamic_cast<IFieldmark*>(
                     pMarksAccess->makeNoTextFieldBookmark( *pPaM, aBookmarkName,
-                           ::rtl::OUString::createFromAscii( ODF_FORMDROPDOWN ) ) );
+                           ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_FORMDROPDOWN )) ) );
             ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
             if ( pFieldmark != NULL )
             {
                 uno::Sequence< ::rtl::OUString > vListEntries(aFormula.maListEntries.size());
                 ::std::copy(aFormula.maListEntries.begin(), aFormula.maListEntries.end(), ::comphelper::stl_begin(vListEntries));
-                (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY)] = uno::makeAny(vListEntries);
+                (*pFieldmark->GetParameters())[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY))] = uno::makeAny(vListEntries);
                 sal_Int32 nIndex = aFormula.fDropdownIndex  < aFormula.maListEntries.size() ? aFormula.fDropdownIndex : 0;
-                (*pFieldmark->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = uno::makeAny(nIndex);
+                (*pFieldmark->GetParameters())[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT))] = uno::makeAny(nIndex);
                 // set field data here...
             }
         }
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 4b3f7c8..31d110b 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -705,7 +705,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
             SwPaM aFldPam( maFieldStack.back().GetPtNode(), maFieldStack.back().GetPtCntnt(), aEndPos.nNode, aEndPos.nContent.GetIndex());
             IDocumentMarkAccess* pMarksAccess = rDoc.getIDocumentMarkAccess( );
             IFieldmark *pFieldmark = dynamic_cast<IFieldmark*>( pMarksAccess->makeFieldBookmark(
-                        aFldPam, maFieldStack.back().GetBookmarkName(), ::rtl::OUString::createFromAscii(ODF_FORMTEXT ) ) );
+                        aFldPam, maFieldStack.back().GetBookmarkName(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMTEXT )) ) );
             ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
             if (pFieldmark!=NULL) {
                 const IFieldmark::parameter_map_t& pParametersToAdd = maFieldStack.back().getParameters();
@@ -755,7 +755,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
                     IFieldmark* pFieldmark = pMarksAccess->makeFieldBookmark(
                                 aFldPam,
                                 maFieldStack.back().GetBookmarkName(),
-                                rtl::OUString::createFromAscii( ODF_UNHANDLED ) );
+                                rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_UNHANDLED )) );
                     if ( pFieldmark )
                     {
                         const IFieldmark::parameter_map_t& pParametersToAdd = maFieldStack.back().getParameters();
@@ -763,11 +763,11 @@ sal_uInt16 SwWW8ImplReader::End_Field()
                         rtl::OUString sFieldId = rtl::OUString::valueOf( sal_Int32( maFieldStack.back().mnFieldId ) );
                         pFieldmark->GetParameters()->insert(
                                 std::pair< rtl::OUString, uno::Any > (
-                                    rtl::OUString::createFromAscii( ODF_ID_PARAM ),
+                                    rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_ID_PARAM )),
                                     uno::makeAny( sFieldId ) ) );
                         pFieldmark->GetParameters()->insert(
                                 std::pair< rtl::OUString, uno::Any > (
-                                    rtl::OUString::createFromAscii( ODF_CODE_PARAM ),
+                                    rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_CODE_PARAM )),
                                     uno::makeAny( aCode ) ) );
 
                         if ( maFieldStack.back().mnObjLocFc > 0 )
@@ -800,7 +800,7 @@ sal_uInt16 SwWW8ImplReader::End_Field()
                             // Store the OLE Id as a parameter
                             pFieldmark->GetParameters()->insert(
                                     std::pair< rtl::OUString, uno::Any >(
-                                        rtl::OUString::createFromAscii( ODF_OLE_PARAM ),
+                                        rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ODF_OLE_PARAM )),
                                         uno::makeAny( rtl::OUString( sOleId ) ) ) );
                         }
 
@@ -2255,7 +2255,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, String& rStr )
     if (1) {
     ::rtl::OUString aBookmarkName=(RTL_CONSTASCII_USTRINGPARAM("_REF"));
     maFieldStack.back().SetBookmarkName(aBookmarkName);
-    maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_PAGEREF));
+    maFieldStack.back().SetBookmarkType(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_PAGEREF)));
     maFieldStack.back().AddParam(rtl::OUString(), sName);
     return FLD_TEXT;
     }
@@ -2966,7 +2966,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
     if (1) {
     ::rtl::OUString aBookmarkName=(RTL_CONSTASCII_USTRINGPARAM("_TOC"));
     maFieldStack.back().SetBookmarkName(aBookmarkName);
-    maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_TOC));
+    maFieldStack.back().SetBookmarkType(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_TOC)));
 //     maFieldStack.back().AddParam(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Description")), aFormula.sToolTip);
     return FLD_TEXT;
     }
@@ -3494,7 +3494,7 @@ eF_ResT SwWW8ImplReader::Read_F_Hyperlink( WW8FieldDesc* /*pF*/, String& rStr )
     if (1) {
     ::rtl::OUString aBookmarkName=(RTL_CONSTASCII_USTRINGPARAM("_HYPERLINK"));
     maFieldStack.back().SetBookmarkName(aBookmarkName);
-    maFieldStack.back().SetBookmarkType(::rtl::OUString::createFromAscii(ODF_HYPERLINK));
+    maFieldStack.back().SetBookmarkType(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_HYPERLINK)));
 //     maFieldStack.back().AddParam(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Description")), aFormula.sToolTip);
     return FLD_TEXT;
     }
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index 5bfd6ea..0879977 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -442,8 +442,8 @@ sal_Bool SwDocShell::SaveAs( SfxMedium& rMedium )
                 GetModel(), uno::UNO_QUERY_THROW);
             uno::Reference<document::XDocumentProperties> xDocProps
                 = xDPS->getDocumentProperties();
-            xDocProps->setTemplateName(::rtl::OUString::createFromAscii(""));
-            xDocProps->setTemplateURL(::rtl::OUString::createFromAscii(""));
+            xDocProps->setTemplateName(::rtl::OUString());
+            xDocProps->setTemplateURL(::rtl::OUString());
             xDocProps->setTemplateDate(::util::DateTime());
         }
     }
diff --git a/sw/source/ui/config/mailconfigpage.cxx b/sw/source/ui/config/mailconfigpage.cxx
index 0fbcfff..42de2e6 100644
--- a/sw/source/ui/config/mailconfigpage.cxx
+++ b/sw/source/ui/config/mailconfigpage.cxx
@@ -404,8 +404,7 @@ void SwTestAccountSettingsDialog::Test()
                     new SwConnectionContext(
                         m_pParent->m_aServerED.GetText(),
                         sal::static_int_cast< sal_Int16, sal_Int64 >(m_pParent->m_aPortNF.GetValue()),
-                        ::rtl::OUString::createFromAscii(
-                                m_pParent->m_aSecureCB.IsChecked() ? "Ssl" : "Insecure"));
+                        m_pParent->m_aSecureCB.IsChecked() ? OUString(RTL_CONSTASCII_USTRINGPARAM("Ssl")) : OUString(RTL_CONSTASCII_USTRINGPARAM("Insecure")));
             xMailService->connect(xConnectionContext, xAuthenticator);
             bIsLoggedIn = xMailService->isConnected();
             if( xInMailService.is() )
diff --git a/sw/source/ui/dbui/mailmergehelper.cxx b/sw/source/ui/dbui/mailmergehelper.cxx
index 6aa9f12..1a8a103 100644
--- a/sw/source/ui/dbui/mailmergehelper.cxx
+++ b/sw/source/ui/dbui/mailmergehelper.cxx
@@ -169,7 +169,7 @@ uno::Reference< mail::XSmtpService > ConnectToSmtpServer(
                     new SwConnectionContext(
                         rConfigItem.GetMailServer(),
                         rConfigItem.GetMailPort(),
-                        ::rtl::OUString::createFromAscii( rConfigItem.IsSecureConnection() ? "Ssl" : "Insecure"));
+                        rConfigItem.IsSecureConnection() ? OUString(RTL_CONSTASCII_USTRINGPARAM("Ssl")) : OUString(RTL_CONSTASCII_USTRINGPARAM("Insecure")) );
             xSmtpServer->connect(xConnectionContext, xAuthenticator);
             rxInMailService = uno::Reference< mail::XMailService >( xSmtpServer, uno::UNO_QUERY );
         }
diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx
index 72a9da5..c5b74f7 100644
--- a/sw/source/ui/docvw/SidebarWin.cxx
+++ b/sw/source/ui/docvw/SidebarWin.cxx
@@ -93,7 +93,7 @@ namespace sw { namespace sidebarwindows {
 #define POSTIT_SHADOW_BRIGHT    Color(180,180,180)
 #define POSTIT_SHADOW_DARK      Color(83,83,83)
 
-#define EMPTYSTRING             rtl::OUString::createFromAscii("")
+#define EMPTYSTRING             rtl::OUString()
 
 /************** SwSidebarWin************************************/
 SwSidebarWin::SwSidebarWin( SwEditWin& rEditWin,
@@ -400,7 +400,7 @@ void SwSidebarWin::CheckMetaText()
     else if (sMeta.Len() > 22)
     {
         sMeta.Erase(20);
-        sMeta = sMeta + rtl::OUString::createFromAscii("...");
+        sMeta = sMeta + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("..."));
     }
     if ( mpMetadataAuthor->GetText() != sMeta )
     {
@@ -426,7 +426,7 @@ void SwSidebarWin::CheckMetaText()
     }
     if (GetTime()!=0)
     {
-        sMeta = sMeta + rtl::OUString::createFromAscii(" ")  + rLocalData.getTime( GetTime(),false );
+        sMeta = sMeta + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" "))  + rLocalData.getTime( GetTime(),false );
     }
     if ( mpMetadataDate->GetText() != sMeta )
     {
diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
index bcbcfa1..bbeca70 100644
--- a/sw/source/ui/uiview/viewling.cxx
+++ b/sw/source/ui/uiview/viewling.cxx
@@ -737,8 +737,8 @@ sal_Bool SwView::ExecSpellPopup(const Point& rPt)
                 aEvent.ExecutePosition.Y = aPixPos.Y();
                 Menu* pMenu = 0;
 
-                ::rtl::OUString sMenuName = ::rtl::OUString::createFromAscii( 
-                    bUseGrammarContext ? "private:resource/GrammarContextMenu" : "private:resource/SpellContextMenu");
+                ::rtl::OUString sMenuName  = bUseGrammarContext ?
+                    OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/GrammarContextMenu")) : OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/SpellContextMenu"));
                 if(TryContextMenuInterception( *pPopup, sMenuName, pMenu, aEvent ))
                 {
                     
@@ -890,7 +890,7 @@ public:
     assert(fieldBM!=NULL);
     if (fieldBM!=NULL) {
         const IFieldmark::parameter_map_t* const pParameters = fieldBM->GetParameters();
-        IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_LISTENTRY));
+        IFieldmark::parameter_map_t::const_iterator pListEntries = pParameters->find(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_LISTENTRY)));
         if(pListEntries != pParameters->end())
         {
             Sequence< ::rtl::OUString> vListEntries;
@@ -971,7 +971,7 @@ BOOL SwView::ExecFieldPopup( const Point& rPt, IFieldmark *fieldBM )
     /*short ret=*/aFldDlg.Execute();
     sal_Int32 selection=aFldDlg.getSelection();
     if (selection>=0) {
-        (*fieldBM->GetParameters())[::rtl::OUString::createFromAscii(ODF_FORMDROPDOWN_RESULT)] = makeAny(selection);
+        (*fieldBM->GetParameters())[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ODF_FORMDROPDOWN_RESULT))] = makeAny(selection);
     }
 
     pWrtShell->Pop( sal_False );
diff --git a/sw/source/ui/uno/dlelstnr.cxx b/sw/source/ui/uno/dlelstnr.cxx
index 254d2e6..c2703de 100644
--- a/sw/source/ui/uno/dlelstnr.cxx
+++ b/sw/source/ui/uno/dlelstnr.cxx
@@ -56,8 +56,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::linguistic2;
 using namespace ::com::sun::star::linguistic2::LinguServiceEventFlags;
 
-#define A2OU(x)	OUString::createFromAscii(x)
-
 SwLinguServiceEventListener::SwLinguServiceEventListener()
 {
     Reference< XMultiServiceFactory > xMgr( comphelper::getProcessServiceFactory() );
@@ -65,20 +63,20 @@ SwLinguServiceEventListener::SwLinguServiceEventListener()
     {
         try
         {
-            OUString aSvcName( A2OU( "com.sun.star.frame.Desktop" ) );
+            OUString aSvcName( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) );
             xDesktop = Reference< frame::XDesktop >(
                     xMgr->createInstance( aSvcName ), UNO_QUERY );
             if (xDesktop.is())
                 xDesktop->addTerminateListener( this );
 
-            aSvcName = A2OU( "com.sun.star.linguistic2.LinguServiceManager" );
+            aSvcName = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.linguistic2.LinguServiceManager" ));
             xLngSvcMgr = Reference< XLinguServiceManager >( xMgr->createInstance( aSvcName ), UNO_QUERY );
             if (xLngSvcMgr.is())
                 xLngSvcMgr->addLinguServiceManagerListener( (XLinguServiceEventListener *) this );
 
             if (SvtLinguConfig().HasGrammarChecker())
             {
-                aSvcName = A2OU( "com.sun.star.linguistic2.ProofreadingIterator" );
+                aSvcName = OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.linguistic2.ProofreadingIterator" ));
                 xGCIterator = Reference< XProofreadingIterator >( xMgr->createInstance( aSvcName ), UNO_QUERY );
                 Reference< XLinguServiceEventBroadcaster > xBC( xGCIterator, UNO_QUERY );
                 if (xBC.is())
diff --git a/sw/source/ui/vba/vbacheckbox.cxx b/sw/source/ui/vba/vbacheckbox.cxx
index e4e0bc0..576e6df 100644
--- a/sw/source/ui/vba/vbacheckbox.cxx
+++ b/sw/source/ui/vba/vbacheckbox.cxx
@@ -74,7 +74,7 @@ sal_Bool SAL_CALL SwVbaCheckBox::getValue() throw ( uno::RuntimeException )
 
 void SAL_CALL SwVbaCheckBox::setValue( sal_Bool value ) throw ( uno::RuntimeException )
 {
-    rtl::OUString sValue = rtl::OUString::createFromAscii( value ? "on" : "off" );
+    rtl::OUString sValue = value ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("on")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("off"));
     mxFormField->addParam( rtl::OUString::createFromAscii( ECMA_FORMCHECKBOX_CHECKED ), sValue, sal_True );
 }
 


More information about the Libreoffice-commits mailing list