use string literal OUString overloads
diff --git a/starmath/inc/unomodel.hxx b/starmath/inc/unomodel.hxx
index cf01ec4..b66c82a 100644
--- a/starmath/inc/unomodel.hxx
+++ b/starmath/inc/unomodel.hxx
@@ -59,8 +59,6 @@ public:

////////////////////////////////////////////////////////////

#define A2OU(pText)     rtl::OUString::createFromAscii(pText)

//-----------------------------------------------------------------------------
class SmModel : public SfxBaseModel,
                public comphelper::PropertySetHelper,
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx
index fbb9fb7..e59687f 100644
--- a/starmath/qa/cppunit/test_starmath.cxx
+++ b/starmath/qa/cppunit/test_starmath.cxx
@@ -159,7 +159,7 @@ Test::~Test()
void Test::tmEditMarker()
{
    {
        rtl::OUString sMarkedText(RTL_CONSTASCII_USTRINGPARAM("<?> under <?> under <?>"));
        rtl::OUString sMarkedText("<?> under <?> under <?>");
        m_pEditWindow->SetText(sMarkedText);
        m_pEditWindow->Flush();
        rtl::OUString sFinalText = m_pEditWindow->GetText();
@@ -167,20 +167,20 @@ void Test::tmEditMarker()
    }

    {
        rtl::OUString sTargetText(RTL_CONSTASCII_USTRINGPARAM("a under b under c"));
        rtl::OUString sTargetText("a under b under c");

        m_pEditWindow->SelNextMark();
        m_pEditWindow->Cut();
        m_pEditWindow->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("a")));
        m_pEditWindow->InsertText("a");

        m_pEditWindow->SelNextMark();
        m_pEditWindow->SelNextMark();
        m_pEditWindow->Cut();
        m_pEditWindow->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("c")));
        m_pEditWindow->InsertText("c");

        m_pEditWindow->SelPrevMark();
        m_pEditWindow->Cut();
        m_pEditWindow->InsertText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("b")));
        m_pEditWindow->InsertText("b");

        m_pEditWindow->Flush();
        rtl::OUString sFinalText = m_pEditWindow->GetText();
@@ -195,7 +195,7 @@ void Test::tmEditMarker()

void Test::tmEditAllClipboard()
{
    rtl::OUString sOriginalText(RTL_CONSTASCII_USTRINGPARAM("a over b"));
    rtl::OUString sOriginalText("a over b");

    {
        m_pEditWindow->SetText(sOriginalText);
@@ -225,7 +225,7 @@ void Test::tmEditAllClipboard()
    }

    {
        rtl::OUString sExpectedText(RTL_CONSTASCII_USTRINGPARAM("a over ba over b"));
        rtl::OUString sExpectedText("a over ba over b");

        m_pEditWindow->Paste();
        m_pEditWindow->Paste();
@@ -242,7 +242,7 @@ void Test::tmEditAllClipboard()

void Test::tmEditFailure()
{
    m_xDocShRef->SetText(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("color a b over {a/}")));
    m_xDocShRef->SetText("color a b over {a/}");

    const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser().NextError();

@@ -269,7 +269,7 @@ void Test::tmEditUndoRedo()
{
    EditEngine &rEditEngine = m_xDocShRef->GetEditEngine();

    rtl::OUString sStringOne(RTL_CONSTASCII_USTRINGPARAM("a under b"));
    rtl::OUString sStringOne("a under b");
    {
        rEditEngine.SetText(0, sStringOne);
        m_xDocShRef->UpdateText();
@@ -277,7 +277,7 @@ void Test::tmEditUndoRedo()
        CPPUNIT_ASSERT_MESSAGE("Strings must match", sStringOne == sFinalText);
    }

    rtl::OUString sStringTwo(RTL_CONSTASCII_USTRINGPARAM("a over b"));
    rtl::OUString sStringTwo("a over b");
    {
        rEditEngine.SetText(0, sStringTwo);
        m_xDocShRef->UpdateText();
@@ -328,7 +328,7 @@ void Test::tViewZoom()

    EditEngine &rEditEngine = m_xDocShRef->GetEditEngine();

    rtl::OUString sStringOne(RTL_CONSTASCII_USTRINGPARAM("a under b"));
    rtl::OUString sStringOne("a under b");
    {
        rEditEngine.SetText(0, sStringOne);
        m_xDocShRef->UpdateText();
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index c2d81f3..c74e65c0 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -802,17 +802,17 @@ sal_Bool SAL_CALL SmGraphicAccessible::copyText(
OUString SAL_CALL SmGraphicAccessible::getImplementationName()
    throw (RuntimeException)
{
    return A2OU("SmGraphicAccessible");
    return OUString("SmGraphicAccessible");
}

sal_Bool SAL_CALL SmGraphicAccessible::supportsService(
        const OUString& rServiceName )
    throw (RuntimeException)
{
    return  rServiceName == A2OU( "com::sun::star::accessibility::Accessible" ) ||
            rServiceName == A2OU( "com::sun::star::accessibility::AccessibleComponent" ) ||
            rServiceName == A2OU( "com::sun::star::accessibility::AccessibleContext" ) ||
            rServiceName == A2OU( "com::sun::star::accessibility::AccessibleText" );
    return  rServiceName == "com::sun::star::accessibility::Accessible" ||
            rServiceName == "com::sun::star::accessibility::AccessibleComponent" ||
            rServiceName == "com::sun::star::accessibility::AccessibleContext" ||
            rServiceName == "com::sun::star::accessibility::AccessibleText";
}

Sequence< OUString > SAL_CALL SmGraphicAccessible::getSupportedServiceNames()
@@ -820,10 +820,10 @@ Sequence< OUString > SAL_CALL SmGraphicAccessible::getSupportedServiceNames()
{
    Sequence< OUString > aNames(4);
    OUString *pNames = aNames.getArray();
    pNames[0] = A2OU( "com::sun::star::accessibility::Accessible" );
    pNames[1] = A2OU( "com::sun::star::accessibility::AccessibleComponent" );
    pNames[2] = A2OU( "com::sun::star::accessibility::AccessibleContext" );
    pNames[3] = A2OU( "com::sun::star::accessibility::AccessibleText" );
    pNames[0] = "com::sun::star::accessibility::Accessible";
    pNames[1] = "com::sun::star::accessibility::AccessibleComponent";
    pNames[2] = "com::sun::star::accessibility::AccessibleContext";
    pNames[3] = "com::sun::star::accessibility::AccessibleText";
    return aNames;
}

@@ -1954,16 +1954,16 @@ void SAL_CALL SmEditAccessible::removeEventListener( const uno::Reference< XAcce
OUString SAL_CALL SmEditAccessible::getImplementationName()
    throw (RuntimeException)
{
    return A2OU("SmEditAccessible");
    return OUString("SmEditAccessible");
}

sal_Bool SAL_CALL SmEditAccessible::supportsService(
        const OUString& rServiceName )
    throw (RuntimeException)
{
    return  rServiceName == A2OU( "com::sun::star::accessibility::Accessible" ) ||
            rServiceName == A2OU( "com::sun::star::accessibility::AccessibleComponent" ) ||
            rServiceName == A2OU( "com::sun::star::accessibility::AccessibleContext" );
    return  rServiceName == "com::sun::star::accessibility::Accessible" ||
            rServiceName == "com::sun::star::accessibility::AccessibleComponent" ||
            rServiceName == "com::sun::star::accessibility::AccessibleContext";
}

Sequence< OUString > SAL_CALL SmEditAccessible::getSupportedServiceNames()
@@ -1971,9 +1971,9 @@ Sequence< OUString > SAL_CALL SmEditAccessible::getSupportedServiceNames()
{
    Sequence< OUString > aNames(3);
    OUString *pNames = aNames.getArray();
    pNames[0] = A2OU( "com::sun::star::accessibility::Accessible" );
    pNames[1] = A2OU( "com::sun::star::accessibility::AccessibleComponent" );
    pNames[2] = A2OU( "com::sun::star::accessibility::AccessibleContext" );
    pNames[0] = "com::sun::star::accessibility::Accessible";
    pNames[1] = "com::sun::star::accessibility::AccessibleComponent";
    pNames[2] = "com::sun::star::accessibility::AccessibleContext";
    return aNames;
}

diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index 74247f9..15e71c5 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -70,7 +70,7 @@ static Sequence< OUString > lcl_GetFontPropertyNames()
    OUString *pNames = aNames.getArray();
    for( sal_Int32 i = 0; *ppPropName;  ++i, ++ppPropName )
    {
        pNames[i] = A2OU( *ppPropName );
        pNames[i] = OUString::createFromAscii( *ppPropName );
    }
    return aNames;
}
@@ -95,7 +95,7 @@ static Sequence< OUString > lcl_GetSymbolPropertyNames()
    OUString *pNames = aNames.getArray();
    for( sal_Int32 i = 0; *ppPropName;  ++i, ++ppPropName )
    {
        pNames[i] = A2OU( *ppPropName );
        pNames[i] = OUString::createFromAscii( *ppPropName );
    }
    return aNames;
}
@@ -176,7 +176,7 @@ static Sequence< OUString > lcl_GetPropertyNames(
    OUString *pNames = aNames.getArray();
    for (sal_Int32 i = 0;  i < nCount;  ++i, ++ppPropName)
    {
        pNames[i] = A2OU( *ppPropName );
        pNames[i] = OUString::createFromAscii( *ppPropName );
    }
    return aNames;
}
@@ -578,7 +578,7 @@ void SmMathConfig::Save()

void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
{
    Sequence< OUString > aNodes( ((SmMathConfig*) this)->GetNodeNames( A2OU( SYMBOL_LIST ) ) );
    Sequence< OUString > aNodes( ((SmMathConfig*) this)->GetNodeNames( SYMBOL_LIST ) );
    const OUString *pNode = aNodes.getConstArray();
    sal_Int32 nNodes = aNodes.getLength();

@@ -587,7 +587,7 @@ void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
    std::vector< SmSym >::iterator aEnd( rSymbols.end() );
    while (aIt != aEnd)
    {
        ReadSymbol( *aIt++, *pNode++, A2OU( SYMBOL_LIST ) );
        ReadSymbol( *aIt++, *pNode++, SYMBOL_LIST );
    }
}

@@ -610,7 +610,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
    while (aIt != aEnd)
    {
        const SmSym &rSymbol = *aIt++;
        OUString  aNodeNameDelim( A2OU( SYMBOL_LIST ) );
        OUString  aNodeNameDelim( SYMBOL_LIST );
        aNodeNameDelim += aDelim;
        aNodeNameDelim += rSymbol.GetExportName();
        aNodeNameDelim += aDelim;
@@ -645,7 +645,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
        pVal++;
    }
    OSL_ENSURE( pVal - pValues == sal::static_int_cast< ptrdiff_t >(nCount * nSymbolProps), "properties missing" );
    ReplaceSetProperties( A2OU( SYMBOL_LIST ) , aValues );
    ReplaceSetProperties( SYMBOL_LIST, aValues );

    StripFontFormatList( rNewSymbols );
    SaveFontFormatList();
@@ -669,14 +669,14 @@ void SmMathConfig::LoadFontFormatList()
    else
        pFontFormatList->Clear();

    Sequence< OUString > aNodes( GetNodeNames( A2OU( FONT_FORMAT_LIST ) ) );
    Sequence< OUString > aNodes( GetNodeNames( FONT_FORMAT_LIST ) );
    const OUString *pNode = aNodes.getConstArray();
    sal_Int32 nNodes = aNodes.getLength();

    for (sal_Int32 i = 0;  i < nNodes;  ++i)
    {
        SmFontFormat aFntFmt;
        ReadFontFormat( aFntFmt, pNode[i], A2OU( FONT_FORMAT_LIST ) );
        ReadFontFormat( aFntFmt, pNode[i], FONT_FORMAT_LIST );
        if (!pFontFormatList->GetFontFormat( pNode[i] ))
        {
            OSL_ENSURE( 0 == pFontFormatList->GetFontFormat( pNode[i] ),
@@ -776,7 +776,7 @@ void SmMathConfig::SaveFontFormatList()
        String aFntFmtId( rFntFmtList.GetFontFormatId( i ) );
        const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) );

        OUString  aNodeNameDelim( A2OU( FONT_FORMAT_LIST ) );
        OUString  aNodeNameDelim( FONT_FORMAT_LIST );
        aNodeNameDelim += aDelim;
        aNodeNameDelim += aFntFmtId;
        aNodeNameDelim += aDelim;
@@ -815,7 +815,7 @@ void SmMathConfig::SaveFontFormatList()
        pVal++;
    }
    OSL_ENSURE( sal::static_int_cast<size_t>(pVal - pValues) == nCount * nSymbolProps, "properties missing" );
    ReplaceSetProperties( A2OU( FONT_FORMAT_LIST ) , aValues );
    ReplaceSetProperties( FONT_FORMAT_LIST, aValues );

    rFntFmtList.SetModified( false );
}
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index ff86705..4895514 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -1870,7 +1870,7 @@ IMPL_LINK_NOARG(SmSymDefineDialog, CharHighlightHdl)

    // display Unicode position as symbol name while iterating over characters
    const String aHex(rtl::OUString::valueOf(static_cast<sal_Int64>(cChar), 16 ).toAsciiUpperCase());
    const String aPattern( A2OU( aHex.Len() > 4 ? "Ux000000" : "Ux0000" ) );
    const String aPattern( OUString::createFromAscii( aHex.Len() > 4 ? "Ux000000" : "Ux0000" ) );
    String aUnicodePos( aPattern.Copy( 0, aPattern.Len() - aHex.Len() ) );
    aUnicodePos += aHex;
    aSymbols.SetText( aUnicodePos );
diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx
index 2d7e8e2..9d168b8 100644
--- a/starmath/source/document.cxx
+++ b/starmath/source/document.cxx
@@ -840,7 +840,7 @@ sal_Bool SmDocShell::Load( SfxMedium& rMedium )
            SmXMLImportWrapper aEquation(xModel);
            sal_uLong nError = aEquation.Import(rMedium);
            bRet = 0 == nError;
            SetError( nError, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
            SetError( nError, OSL_LOG_PREFIX );
        }
    }

diff --git a/starmath/source/mathmlexport.cxx b/starmath/source/mathmlexport.cxx
index 951d075..34cbf54 100644
--- a/starmath/source/mathmlexport.cxx
+++ b/starmath/source/mathmlexport.cxx
@@ -92,7 +92,7 @@ using namespace ::xmloff::token;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;

#define EXPORT_SVC_NAME RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.XMLExportFilter")
#define EXPORT_SVC_NAME "com.sun.star.xml.XMLExportFilter"

#undef WANTEXCEPT

@@ -171,14 +171,14 @@ sal_Bool SmXMLExportWrapper::Export(SfxMedium &rMedium)
                            new comphelper::PropertySetInfo( aInfoMap ) ) );

    SvtSaveOptions aSaveOpt;
    OUString sUsePrettyPrinting(RTL_CONSTASCII_USTRINGPARAM("UsePrettyPrinting"));
    OUString sUsePrettyPrinting("UsePrettyPrinting");
    sal_Bool bUsePrettyPrinting( bFlat || aSaveOpt.IsPrettyPrinting() );
    Any aAny;
    aAny.setValue( &bUsePrettyPrinting, ::getBooleanCppuType() );
    xInfoSet->setPropertyValue( sUsePrettyPrinting, aAny );

    // Set base URI
    OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") );
    OUString sPropName( "BaseURI" );
    xInfoSet->setPropertyValue( sPropName, makeAny( rMedium.GetBaseURL( true ) ) );

    sal_Int32 nSteps=0;
@@ -203,7 +203,7 @@ sal_Bool SmXMLExportWrapper::Export(SfxMedium &rMedium)

            if ( !aName.isEmpty() )
            {
                sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath"));
                sPropName = "StreamRelPath";
                xInfoSet->setPropertyValue( sPropName, makeAny( aName ) );
            }
        }
@@ -275,8 +275,7 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(

    // get component
    Reference< io::XActiveDataSource > xSaxWriter(
        rFactory->createInstance(
            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Writer") )),
        rFactory->createInstance( "com.sun.star.xml.sax.Writer" ),
        UNO_QUERY );
    OSL_ENSURE( xSaxWriter.is(), "can't instantiate XML writer" );
    if (!xSaxWriter.is())
@@ -348,8 +347,8 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
        return sal_False;
    }

    String aPropName( String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("MediaType") ) );
    OUString aMime( RTL_CONSTASCII_USTRINGPARAM("text/xml") );
    OUString aPropName( "MediaType" );
    OUString aMime( "text/xml" );
    uno::Any aAny;
    aAny <<= aMime;

@@ -358,14 +357,14 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(

    if ( !bCompress )
    {
        aPropName = String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM("Compressed") );
        aPropName = "Compressed";
        sal_Bool bFalse = sal_False;
        aAny.setValue( &bFalse, ::getBooleanCppuType() );
        xSet->setPropertyValue( aPropName, aAny );
    }

    // even plain stream must be encrypted in encrypted document
    OUString aTmpPropName( RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption") );
    OUString aTmpPropName( "UseCommonStoragePasswordEncryption" );
    sal_Bool bTrue = sal_True;
    aAny.setValue( &bTrue, ::getBooleanCppuType() );
    xSet->setPropertyValue( aTmpPropName, aAny );
@@ -373,7 +372,7 @@ sal_Bool SmXMLExportWrapper::WriteThroughComponent(
    // set Base URL
    if ( rPropSet.is() )
    {
        OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("StreamName") );
        OUString sPropName( "StreamName" );
        rPropSet->setPropertyValue( sPropName, makeAny( sStreamName ) );
    }

@@ -420,7 +419,7 @@ const uno::Sequence< sal_Int8 > & SmXMLExport::getUnoTunnelId() throw()

OUString SAL_CALL SmXMLExport_getImplementationName() throw()
{
    return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLExporter" ) );
    return OUString( "com.sun.star.comp.Math.XMLExporter" );
}

uno::Sequence< OUString > SAL_CALL SmXMLExport_getSupportedServiceNames()
@@ -445,7 +444,7 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLExport_createInstance(

OUString SAL_CALL SmXMLExportMetaOOO_getImplementationName() throw()
{
    return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLMetaExporter" ) );
    return OUString( "com.sun.star.comp.Math.XMLMetaExporter" );
}

uno::Sequence< OUString > SAL_CALL SmXMLExportMetaOOO_getSupportedServiceNames()
@@ -467,7 +466,7 @@ throw( uno::Exception )

OUString SAL_CALL SmXMLExportMeta_getImplementationName() throw()
{
    return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisMetaExporter" ) );
    return OUString( "com.sun.star.comp.Math.XMLOasisMetaExporter" );
}

uno::Sequence< OUString > SAL_CALL SmXMLExportMeta_getSupportedServiceNames()
@@ -489,7 +488,7 @@ throw( uno::Exception )

OUString SAL_CALL SmXMLExportSettingsOOO_getImplementationName() throw()
{
    return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLSettingsExporter" ) );
    return OUString( "com.sun.star.comp.Math.XMLSettingsExporter" );
}

uno::Sequence< OUString > SAL_CALL SmXMLExportSettingsOOO_getSupportedServiceNames()
@@ -511,7 +510,7 @@ throw( uno::Exception )

OUString SAL_CALL SmXMLExportSettings_getImplementationName() throw()
{
    return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisSettingsExporter" ) );
    return OUString( "com.sun.star.comp.Math.XMLOasisSettingsExporter" );
}

uno::Sequence< OUString > SAL_CALL SmXMLExportSettings_getSupportedServiceNames()
@@ -533,7 +532,7 @@ throw( uno::Exception )

OUString SAL_CALL SmXMLExportContent_getImplementationName() throw()
{
    return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLContentExporter" ) );
    return OUString( "com.sun.star.comp.Math.XMLContentExporter" );
}

uno::Sequence< OUString > SAL_CALL SmXMLExportContent_getSupportedServiceNames()
@@ -661,7 +660,7 @@ void SmXMLExport::_ExportContent()
        }

        AddAttribute(XML_NAMESPACE_MATH, XML_ENCODING,
            OUString(RTL_CONSTASCII_USTRINGPARAM("StarMath 5.0")));
            OUString("StarMath 5.0"));
        SvXMLElementExport aAnnotation(*this, XML_NAMESPACE_MATH,
            XML_ANNOTATION, sal_True, sal_False);
        GetDocHandler()->characters(OUString( aText ));
@@ -694,16 +693,15 @@ void SmXMLExport::GetViewSettings( Sequence < PropertyValue >& aProps)

    Rectangle aRect( pDocShell->GetVisArea() );

    pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaTop") );
    pValue[nIndex].Name = "ViewAreaTop";
    pValue[nIndex++].Value <<= aRect.Top();

    pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaLeft") );
    pValue[nIndex].Name = "ViewAreaLeft";
    pValue[nIndex++].Value <<= aRect.Left();

    pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaWidth") );
    pValue[nIndex++].Value <<= aRect.GetWidth();

    pValue[nIndex].Name = OUString( RTL_CONSTASCII_USTRINGPARAM ( "ViewAreaHeight") );
    pValue[nIndex].Name = "ViewAreaHeight";
    pValue[nIndex++].Value <<= aRect.GetHeight();
}

@@ -726,10 +724,10 @@ void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps)
                    SmConfig *pConfig = SM_MOD()->GetConfig();
                    const bool bUsedSymbolsOnly = pConfig ? pConfig->IsSaveOnlyUsedSymbols() : false;

                    const OUString sFormula ( RTL_CONSTASCII_USTRINGPARAM ( "Formula" ) );
                    const OUString sBasicLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "BasicLibraries" ) );
                    const OUString sDialogLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "DialogLibraries" ) );
                    const OUString sRuntimeUID ( RTL_CONSTASCII_USTRINGPARAM ( "RuntimeUID" ) );
                    const OUString sFormula ( "Formula" );
                    const OUString sBasicLibraries ( "BasicLibraries" );
                    const OUString sDialogLibraries ( "DialogLibraries" );
                    const OUString sRuntimeUID ( "RuntimeUID" );
                    for (sal_Int32 i = 0; i < nCount; i++, pProps++)
                    {
                        const OUString &rPropName = aProps[i].Name;
@@ -743,8 +741,8 @@ void SmXMLExport::GetConfigurationSettings( Sequence < PropertyValue > & rProps)
                            rtl::OUString aActualName( rPropName );

                            // handle 'save used symbols only'
                            if (bUsedSymbolsOnly && rPropName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Symbols")))
                                aActualName = OUString( RTL_CONSTASCII_USTRINGPARAM ( "UserDefinedSymbolsInUse" ) );
                            if (bUsedSymbolsOnly && rPropName == "Symbols" )
                                aActualName = "UserDefinedSymbolsInUse";

                            pProps->Value = xProps->getPropertyValue( aActualName );
                        }
@@ -1323,7 +1321,7 @@ void SmXMLExport::ExportFont(const SmNode *pNode, int nLevel)
                {
                    OSL_FAIL( "unexpected case" );
                }
                AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, A2OU(pText));
                AddAttribute(XML_NAMESPACE_MATH, XML_MATHVARIANT, OUString::createFromAscii( pText ));
            }
            break;
        default:
diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx
index 6c94b65..5850867 100644
--- a/starmath/source/mathmlimport.cxx
+++ b/starmath/source/mathmlimport.cxx
@@ -88,7 +88,7 @@ using namespace ::xmloff::token;
using ::rtl::OUString;
using ::rtl::OUStringBuffer;

#define IMPORT_SVC_NAME RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.XMLImportFilter")
#define IMPORT_SVC_NAME "com.sun.star.xml.XMLImportFilter"

#undef WANTEXCEPT

@@ -170,7 +170,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
                            new comphelper::PropertySetInfo( aInfoMap ) ) );

    // Set base URI
    OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("BaseURI") );
    OUString sPropName( "BaseURI" );
    xInfoSet->setPropertyValue( sPropName, makeAny( rMedium.GetBaseURL() ) );

    sal_Int32 nSteps=3;
@@ -193,7 +193,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)
        // TODO/LATER: handle the case of embedded links gracefully
        if ( bEmbedded ) // && !rMedium.GetStorage()->IsRoot() )
        {
            OUString aName( RTL_CONSTASCII_USTRINGPARAM( "dummyObjName" ) );
            OUString aName( "dummyObjName" );
            if ( rMedium.GetItemSet() )
            {
                const SfxStringItem* pDocHierarchItem = static_cast<const SfxStringItem*>(
@@ -204,7 +204,7 @@ sal_uLong SmXMLImportWrapper::Import(SfxMedium &rMedium)

            if ( !aName.isEmpty() )
            {
                sPropName = OUString(RTL_CONSTASCII_USTRINGPARAM("StreamRelPath"));
                sPropName = "StreamRelPath";
                xInfoSet->setPropertyValue( sPropName, makeAny( aName ) );
            }
        }
@@ -285,7 +285,7 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent(
    // get parser
    Reference< xml::sax::XParser > xParser(
        rFactory->createInstance(
            OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser")) ),
            "com.sun.star.xml.sax.Parser"),
        UNO_QUERY );
    OSL_ENSURE( xParser.is(), "Can't create parser" );
    if ( !xParser.is() )
@@ -398,7 +398,7 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent(

        // determine if stream is encrypted or not
        uno::Reference < beans::XPropertySet > xProps( xEventsStream, uno::UNO_QUERY );
        Any aAny = xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Encrypted") ) );
        Any aAny = xProps->getPropertyValue( "Encrypted" );
        sal_Bool bEncrypted = sal_False;
        if ( aAny.getValueType() == ::getBooleanCppuType() )
            aAny >>= bEncrypted;
@@ -406,7 +406,7 @@ sal_uLong SmXMLImportWrapper::ReadThroughComponent(
        // set Base URL
        if ( rPropSet.is() )
        {
            OUString sPropName( RTL_CONSTASCII_USTRINGPARAM("StreamName") );
            OUString sPropName( "StreamName");
            rPropSet->setPropertyValue( sPropName, makeAny( sStreamName ) );
        }

@@ -460,7 +460,7 @@ const uno::Sequence< sal_Int8 > & SmXMLImport::getUnoTunnelId() throw()

OUString SAL_CALL SmXMLImport_getImplementationName() throw()
{
    return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLImporter" ) );
    return OUString( "com.sun.star.comp.Math.XMLImporter" );
}

uno::Sequence< OUString > SAL_CALL SmXMLImport_getSupportedServiceNames()
@@ -482,7 +482,7 @@ uno::Reference< uno::XInterface > SAL_CALL SmXMLImport_createInstance(

OUString SAL_CALL SmXMLImportMeta_getImplementationName() throw()
{
    return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisMetaImporter" ) );
    return OUString( "com.sun.star.comp.Math.XMLOasisMetaImporter" );
}

uno::Sequence< OUString > SAL_CALL SmXMLImportMeta_getSupportedServiceNames()
@@ -504,7 +504,7 @@ throw( uno::Exception )

OUString SAL_CALL SmXMLImportSettings_getImplementationName() throw()
{
    return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.XMLOasisSettingsImporter" ) );
    return OUString( "com.sun.star.comp.Math.XMLOasisSettingsImporter" );
}

uno::Sequence< OUString > SAL_CALL SmXMLImportSettings_getSupportedServiceNames()
@@ -797,11 +797,9 @@ void SmXMLContext_Helper::ApplyAttrs()
        {
            if (sFontFamily.equalsIgnoreAsciiCase(GetXMLToken(XML_FIXED)))
                aToken.eType = TFIXED;
            else if (sFontFamily.equalsIgnoreAsciiCase(OUString(
                RTL_CONSTASCII_USTRINGPARAM("sans"))))
            else if (sFontFamily.equalsIgnoreAsciiCase("sans"))
                aToken.eType = TSANS;
            else if (sFontFamily.equalsIgnoreAsciiCase(OUString(
                RTL_CONSTASCII_USTRINGPARAM("serif"))))
            else if (sFontFamily.equalsIgnoreAsciiCase("serif"))
                aToken.eType = TSERIF;
            else //Just give up, we need to extend our font mechanism to be
                //more general
@@ -1193,8 +1191,7 @@ void SmXMLAnnotationContext_Impl::StartElement(const uno::Reference<
        switch(rAttrTokenMap.Get(nPrefix,aLocalName))
        {
            case XML_TOK_ENCODING:
                bIsStarMath= sValue.equals(
                    OUString(RTL_CONSTASCII_USTRINGPARAM("StarMath 5.0")));
                bIsStarMath= sValue == "StarMath 5.0";
                break;
            default:
                break;
@@ -2676,8 +2673,7 @@ SvXMLImportContext *SmXMLImport::CreateContext(sal_uInt16 nPrefix,
        {
            uno::Reference<xml::sax::XDocumentHandler> xDocBuilder(
                mxServiceFactory->createInstance(
                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
                        "com.sun.star.xml.dom.SAXDocumentBuilder"))),
                    "com.sun.star.xml.dom.SAXDocumentBuilder"),
                    uno::UNO_QUERY_THROW);
            uno::Reference<document::XDocumentPropertiesSupplier> xDPS(
                GetModel(), uno::UNO_QUERY_THROW);
@@ -2948,24 +2944,24 @@ void SmXMLImport::SetViewSettings(const Sequence<PropertyValue>& aViewProps)

    for (sal_Int32 i = 0; i < nCount ; i++)
    {
        if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaTop" ) ) )
        if (pValue->Name == "ViewAreaTop" )
        {
            pValue->Value >>= nTmp;
            aRect.setY( nTmp );
        }
        else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaLeft" ) ) )
        else if (pValue->Name == "ViewAreaLeft" )
        {
            pValue->Value >>= nTmp;
            aRect.setX( nTmp );
        }
        else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaWidth" ) ) )
        else if (pValue->Name == "ViewAreaWidth" )
        {
            pValue->Value >>= nTmp;
            Size aSize( aRect.GetSize() );
            aSize.Width() = nTmp;
            aRect.SetSize( aSize );
        }
        else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "ViewAreaHeight" ) ) )
        else if (pValue->Name == "ViewAreaHeight" )
        {
            pValue->Value >>= nTmp;
            Size aSize( aRect.GetSize() );
@@ -2989,9 +2985,9 @@ void SmXMLImport::SetConfigurationSettings(const Sequence<PropertyValue>& aConfP
            sal_Int32 nCount = aConfProps.getLength();
            const PropertyValue* pValues = aConfProps.getConstArray();

            const OUString sFormula ( RTL_CONSTASCII_USTRINGPARAM ( "Formula" ) );
            const OUString sBasicLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "BasicLibraries" ) );
            const OUString sDialogLibraries ( RTL_CONSTASCII_USTRINGPARAM ( "DialogLibraries" ) );
            const OUString sFormula ( "Formula" );
            const OUString sBasicLibraries ( "BasicLibraries" );
            const OUString sDialogLibraries ( "DialogLibraries" );
            while ( nCount-- )
            {
                if (pValues->Name != sFormula &&
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index 904d44f..63b52fd 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -47,9 +47,6 @@ The primary internal data structure for the formula is the text representation
#define OPENING( token ) XML_STREAM_OPENING( token )
#define CLOSING( token ) XML_STREAM_CLOSING( token )

// *sigh*
#define STR( str ) OUString( RTL_CONSTASCII_USTRINGPARAM( str ))

// TODO create IS_OPENING(), IS_CLOSING() instead of doing 'next == OPENING( next )' ?

SmOoxmlImport::SmOoxmlImport( oox::formulaimport::XmlStream& s )
@@ -78,7 +75,7 @@ OUString SmOoxmlImport::handleStream()
        if( item.isEmpty())
            continue;
        if( !ret.isEmpty())
            ret += STR( " " );
            ret += " ";
        ret += item;
    }
    stream.ensureClosingTag( M_TOKEN( oMath ));
@@ -98,7 +95,7 @@ OUString SmOoxmlImport::readOMathArg()
    while( !stream.atEnd() && stream.currentToken() != CLOSING( stream.currentToken()))
    {
        if( !ret.isEmpty())
            ret += STR( " " );
            ret += " ";
        switch( stream.currentToken())
        {
            case OPENING( M_TOKEN( acc )):
@@ -192,52 +189,52 @@ OUString SmOoxmlImport::handleAcc()
    switch( accChr )
    {
        case MS_BAR:
            acc = STR( "bar" );
            acc = "bar";
            break;
        case MS_CHECK:
            acc = STR( "check" );
            acc = "check";
            break;
        case MS_ACUTE:
            acc = STR( "acute" );
            acc = "acute";
            break;
        case MS_GRAVE:
            acc = STR( "grave" );
            acc = "grave";
            break;
        case MS_BREVE:
            acc = STR( "breve" );
            acc = "breve";
            break;
        case MS_CIRCLE:
            acc = STR( "circle" );
            acc = "circle";
            break;
        case MS_VEC:
            // prefer wide variants for these 3, .docx can't seem to differentiate
            // between e.g. 'vec' and 'widevec', if whatever the accent is above is short, this
            // shouldn't matter, but short above a longer expression doesn't look right
            acc = STR( "widevec" );
            acc = "widevec";
            break;
        case MS_TILDE:
            acc = STR( "widetilde" );
            acc = "widetilde";
            break;
        case MS_HAT:
            acc = STR( "widehat" );
            acc = "widehat";
            break;
        case MS_DOT:
            acc = STR( "dot" );
            acc = "dot";
            break;
        case MS_DDOT:
            acc = STR( "ddot" );
            acc = "ddot";
            break;
        case MS_DDDOT:
            acc = STR( "dddot" );
            acc = "dddot";
            break;
        default:
            acc = STR( "acute" );
            acc = "acute";
            SAL_WARN( "starmath.ooxml", "Unknown m:chr in m:acc \'" << accChr << "\'" );
            break;
    }
    OUString e = readOMathArgInElement( M_TOKEN( e ));
    stream.ensureClosingTag( M_TOKEN( acc ));
    return acc + STR( " {" ) + e + STR( "}" );
    return acc + " {" + e + "}";
}

OUString SmOoxmlImport::handleBar()
@@ -248,9 +245,9 @@ OUString SmOoxmlImport::handleBar()
    {
        if( XmlStream::Tag pos = stream.checkOpeningTag( M_TOKEN( pos )))
        {
            if( pos.attribute( M_TOKEN( val )) == STR( "top" ))
            if( pos.attribute( M_TOKEN( val )) == "top" )
                topbot = top;
            else if( pos.attribute( M_TOKEN( val )) == STR( "bot" ))
            else if( pos.attribute( M_TOKEN( val )) == "bot" )
                topbot = bot;
            stream.ensureClosingTag( M_TOKEN( pos ));
        }
@@ -259,9 +256,9 @@ OUString SmOoxmlImport::handleBar()
    OUString e = readOMathArgInElement( M_TOKEN( e ));
    stream.ensureClosingTag( M_TOKEN( bar ));
    if( topbot == top )
        return STR( "overline {" ) + e + STR( "}" );
        return "overline {" + e + "}";
    else
        return STR( "underline {" ) + e + STR( "}" );
        return "underline {" + e + "}";
}

OUString SmOoxmlImport::handleBox()
@@ -292,7 +289,7 @@ OUString SmOoxmlImport::handleBorderBox()
    OUString e = readOMathArgInElement( M_TOKEN( e ));
    stream.ensureClosingTag( M_TOKEN( borderBox ));
    if( isStrikeH )
        return STR( "overstrike {" ) + e + STR( "}" );
        return "overstrike {" + e + "}";
    // LO does not seem to implement anything for handling the other cases
    return e;
}
@@ -300,9 +297,9 @@ OUString SmOoxmlImport::handleBorderBox()
OUString SmOoxmlImport::handleD()
{
    stream.ensureOpeningTag( M_TOKEN( d ));
    OUString opening = STR( "(" );
    OUString closing = STR( ")" );
    OUString separator = STR( "|" );
    OUString opening = "(";
    OUString closing = ")";
    OUString separator = "|";
    if( XmlStream::Tag dPr = stream.checkOpeningTag( M_TOKEN( dPr )))
    {
        if( XmlStream::Tag begChr = stream.checkOpeningTag( M_TOKEN( begChr )))
@@ -322,37 +319,37 @@ OUString SmOoxmlImport::handleD()
        }
        stream.ensureClosingTag( M_TOKEN( dPr ));
    }
    if( opening == STR( "{" ))
        opening = STR( "left lbrace " );
    if( closing == STR( "}" ))
        closing = STR( " right rbrace" );
    if( opening == "{" )
        opening = "left lbrace ";
    if( closing == "}" )
        closing = " right rbrace";
    if( opening == OUString( sal_Unicode( 0x27e6 )))
        opening = STR( "left ldbracket " );
        opening = "left ldbracket ";
    if( closing == OUString( sal_Unicode( 0x27e7 )))
        closing = STR( " right rdbracket" );
    if( opening == STR( "|" ))
        opening = STR( "left lline " );
    if( closing == STR( "|" ))
        closing = STR( " right rline" );
        closing = " right rdbracket";
    if( opening == "|" )
        opening = "left lline ";
    if( closing == "|" )
        closing = " right rline";
    if( opening == OUString( sal_Unicode( 0x2225 )))
        opening = STR( "left ldline " );
        opening = "left ldline ";
    if( closing == OUString( sal_Unicode( 0x2225 )))
        closing = STR( " right rdline" );
        closing = " right rdline";
    if( opening == OUString( sal_Unicode( 0x2329 )))
        opening = STR( "left langle " );
        opening = "left langle ";
    if( closing == OUString( sal_Unicode( 0x232a )))
        closing = STR( " right rangle" );
        closing = " right rangle";
    // use scalable brackets (the explicit "left" or "right")
    if( opening == STR( "(" ) || opening == STR( "[" ))
        opening = STR( "left " ) + opening;
    if( closing == STR( ")" ) || closing == STR( "]" ))
        closing = STR( " right " ) + closing;
    if( separator == STR( "|" )) // plain "|" would be actually "V" (logical or)
        separator = STR( " mline " );
    if( opening == "(" || opening == "[" )
        opening = "left " + opening;
    if( closing == ")" || closing == "]" )
        closing = " right " + closing;
    if( separator == "|" ) // plain "|" would be actually "V" (logical or)
        separator = " mline ";
    if( opening.isEmpty())
        opening = STR( "left none " );
        opening = "left none ";
    if( closing.isEmpty())
        closing = STR( " right none" );
        closing = " right none";
    OUStringBuffer ret;
    ret.append( opening );
    bool first = true;
@@ -375,29 +372,29 @@ OUString SmOoxmlImport::handleEqArr()
    do
    { // there must be at least one m:e
        if( !ret.isEmpty())
            ret += STR( "#" );
        ret += STR( " " );
            ret += "#";
        ret += " ";
        ret += readOMathArgInElement( M_TOKEN( e ));
        ret += STR( " " );
        ret += " ";
    } while( !stream.atEnd() && stream.findTag( OPENING( M_TOKEN( e ))));
    stream.ensureClosingTag( M_TOKEN( eqArr ));
    return STR( "stack {" ) + ret + STR( "}" );
    return "stack {" + ret + "}";
}

OUString SmOoxmlImport::handleF()
{
    stream.ensureOpeningTag( M_TOKEN( f ));
    enum operation_t { bar, lin, noBar } operation = bar;
    OUString oper = STR( "over" );
    OUString oper = "over";
    if( stream.checkOpeningTag( M_TOKEN( fPr )))
    {
        if( XmlStream::Tag type = stream.checkOpeningTag( M_TOKEN( type )))
        {
            if( type.attribute( M_TOKEN( val )) == STR( "bar" ))
            if( type.attribute( M_TOKEN( val )) == "bar" )
                operation = bar;
            else if( type.attribute( M_TOKEN( val )) == STR( "lin" ))
            else if( type.attribute( M_TOKEN( val )) == "lin" )
                operation = lin;
            else if( type.attribute( M_TOKEN( val )) == STR( "noBar" ))
            else if( type.attribute( M_TOKEN( val )) == "noBar" )
                operation = noBar;
            stream.ensureClosingTag( M_TOKEN( type ));
        }
@@ -407,12 +404,12 @@ OUString SmOoxmlImport::handleF()
    OUString den = readOMathArgInElement( M_TOKEN( den ));
    stream.ensureClosingTag( M_TOKEN( f ));
    if( operation == bar )
        return STR( "{" ) + num + STR( "} over {" ) + den + STR( "}" );
        return "{" + num + "} over {" + den + "}";
    else if( operation == lin )
        return STR( "{" ) + num + STR( "} / {" ) + den + STR( "}" );
        return "{" + num + "} / {" + den + "}";
    else // noBar
    {
        return STR( "binom {" ) + num + STR( "} {" ) + den + STR( "}" );
        return "binom {" + num + "} {" + den + "}";
    }
}

@@ -422,9 +419,9 @@ OUString SmOoxmlImport::handleFunc()
    stream.ensureOpeningTag( M_TOKEN( func ));
    OUString fname = readOMathArgInElement( M_TOKEN( fName ));
    // fix the various functions
    if( fname.match( STR( "lim csub {" ), 0 )) // startsWith()
        fname = STR( "lim from {" ) + fname.copy( 10 );
    OUString ret = fname + STR( " {" ) + readOMathArgInElement( M_TOKEN( e )) + STR( "}" );
    if( fname.match( "lim csub {", 0 )) // startsWith()
        fname = "lim from {" + fname.copy( 10 );
    OUString ret = fname + " {" + readOMathArgInElement( M_TOKEN( e )) + "}";
    stream.ensureClosingTag( M_TOKEN( func ));
    return ret;
}
@@ -437,11 +434,11 @@ OUString SmOoxmlImport::handleLimLowUpp( LimLowUpp_t limlowupp )
    OUString lim = readOMathArgInElement( M_TOKEN( lim ));
    stream.ensureClosingTag( token );
    // fix up overbrace/underbrace  (use { }, as {} will be converted to a placeholder)
    if( limlowupp == LimUpp && e.endsWithAsciiL( RTL_CONSTASCII_STRINGPARAM( " overbrace { }" )))
        return e.copy( 0, e.getLength() - 2 ) + lim + STR( "}" );
    if( limlowupp == LimLow && e.endsWithAsciiL( RTL_CONSTASCII_STRINGPARAM( " underbrace { }" )))
        return e.copy( 0, e.getLength() - 2 ) + lim + STR( "}" );
    return e + ( limlowupp == LimLow ? STR( " csub {" ) : STR( " csup {" )) + lim + STR( "}" );
    if( limlowupp == LimUpp && e.endsWith( " overbrace { }" ))
        return e.copy( 0, e.getLength() - 2 ) + lim + "}";
    if( limlowupp == LimLow && e.endsWith( " underbrace { }" ))
        return e.copy( 0, e.getLength() - 2 ) + lim + "}";
    return e + ( limlowupp == LimLow ? " csub {" : " csup {" ) + lim + "}";
}

OUString SmOoxmlImport::handleGroupChr()
@@ -458,7 +455,7 @@ OUString SmOoxmlImport::handleGroupChr()
        }
        if( XmlStream::Tag posTag = stream.checkOpeningTag( M_TOKEN( pos )))
        {
            if( posTag.attribute( M_TOKEN( val ), STR( "bot" )) == STR( "top" ))
            if( posTag.attribute( M_TOKEN( val ), OUString( "bot" )) == "top" )
                pos = top;
            stream.ensureClosingTag( M_TOKEN( pos ));
        }
@@ -467,13 +464,13 @@ OUString SmOoxmlImport::handleGroupChr()
    OUString e = readOMathArgInElement( M_TOKEN( e ));
    stream.ensureClosingTag( M_TOKEN( groupChr ));
    if( pos == top && chr == sal_Unicode( 0x23de ))
        return STR( "{" ) + e + STR( "} overbrace { }" );
        return "{" + e + "} overbrace { }";
    if( pos == bot && chr == sal_Unicode( 0x23df ))
        return STR( "{" ) + e + STR( "} underbrace { }" );
        return "{" + e + "} underbrace { }";
    if( pos == top )
        return STR( "{" ) + e + STR( "} csup {" ) + OUString( chr ) + STR( "}" );
        return "{" + e + "} csup {" + OUString( chr ) + "}";
    else
        return STR( "{" ) + e + STR( "} csub {" ) + OUString( chr ) + STR( "}" );
        return "{" + e + "} csub {" + OUString( chr ) + "}";
}

OUString SmOoxmlImport::handleM()
@@ -487,16 +484,16 @@ OUString SmOoxmlImport::handleM()
        do // there must be at least one m:e
        {
            if( !row.isEmpty())
                row += STR( " # " );
                row += " # ";
            row += readOMathArgInElement( M_TOKEN( e ));
        } while( !stream.atEnd() && stream.findTag( OPENING( M_TOKEN( e ))));
        if( !allrows.isEmpty())
            allrows += STR( " ## " );
            allrows += " ## ";
        allrows += row;
        stream.ensureClosingTag( M_TOKEN( mr ));
    } while( !stream.atEnd() && stream.findTag( OPENING( M_TOKEN( mr ))));
    stream.ensureClosingTag( M_TOKEN( m ));
    return STR( "matrix {" ) + allrows + STR( "}" );
    return "matrix {" + allrows + "}";
}

OUString SmOoxmlImport::handleNary()
@@ -531,41 +528,41 @@ OUString SmOoxmlImport::handleNary()
    switch( chr )
    {
        case MS_INT:
            ret = STR( "int" );
            ret = "int";
            break;
        case MS_IINT:
            ret = STR( "liint" );
            ret = "liint";
            break;
        case MS_IIINT:
            ret = STR( "liiint" );
            ret = "liiint";
            break;
        case MS_LINT:
            ret = STR( "lint" );
            ret = "lint";
            break;
        case MS_LLINT:
            ret = STR( "llint" );
            ret = "llint";
            break;
        case MS_LLLINT:
            ret = STR( "lllint" );
            ret = "lllint";
            break;
        case MS_PROD:
            ret = STR( "prod" );
            ret = "prod";
            break;
        case MS_COPROD:
            ret = STR( "coprod" );
            ret = "coprod";
            break;
        case MS_SUM:
            ret = STR( "sum" );
            ret = "sum";
            break;
        default:
            SAL_WARN( "starmath.ooxml", "Unknown m:nary chr \'" << chr << "\'" );
            break;
    }
    if( !subHide )
        ret += STR( " from {" ) + sub + STR( "}" );
        ret += " from {" + sub + "}";
    if( !supHide )
        ret += STR( " to {" ) + sup + STR( "}" );
    ret += STR( " {" ) + e + STR( "}" );
        ret += " to {" + sup + "}";
    ret += " {" + e + "}";
    stream.ensureClosingTag( M_TOKEN( nary ));
    return ret;
}
@@ -588,7 +585,7 @@ OUString SmOoxmlImport::handleR()
            case OPENING( M_TOKEN( t )):
            {
                XmlStream::Tag rtag = stream.ensureOpeningTag( M_TOKEN( t ));
                if( rtag.attribute( OOX_TOKEN( xml, space )) != STR( "preserve" ))
                if( rtag.attribute( OOX_TOKEN( xml, space )) != "preserve" )
                    text += rtag.text.trim();
                else
                    text += rtag.text;
@@ -621,9 +618,9 @@ OUString SmOoxmlImport::handleRad()
    OUString e = readOMathArgInElement( M_TOKEN( e ));
    stream.ensureClosingTag( M_TOKEN( rad ));
    if( degHide )
        return STR( "sqrt {" ) + e + STR( "}" );
        return "sqrt {" + e + "}";
    else
        return STR( "nroot {" ) + deg + STR( "} {" ) + e + STR( "}" );
        return "nroot {" + deg + "} {" + e + "}";
}

OUString SmOoxmlImport::handleSpre()
@@ -633,7 +630,7 @@ OUString SmOoxmlImport::handleSpre()
    OUString sup = readOMathArgInElement( M_TOKEN( sup ));
    OUString e = readOMathArgInElement( M_TOKEN( e ));
    stream.ensureClosingTag( M_TOKEN( sPre ));
    return STR( "{" ) + e + STR( "} lsub {" ) + sub + STR( "} lsup {" ) + sup + STR( "}" );
    return "{" + e + "} lsub {" + sub + "} lsup {" + sup + "}";
}

OUString SmOoxmlImport::handleSsub()
@@ -642,7 +639,7 @@ OUString SmOoxmlImport::handleSsub()
    OUString e = readOMathArgInElement( M_TOKEN( e ));
    OUString sub = readOMathArgInElement( M_TOKEN( sub ));
    stream.ensureClosingTag( M_TOKEN( sSub ));
    return STR( "{" ) + e + STR( "} rsub {" ) + sub + STR( "}" );
    return "{" + e + "} rsub {" + sub + "}";
}

OUString SmOoxmlImport::handleSsubsup()
@@ -652,7 +649,7 @@ OUString SmOoxmlImport::handleSsubsup()
    OUString sub = readOMathArgInElement( M_TOKEN( sub ));
    OUString sup = readOMathArgInElement( M_TOKEN( sup ));
    stream.ensureClosingTag( M_TOKEN( sSubSup ));
    return STR( "{" ) + e + STR( "} rsub {" ) + sub + STR( "} rsup {" ) + sup + STR( "}" );
    return "{" + e + "} rsub {" + sub + "} rsup {" + sup + "}";
}

OUString SmOoxmlImport::handleSsup()
@@ -661,7 +658,7 @@ OUString SmOoxmlImport::handleSsup()
    OUString e = readOMathArgInElement( M_TOKEN( e ));
    OUString sup = readOMathArgInElement( M_TOKEN( sup ));
    stream.ensureClosingTag( M_TOKEN( sSup ));
    return STR( "{" ) + e + STR( "} ^ {" ) + sup + STR( "}" );
    return "{" + e + "} ^ {" + sup + "}";
}

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/starmath/source/register.cxx b/starmath/source/register.cxx
index 4b67c7c..9926246 100644
--- a/starmath/source/register.cxx
+++ b/starmath/source/register.cxx
@@ -126,80 +126,70 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sm_component_getFactory( const sal_Char* pIm
        Reference< XSingleServiceFactory >   xFactory                                                                                                ;
        Reference< XMultiServiceFactory >    xServiceManager( reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;

        if( SmXMLImport_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        if( SmXMLImport_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::cppu::createSingleFactory( xServiceManager,
            SmXMLImport_getImplementationName(),
            SmXMLImport_createInstance,
            SmXMLImport_getSupportedServiceNames() );
        }
        else if( SmXMLExport_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        else if( SmXMLExport_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::cppu::createSingleFactory( xServiceManager,
            SmXMLExport_getImplementationName(),
            SmXMLExport_createInstance,
            SmXMLExport_getSupportedServiceNames() );
        }
        else if( SmXMLImportMeta_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        else if( SmXMLImportMeta_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::cppu::createSingleFactory( xServiceManager,
            SmXMLImportMeta_getImplementationName(),
            SmXMLImportMeta_createInstance,
            SmXMLImportMeta_getSupportedServiceNames() );
        }
        else if( SmXMLExportMetaOOO_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        else if( SmXMLExportMetaOOO_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::cppu::createSingleFactory( xServiceManager,
            SmXMLExportMetaOOO_getImplementationName(),
            SmXMLExportMetaOOO_createInstance,
            SmXMLExportMetaOOO_getSupportedServiceNames() );
        }
        else if( SmXMLExportMeta_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        else if( SmXMLExportMeta_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::cppu::createSingleFactory( xServiceManager,
            SmXMLExportMeta_getImplementationName(),
            SmXMLExportMeta_createInstance,
            SmXMLExportMeta_getSupportedServiceNames() );
        }
        else if( SmXMLImportSettings_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        else if( SmXMLImportSettings_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::cppu::createSingleFactory( xServiceManager,
            SmXMLImportSettings_getImplementationName(),
            SmXMLImportSettings_createInstance,
            SmXMLImportSettings_getSupportedServiceNames() );
        }
        else if( SmXMLExportSettingsOOO_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        else if( SmXMLExportSettingsOOO_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::cppu::createSingleFactory( xServiceManager,
            SmXMLExportSettingsOOO_getImplementationName(),
            SmXMLExportSettingsOOO_createInstance,
            SmXMLExportSettingsOOO_getSupportedServiceNames() );
        }
        else if( SmXMLExportSettings_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        else if( SmXMLExportSettings_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::cppu::createSingleFactory( xServiceManager,
            SmXMLExportSettings_getImplementationName(),
            SmXMLExportSettings_createInstance,
            SmXMLExportSettings_getSupportedServiceNames() );
        }
        else if( SmXMLExportContent_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        else if( SmXMLExportContent_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::cppu::createSingleFactory( xServiceManager,
            SmXMLExportContent_getImplementationName(),
            SmXMLExportContent_createInstance,
            SmXMLExportContent_getSupportedServiceNames() );
        }
        else if( SmDocument_getImplementationName().equalsAsciiL(
            pImplementationName, strlen(pImplementationName)) )
        else if( SmDocument_getImplementationName().equalsAscii( pImplementationName ))
        {
            xFactory = ::sfx2::createSfxModelFactory( xServiceManager,
            SmDocument_getImplementationName(),
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index 617d8a0..dfe37e9 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -119,42 +119,42 @@ SmFilterDetect::~SmFilterDetect()
    for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
    {
        // extract properties
        if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("URL")) )
        if( lDescriptor[nProperty].Name == "URL" )
        {
            lDescriptor[nProperty].Value >>= sTemp;
            aURL = sTemp;
        }
        else if( !aURL.Len() && lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FileName")) )
        else if( !aURL.Len() && lDescriptor[nProperty].Name == "FileName" )
        {
            lDescriptor[nProperty].Value >>= sTemp;
            aURL = sTemp;
        }
        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("TypeName")) )
        else if( lDescriptor[nProperty].Name == "TypeName" )
        {
            lDescriptor[nProperty].Value >>= sTemp;
            aTypeName = sTemp;
        }
        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FilterName")) )
        else if( lDescriptor[nProperty].Name == "FilterName" )
        {
            lDescriptor[nProperty].Value >>= sTemp;
            aPreselectedFilterName = sTemp;
        }
        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InputStream")) )
        else if( lDescriptor[nProperty].Name == "InputStream" )
            nIndexOfInputStream = nProperty;
        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ReadOnly")) )
        else if( lDescriptor[nProperty].Name == "ReadOnly" )
            nIndexOfReadOnlyFlag = nProperty;
        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("UCBContent")) )
        else if( lDescriptor[nProperty].Name == "UCBContent" )
            nIndexOfContent = nProperty;
        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("AsTemplate")) )
        else if( lDescriptor[nProperty].Name == "AsTemplate" )
        {
            lDescriptor[nProperty].Value >>= bOpenAsTemplate;
            nIndexOfTemplateFlag = nProperty;
        }
        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("InteractionHandler")) )
        else if( lDescriptor[nProperty].Name == "InteractionHandler" )
            lDescriptor[nProperty].Value >>= xInteraction;
        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("RepairPackage")) )
        else if( lDescriptor[nProperty].Name == "RepairPackage" )
            lDescriptor[nProperty].Value >>= bRepairPackage;
        else if( lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("DocumentTitle")) )
        else if( lDescriptor[nProperty].Name == "DocumentTitle" )
            nIndexOfDocumentTitle = nProperty;
    }

@@ -206,7 +206,7 @@ SmFilterDetect::~SmFilterDetect()
                    // error during storage creation means _here_ that the medium
                    // is broken, but we can not handle it in medium since unpossibility
                    // to create a storage does not _always_ means that the medium is broken
                    aMedium.SetError( aMedium.GetLastStorageCreationState(), ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) );
                    aMedium.SetError( aMedium.GetLastStorageCreationState(), OSL_LOG_PREFIX );
                    if ( xInteraction.is() )
                    {
                        OUString empty;
@@ -345,7 +345,7 @@ SmFilterDetect::~SmFilterDetect()
    {
        // if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
        lDescriptor.realloc( nPropertyCount + 1 );
        lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InputStream"));
        lDescriptor[nPropertyCount].Name = "InputStream";
        lDescriptor[nPropertyCount].Value <<= xStream;
        nPropertyCount++;
    }
@@ -354,7 +354,7 @@ SmFilterDetect::~SmFilterDetect()
    {
        // if input stream wasn't part of the descriptor, now it should be, otherwise the content would be opend twice
        lDescriptor.realloc( nPropertyCount + 1 );
        lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UCBContent"));
        lDescriptor[nPropertyCount].Name = "UCBContent";
        lDescriptor[nPropertyCount].Value <<= xContent;
        nPropertyCount++;
    }
@@ -364,7 +364,7 @@ SmFilterDetect::~SmFilterDetect()
        if ( nIndexOfReadOnlyFlag == -1 )
        {
            lDescriptor.realloc( nPropertyCount + 1 );
            lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
            lDescriptor[nPropertyCount].Name = "ReadOnly";
            lDescriptor[nPropertyCount].Value <<= bReadOnly;
            nPropertyCount++;
        }
@@ -375,7 +375,7 @@ SmFilterDetect::~SmFilterDetect()
    if ( !bRepairPackage && bRepairAllowed )
    {
        lDescriptor.realloc( nPropertyCount + 1 );
        lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage"));
        lDescriptor[nPropertyCount].Name = "RepairPackage";
        lDescriptor[nPropertyCount].Value <<= bRepairAllowed;
        nPropertyCount++;

@@ -389,7 +389,7 @@ SmFilterDetect::~SmFilterDetect()
        if ( nIndexOfTemplateFlag == -1 )
        {
            lDescriptor.realloc( nPropertyCount + 1 );
            lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("AsTemplate"));
            lDescriptor[nPropertyCount].Name = "AsTemplate";
            lDescriptor[nPropertyCount].Value <<= bOpenAsTemplate;
            nPropertyCount++;
        }
@@ -403,7 +403,7 @@ SmFilterDetect::~SmFilterDetect()
        if ( nIndexOfDocumentTitle == -1 )
        {
            lDescriptor.realloc( nPropertyCount + 1 );
            lDescriptor[nPropertyCount].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentTitle"));
            lDescriptor[nPropertyCount].Name = "DocumentTitle";
            lDescriptor[nPropertyCount].Value <<= aDocumentTitle;
            nPropertyCount++;
        }
@@ -450,14 +450,14 @@ UNOSEQUENCE< rtl::OUString > SAL_CALL SmFilterDetect::getSupportedServiceNames()
UNOSEQUENCE< rtl::OUString > SmFilterDetect::impl_getStaticSupportedServiceNames()
{
    UNOSEQUENCE< rtl::OUString > seqServiceNames( 1 );
    seqServiceNames.getArray() [0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.ExtendedTypeDetection"  ));
    seqServiceNames.getArray() [0] = "com.sun.star.frame.ExtendedTypeDetection";
    return seqServiceNames ;
}

/* Helper for XServiceInfo */
rtl::OUString SmFilterDetect::impl_getStaticImplementationName()
{
    return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.math.FormatDetector" ));
    return rtl::OUString("com.sun.star.comp.math.FormatDetector");
}

/* Helper for registry */
diff --git a/starmath/source/symbol.cxx b/starmath/source/symbol.cxx
index 75d1063..6cb03c0 100644
--- a/starmath/source/symbol.cxx
+++ b/starmath/source/symbol.cxx
@@ -271,7 +271,7 @@ void SmSymbolManager::Load()

    // now add a %i... symbol to the 'iGreek' set for every symbol found in the 'Greek' set.
    SmLocalizedSymbolData   aLocalizedData;
    const String aGreekSymbolSetName( aLocalizedData.GetUiSymbolSetName( A2OU("Greek") ) );
    const String aGreekSymbolSetName( aLocalizedData.GetUiSymbolSetName( OUString::createFromAscii( "Greek" ) ));
    const SymbolPtrVec_t    aGreekSymbols( GetSymbolSet( aGreekSymbolSetName ) );
    String aSymbolSetName( (sal_Unicode) 'i' );
    aSymbolSetName += aGreekSymbolSetName;
@@ -301,7 +301,7 @@ void SmSymbolManager::Save()
        // prepare to skip symbols from iGreek on saving
        SmLocalizedSymbolData   aLocalizedData;
        String aSymbolSetName( (sal_Unicode) 'i' );
        aSymbolSetName += aLocalizedData.GetUiSymbolSetName( A2OU("Greek") );
        aSymbolSetName += aLocalizedData.GetUiSymbolSetName( OUString::createFromAscii( "Greek" ));

        SymbolPtrVec_t aTmp( GetSymbols() );
        std::vector< SmSym > aSymbols;
diff --git a/starmath/source/unodoc.cxx b/starmath/source/unodoc.cxx
index 81d736f..cb7cbd1 100644
--- a/starmath/source/unodoc.cxx
+++ b/starmath/source/unodoc.cxx
@@ -42,13 +42,13 @@ using namespace ::com::sun::star;

::rtl::OUString SAL_CALL SmDocument_getImplementationName() throw()
{
    return rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.Math.FormulaDocument" ) );
    return rtl::OUString( "com.sun.star.comp.Math.FormulaDocument" );
}

uno::Sequence< rtl::OUString > SAL_CALL SmDocument_getSupportedServiceNames() throw()
{
    uno::Sequence< rtl::OUString > aSeq( 1 );
    aSeq[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.formula.FormulaProperties" ));
    aSeq[0] = "com.sun.star.formula.FormulaProperties";
    return aSeq;
}

diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx
index c6759b9..67c7cc6 100644
--- a/starmath/source/unomodel.cxx
+++ b/starmath/source/unomodel.cxx
@@ -99,25 +99,25 @@ SmPrintUIOptions::SmPrintUIOptions()
    String aAppGroupname( aLocalizedStrings.GetString( 0 ) );
    aAppGroupname.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "%s" ) ),
                                    aOpt.GetModuleName( SvtModuleOptions::E_SMATH ) );
    m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TabPage:AppPage" ) ) );
    m_aUIProperties[0].Value = getGroupControlOpt( aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage" );

    // create subgroup for print options
    m_aUIProperties[1].Value = getSubgroupControlOpt( aLocalizedStrings.GetString( 1 ), rtl::OUString() );

    // create a bool option for title row (matches to SID_PRINTTITLE)
    m_aUIProperties[2].Value = getBoolControlOpt( aLocalizedStrings.GetString( 2 ),
                                                  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:TitleRow:CheckBox" ) ),
                                                  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_TITLE_ROW ) ),
                                                  ".HelpID:vcl:PrintDialog:TitleRow:CheckBox",
                                                  PRTUIOPT_TITLE_ROW,
                                                  pConfig->IsPrintTitle() );
    // create a bool option for formula text (matches to SID_PRINTTEXT)
    m_aUIProperties[3].Value = getBoolControlOpt( aLocalizedStrings.GetString( 3 ),
                                                  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:FormulaText:CheckBox" ) ),
                                                  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_FORMULA_TEXT ) ),
                                                  ".HelpID:vcl:PrintDialog:FormulaText:CheckBox",
                                                  PRTUIOPT_FORMULA_TEXT,
                                                  pConfig->IsPrintFormulaText() );
    // create a bool option for border (matches to SID_PRINTFRAME)
    m_aUIProperties[4].Value = getBoolControlOpt( aLocalizedStrings.GetString( 4 ),
                                                  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:Border:CheckBox" ) ),
                                                  rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_BORDER ) ),
                                                  ".HelpID:vcl:PrintDialog:Border:CheckBox",
                                                  PRTUIOPT_BORDER,
                                                  pConfig->IsPrintFrame() );

    // create subgroup for print format
@@ -129,10 +129,10 @@ SmPrintUIOptions::SmPrintUIOptions()
    aChoices[1] = aLocalizedStrings.GetString( 7 );
    aChoices[2] = aLocalizedStrings.GetString( 8 );
    Sequence< rtl::OUString > aHelpIds( 3 );
    aHelpIds[0] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0" ) );
    aHelpIds[1] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1" ) );
    aHelpIds[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2" ) );
    OUString aPrintFormatProp( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_FORMAT ) );
    aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0";
    aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1";
    aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2";
    OUString aPrintFormatProp( PRTUIOPT_PRINT_FORMAT );
    m_aUIProperties[6].Value = getChoiceControlOpt( rtl::OUString(),
                                                    aHelpIds,
                                                    aPrintFormatProp,
@@ -142,15 +142,15 @@ SmPrintUIOptions::SmPrintUIOptions()
    // create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM)
    vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, sal_True );
    m_aUIProperties[ 7 ].Value = getRangeControlOpt( rtl::OUString(),
                                                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".HelpID:vcl:PrintDialog:PrintScale:NumericField" ) ),
                                                     rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( PRTUIOPT_PRINT_SCALE ) ),
                                                     ".HelpID:vcl:PrintDialog:PrintScale:NumericField",
                                                     PRTUIOPT_PRINT_SCALE,
                                                     pConfig->GetPrintZoomFactor(),    // initial value
                                                     10,     // min value
                                                     1000,   // max value
                                                     aRangeOpt );

    Sequence< PropertyValue > aHintNoLayoutPage( 1 );
    aHintNoLayoutPage[0].Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HintNoLayoutPage" ) );
    aHintNoLayoutPage[0].Name = "HintNoLayoutPage";
    aHintNoLayoutPage[0].Value = makeAny( sal_True );
    m_aUIProperties[8].Value <<= aHintNoLayoutPage;

@@ -413,14 +413,14 @@ OUString SmModel::getImplementationName(void) throw( uno::RuntimeException )

::rtl::OUString SmModel::getImplementationName_Static()
{
    return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.math.FormulaDocument"));
    return rtl::OUString("com.sun.star.comp.math.FormulaDocument");
}

sal_Bool SmModel::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
    return (
            rServiceName == A2OU("com.sun.star.document.OfficeDocument"  ) ||
            rServiceName == A2OU("com.sun.star.formula.FormulaProperties")
            rServiceName == "com.sun.star.document.OfficeDocument" ||
            rServiceName == "com.sun.star.formula.FormulaProperties"
           );
}

@@ -435,8 +435,8 @@ uno::Sequence< OUString > SmModel::getSupportedServiceNames_Static(void)

    uno::Sequence< OUString > aRet(2);
    OUString* pArray = aRet.getArray();
    pArray[0] = A2OU("com.sun.star.document.OfficeDocument");
    pArray[1] = A2OU("com.sun.star.formula.FormulaProperties");
    pArray[0] = "com.sun.star.document.OfficeDocument";
    pArray[1] = "com.sun.star.formula.FormulaProperties";
    return aRet;
}

@@ -1004,7 +1004,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SmModel::getRenderer(

    uno::Sequence< beans::PropertyValue > aRenderer(1);
    PropertyValue  &rValue = aRenderer.getArray()[0];
    rValue.Name  = OUString( RTL_CONSTASCII_USTRINGPARAM( "PageSize" ) );
    rValue.Name  = "PageSize";
    rValue.Value <<= aPageSize;

    if (!m_pPrintUIOptions)
@@ -1033,7 +1033,7 @@ void SAL_CALL SmModel::render(
    uno::Reference< awt::XDevice >  xRenderDevice;
    for (sal_Int32 i = 0, nCount = rxOptions.getLength();  i < nCount;  ++i)
    {
        if( rxOptions[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("RenderDevice")) )
        if( rxOptions[i].Name == "RenderDevice" )
            rxOptions[i].Value >>= xRenderDevice;
    }

diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 21cc409..50e948c 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -871,7 +871,7 @@ IMPL_LINK( SmCmdBoxWindow, InitialFocusTimerHdl, Timer *, EMPTYARG /*pTimer*/ )
        if (xSMGR.is())
        {
            xDesktop = uno::Reference< frame::XDesktop >(
                xSMGR->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))), uno::UNO_QUERY_THROW );
                xSMGR->createInstance( "com.sun.star.frame.Desktop"), uno::UNO_QUERY_THROW );
        }

        aEdit.GrabFocus();
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index b4c6573..026fc4a 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -1284,12 +1284,12 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
            PictPropertyNameValuePairs::const_iterator aEnd = pPicType->aPropertyPairs.end();
            while( aIt != aEnd)
            {
                if( aIt->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "wzDescription") ))
                if( aIt->first == "wzDescription" )
                {
                    SwXFrame::GetOrCreateSdrObject( pFlyFmt );
                    pDoc->SetFlyFrmDescription( *(pFlyFmt), aIt->second );
                }
                else if( aIt->first.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "wzName") ))
                else if( aIt->first == "wzName" )
                {
                    SwXFrame::GetOrCreateSdrObject( pFlyFmt );
                    pDoc->SetFlyFrmTitle( *(pFlyFmt), aIt->second );
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 99db4da..254b4c9 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4323,7 +4323,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF
                aURL = sGlobalTemplates[ i ];
        else
                osl::FileBase::getFileURLFromSystemPath( sGlobalTemplates[ i ], aURL );
        if ( !aURL.endsWithIgnoreAsciiCaseAsciiL( ".dot", 4 ) || ( !sCreatedFrom.isEmpty() && sCreatedFrom.equals( aURL ) ) )
        if ( !aURL.endsWithIgnoreAsciiCase( ".dot" ) || ( !sCreatedFrom.isEmpty() && sCreatedFrom.equals( aURL ) ) )
            continue; // don't try and read the same document as ourselves

        SotStorageRef rRoot = new SotStorage( aURL, STREAM_STD_READWRITE, STORAGE_TRANSACTED );