[Libreoffice-commits] .: 6 commits - basic/source desktop/source editeng/source framework/source sfx2/source svx/source

Caolán McNamara caolan at kemper.freedesktop.org
Mon Oct 25 13:27:49 PDT 2010


 basic/source/uno/dlgcont.cxx               |   18 ++---
 desktop/source/app/langselect.cxx          |   28 +++----
 editeng/source/items/paraitem.cxx          |    7 +
 framework/source/services/pathsettings.cxx |   19 ++---
 sfx2/source/doc/guisaveas.cxx              |  104 ++++++++++++++---------------
 svx/source/svdraw/svdoedge.cxx             |    2 
 6 files changed, 91 insertions(+), 87 deletions(-)

New commits:
commit 02894bb957755caf63b3b5c62173397f718b2cce
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 25 20:51:18 2010 +0100

    micro optimization

diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index 46f7d16..6f52899 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -63,10 +63,8 @@
 
 #define CFG_READONLY_DEFAULT    sal_False
 
-const ::rtl::OUString CFGPROP_INTERNALPATHES = ::rtl::OUString::createFromAscii("InternalPaths");
-const ::rtl::OUString CFGPROP_USERPATHES     = ::rtl::OUString::createFromAscii("UserPaths"    );
-const ::rtl::OUString CFGPROP_WRITEPATH      = ::rtl::OUString::createFromAscii("WritePath"    );
-const ::rtl::OUString CFGPROP_ISSINGLEPATH   = ::rtl::OUString::createFromAscii("IsSinglePath" );
+const ::rtl::OUString CFGPROP_USERPATHES(RTL_CONSTASCII_USTRINGPARAM("UserPaths"));
+const ::rtl::OUString CFGPROP_WRITEPATH(RTL_CONSTASCII_USTRINGPARAM("WritePath"));
 
 /*
     0 : old style              "Template"              string using ";" as seperator
@@ -75,9 +73,9 @@ const ::rtl::OUString CFGPROP_ISSINGLEPATH   = ::rtl::OUString::createFromAscii(
     3 : write path             "Template_write"        string
  */
 
-const ::rtl::OUString POSTFIX_INTERNAL_PATHES = ::rtl::OUString::createFromAscii("_internal");
-const ::rtl::OUString POSTFIX_USER_PATHES     = ::rtl::OUString::createFromAscii("_user"    );
-const ::rtl::OUString POSTFIX_WRITE_PATH      = ::rtl::OUString::createFromAscii("_writable");
+const ::rtl::OUString POSTFIX_INTERNAL_PATHES(RTL_CONSTASCII_USTRINGPARAM("_internal"));
+const ::rtl::OUString POSTFIX_USER_PATHES(RTL_CONSTASCII_USTRINGPARAM("_user"));
+const ::rtl::OUString POSTFIX_WRITE_PATH(RTL_CONSTASCII_USTRINGPARAM("_writable"));
 
 const sal_Int32 IDGROUP_OLDSTYLE        = 0;
 const sal_Int32 IDGROUP_INTERNAL_PATHES = 1;
@@ -272,6 +270,9 @@ OUStringList PathSettings::impl_readOldFormat(const ::rtl::OUString& sPath)
 // NO substitution here ! It's done outside ...
 PathSettings::PathInfo PathSettings::impl_readNewFormat(const ::rtl::OUString& sPath)
 {
+    const static ::rtl::OUString CFGPROP_INTERNALPATHES(RTL_CONSTASCII_USTRINGPARAM("InternalPaths"));
+    const static ::rtl::OUString CFGPROP_ISSINGLEPATH(RTL_CONSTASCII_USTRINGPARAM("IsSinglePath"));
+
     css::uno::Reference< css::container::XNameAccess > xCfg = fa_getCfgNew();
 
     // get access to the "queried" path
@@ -1117,7 +1118,7 @@ css::uno::Reference< css::util::XStringSubstitution > PathSettings::fa_getSubsti
 //-----------------------------------------------------------------------------
 css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgOld()
 {
-    const static ::rtl::OUString CFG_NODE_OLD = ::rtl::OUString::createFromAscii("org.openoffice.Office.Common/Path/Current");
+    const static ::rtl::OUString CFG_NODE_OLD(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/Path/Current"));
 
     // SAFE ->
     ReadGuard aReadLock(m_aLock);
@@ -1147,7 +1148,7 @@ css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgOld()
 //-----------------------------------------------------------------------------
 css::uno::Reference< css::container::XNameAccess > PathSettings::fa_getCfgNew()
 {
-    const static ::rtl::OUString CFG_NODE_NEW = ::rtl::OUString::createFromAscii("org.openoffice.Office.Paths/Paths");
+    const static ::rtl::OUString CFG_NODE_NEW(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Paths/Paths"));
 
     // SAFE ->
     ReadGuard aReadLock(m_aLock);
commit 59ba0a0e9737a3005b029ac525a6d6f43809671e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 25 20:47:13 2010 +0100

    micro optimization

diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index bdc843c..e356360 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -70,7 +70,7 @@ sal_Bool LanguageSelection::bFoundLanguage = sal_False;
 OUString LanguageSelection::aFoundLanguage;
 LanguageSelection::LanguageSelectionStatus LanguageSelection::m_eStatus = LS_STATUS_OK;
 
-const OUString LanguageSelection::usFallbackLanguage = OUString::createFromAscii("en-US");
+const OUString LanguageSelection::usFallbackLanguage(RTL_CONSTASCII_USTRINGPARAM("en-US"));
 
 static sal_Bool existsURL( OUString const& sURL )
 {
@@ -126,7 +126,7 @@ Locale LanguageSelection::IsoStringToLocale(const OUString& str)
 bool LanguageSelection::prepareLanguage()
 {
     m_eStatus = LS_STATUS_OK;
-    OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
+    OUString sConfigSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
     Reference< XMultiServiceFactory > theMSF = comphelper::getProcessServiceFactory();
     Reference< XLocalizable > theConfigProvider;
     try
@@ -147,7 +147,7 @@ bool LanguageSelection::prepareLanguage()
     try
     {
         Reference< XPropertySet > xProp(getConfigAccess("org.openoffice.System/L10N/", sal_False), UNO_QUERY_THROW);
-        Any aWin16SysLocale = xProp->getPropertyValue(OUString::createFromAscii("SystemLocale"));
+        Any aWin16SysLocale = xProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("SystemLocale")));
         ::rtl::OUString sWin16SysLocale;
         aWin16SysLocale >>= sWin16SysLocale;
         if( sWin16SysLocale.getLength())
@@ -164,7 +164,7 @@ bool LanguageSelection::prepareLanguage()
         OUString usLocale;
         Reference< XPropertySet > xLocaleProp(getConfigAccess(
             "org.openoffice.System/L10N", sal_True), UNO_QUERY_THROW);
-        xLocaleProp->getPropertyValue(OUString::createFromAscii("Locale")) >>= usLocale;
+        xLocaleProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Locale"))) >>= usLocale;
             setDefaultLanguage(usLocale);
     }
     catch (Exception&)
@@ -235,7 +235,7 @@ bool LanguageSelection::prepareLanguage()
             if ( !bCmdLanguage )
             {
                 // Store language only 
-                xProp->setPropertyValue(OUString::createFromAscii("ooLocale"), makeAny(aLocaleString));
+                xProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("ooLocale")), makeAny(aLocaleString));
                 Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
             }
             
@@ -243,14 +243,14 @@ bool LanguageSelection::prepareLanguage()
             {
                 // Store language only 
                 Reference< XPropertySet > xProp2(getConfigAccess("org.openoffice.Office.Linguistic/General/", sal_True), UNO_QUERY_THROW);
-                xProp2->setPropertyValue(OUString::createFromAscii("UILocale"), makeAny(aLocaleString));
+                xProp2->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale")), makeAny(aLocaleString));
                 Reference< XChangesBatch >(xProp2, UNO_QUERY_THROW)->commitChanges();
             }
             
             MsLangId::setConfiguredSystemUILanguage( MsLangId::convertLocaleToLanguage(loc) );
 
             OUString sLocale;
-            xProp->getPropertyValue(OUString::createFromAscii("ooSetupSystemLocale")) >>= sLocale;
+            xProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupSystemLocale"))) >>= sLocale;
             if ( sLocale.getLength() )
             {
                 loc = LanguageSelection::IsoStringToLocale(sLocale);
@@ -371,12 +371,12 @@ Reference< XNameAccess > LanguageSelection::getConfigAccess(const sal_Char* pPat
 {
     Reference< XNameAccess > xNameAccess;
     try{
-        OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
+        OUString sConfigSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
         OUString sAccessSrvc;
         if (bUpdate)
-            sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
+            sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess"));
         else
-            sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess");
+            sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess"));
 
         OUString sConfigURL = OUString::createFromAscii(pPath);
 
@@ -418,7 +418,7 @@ static Sequence< OUString > _getFallbackLocales(const OUString& aIsoLang)
     Sequence< OUString > seqFallbacks;
     if (aIsoLang.equalsAscii("zh-HK")) {
         seqFallbacks = Sequence< OUString >(1);
-        seqFallbacks[0] = OUString::createFromAscii("zh-TW");
+        seqFallbacks[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("zh-TW"));
     }
     return seqFallbacks;
 }
@@ -490,7 +490,7 @@ OUString LanguageSelection::getUserLanguage()
     {
         try
         {
-            xAccess->getByName(OUString::createFromAscii("UILocale")) >>= aUserLanguage;
+            xAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale"))) >>= aUserLanguage;
         }
         catch ( NoSuchElementException const & )
         {
@@ -514,7 +514,7 @@ OUString LanguageSelection::getSystemLanguage()
     {
         try
         {
-            xAccess->getByName(OUString::createFromAscii("UILocale")) >>= aUserLanguage;
+            xAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale"))) >>= aUserLanguage;
         }
         catch ( NoSuchElementException const & )
         {
@@ -536,7 +536,7 @@ void LanguageSelection::resetUserLanguage()
     try
     {
         Reference< XPropertySet > xProp(getConfigAccess("org.openoffice.Office.Linguistic/General", sal_True), UNO_QUERY_THROW);
-        xProp->setPropertyValue(OUString::createFromAscii("UILocale"), makeAny(OUString::createFromAscii("")));
+        xProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale")), makeAny(OUString::createFromAscii("")));
         Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
     }
     catch ( PropertyVetoException& )
commit 4281901904b354fedfdd060b09a32415fbae0f73
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 25 20:42:20 2010 +0100

    micro optimization

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 4b2e2e0..5b0dc7c 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -107,10 +107,10 @@
 #define STATUS_SAVEAS				2
 #define STATUS_SAVEAS_STANDARDNAME	3
 
-const ::rtl::OUString aFilterNameString = ::rtl::OUString::createFromAscii( "FilterName" );
-const ::rtl::OUString aFilterOptionsString = ::rtl::OUString::createFromAscii( "FilterOptions" );
-const ::rtl::OUString aFilterDataString    = ::rtl::OUString::createFromAscii( "FilterData" );
-const ::rtl::OUString aFilterFlagsString   = ::rtl::OUString::createFromAscii( "FilterFlags" );
+const ::rtl::OUString aFilterNameString(RTL_CONSTASCII_USTRINGPARAM("FilterName"));
+const ::rtl::OUString aFilterOptionsString(RTL_CONSTASCII_USTRINGPARAM("FilterOptions"));
+const ::rtl::OUString aFilterDataString(RTL_CONSTASCII_USTRINGPARAM("FilterData"));
+const ::rtl::OUString aFilterFlagsString(RTL_CONSTASCII_USTRINGPARAM("FilterFlags"));
 
 using namespace ::com::sun::star;
 
@@ -440,19 +440,19 @@ const ::comphelper::SequenceAsHashMap& ModelData_Impl::GetModuleProps()
 //-------------------------------------------------------------------------
 ::rtl::OUString ModelData_Impl::GetDocServiceName()
 {
-    return GetModuleProps().getUnpackedValueOrDefault(::rtl::OUString::createFromAscii( "ooSetupFactoryDocumentService" ), ::rtl::OUString());
+    return GetModuleProps().getUnpackedValueOrDefault(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryDocumentService")), ::rtl::OUString());
 }
 
 //-------------------------------------------------------------------------
 void ModelData_Impl::CheckInteractionHandler()
 {
     ::comphelper::SequenceAsHashMap::const_iterator aInteractIter =
-            m_aMediaDescrHM.find( ::rtl::OUString::createFromAscii( "InteractionHandler" ) );
+            m_aMediaDescrHM.find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) );
 
     if ( aInteractIter == m_aMediaDescrHM.end() )
     {
         try {
-            m_aMediaDescrHM[ ::rtl::OUString::createFromAscii( "InteractionHandler" ) ]
+            m_aMediaDescrHM[ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler")) ]
                 <<= uno::Reference< task::XInteractionHandler >(
                             m_pOwner->GetServiceFactory()->createInstance(
                                             DEFINE_CONST_UNICODE("com.sun.star.task.InteractionHandler") ),
@@ -475,7 +475,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter
     uno::Sequence< beans::PropertyValue > aProps;
 
     ::rtl::OUString aFilterName = GetModuleProps().getUnpackedValueOrDefault(
-                                                                ::rtl::OUString::createFromAscii( "ooSetupFactoryDefaultFilter" ),
+                                                                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupFactoryDefaultFilter")),
                                                                 ::rtl::OUString() );
 
     m_pOwner->GetFilterConfiguration()->getByName( aFilterName ) >>= aProps;
@@ -492,7 +492,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter
     if ( aProps.getLength() )
     {
         ::comphelper::SequenceAsHashMap aFiltHM( aProps );
-        sal_Int32 nFlags = aFiltHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ),
+        sal_Int32 nFlags = aFiltHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")),
                                                         (sal_Int32)0 );
         if ( ( ( nFlags & nMust ) == nMust ) && !( nFlags & nDont ) )
             aFilterProps = aProps;
@@ -506,7 +506,7 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceDefaultFilter
 uno::Sequence< beans::PropertyValue > ModelData_Impl::GetDocServiceAnyFilter( sal_Int32 nMust, sal_Int32 nDont )
 {
     uno::Sequence< beans::NamedValue > aSearchRequest( 1 );
-    aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "DocumentService" );
+    aSearchRequest[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService"));
     aSearchRequest[0].Value <<= GetDocServiceName();
 
     return SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont );
@@ -524,9 +524,9 @@ uno::Sequence< beans::PropertyValue > ModelData_Impl::GetPreselectedFilter_Impl(
     {
         // Preselect PDF-Filter for EXPORT
         uno::Sequence< beans::NamedValue > aSearchRequest( 2 );
-        aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "Type" );
-        aSearchRequest[0].Value <<= ::rtl::OUString::createFromAscii( "pdf_Portable_Document_Format" );
-        aSearchRequest[1].Name = ::rtl::OUString::createFromAscii( "DocumentService" );
+        aSearchRequest[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type"));
+        aSearchRequest[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("pdf_Portable_Document_Format"));
+        aSearchRequest[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService"));
         aSearchRequest[1].Value <<= GetDocServiceName();
 
         aFilterProps = SfxStoringHelper::SearchForFilter( m_pOwner->GetFilterQuery(), aSearchRequest, nMust, nDont );
@@ -557,7 +557,7 @@ sal_Bool ModelData_Impl::ExecuteFilterDialog_Impl( const ::rtl::OUString& aFilte
            {
                sal_Int32 nPropertyCount = aProps.getLength();
                for( sal_Int32 nProperty=0; nProperty < nPropertyCount; ++nProperty )
-                   if( aProps[nProperty].Name.equals( ::rtl::OUString::createFromAscii("UIComponent")) )
+                   if( aProps[nProperty].Name.equals( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIComponent"))) )
                    {
                     ::rtl::OUString aServiceName;
                        aProps[nProperty].Value >>= aServiceName;
@@ -641,7 +641,7 @@ sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus )
             // the saving is acceptable
             // in case the configuration entry is not set or set to false
             // or in case of version creation
-            ::rtl::OUString aVersionCommentString = ::rtl::OUString::createFromAscii( "VersionComment" );
+            ::rtl::OUString aVersionCommentString = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VersionComment"));
             if ( ( ::comphelper::ConfigurationHelper::readRelativeKey(
                     xCommonConfig,
                     ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Save/Document/" ) ),
@@ -675,10 +675,10 @@ sal_Int8 ModelData_Impl::CheckStateForSave()
     sal_Bool bVersInfoNeedsStore = sal_False;
     ::comphelper::SequenceAsHashMap aAcceptedArgs;
 
-    ::rtl::OUString aVersionCommentString = ::rtl::OUString::createFromAscii( "VersionComment" );
-    ::rtl::OUString aAuthorString = ::rtl::OUString::createFromAscii( "Author" );
-    ::rtl::OUString aInteractionHandlerString = ::rtl::OUString::createFromAscii( "InteractionHandler" );
-    ::rtl::OUString aStatusIndicatorString = ::rtl::OUString::createFromAscii( "StatusIndicator" );
+    ::rtl::OUString aVersionCommentString(RTL_CONSTASCII_USTRINGPARAM("VersionComment"));
+    ::rtl::OUString aAuthorString(RTL_CONSTASCII_USTRINGPARAM("Author"));
+    ::rtl::OUString aInteractionHandlerString(RTL_CONSTASCII_USTRINGPARAM("InteractionHandler"));
+    ::rtl::OUString aStatusIndicatorString(RTL_CONSTASCII_USTRINGPARAM("StatusIndicator"));
 
     if ( GetMediaDescr().find( aVersionCommentString ) != GetMediaDescr().end() )
     {
@@ -732,13 +732,13 @@ sal_Int8 ModelData_Impl::CheckFilter( const ::rtl::OUString& aFilterName )
             m_pOwner->GetFilterConfiguration()->getByName( aFilterName ) >>= aFilterProps;
 
         aFiltPropsHM = ::comphelper::SequenceAsHashMap( aFilterProps );
-        nFiltFlags = aFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), (sal_Int32)0 );
+        nFiltFlags = aFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 );
     }
 
     // only a temporary solution until default filter retrieving feature is implemented
     // then GetDocServiceDefaultFilter() must be used
     ::comphelper::SequenceAsHashMap aDefFiltPropsHM = GetDocServiceDefaultFilterCheckFlags( 3, 0 );
-    sal_Int32 nDefFiltFlags = aDefFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), (sal_Int32)0 );
+    sal_Int32 nDefFiltFlags = aDefFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 );
 
     // if the old filter is not acceptable
     // and there is no default filter or it is not acceptable for requested parameters then proceed with saveAs
@@ -758,12 +758,12 @@ sal_Int8 ModelData_Impl::CheckFilter( const ::rtl::OUString& aFilterName )
     {
         // the default filter is acceptable and the old filter is alian one
         // so ask to make a saveAs operation
-        ::rtl::OUString aUIName = aFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "UIName" ),
+        ::rtl::OUString aUIName = aFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")),
                                                                                 ::rtl::OUString() );
-        ::rtl::OUString aDefUIName = aDefFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "UIName" ),
+        ::rtl::OUString aDefUIName = aDefFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")),
                                                                                 ::rtl::OUString() );
         ::rtl::OUString aPreusedFilterName = GetDocProps().getUnpackedValueOrDefault(
-                                                    ::rtl::OUString::createFromAscii( "PreusedFilterName" ),
+                                                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PreusedFilterName")),
                                                     ::rtl::OUString() );
         if ( !aPreusedFilterName.equals( aFilterName ) && !aUIName.equals( aDefUIName ) )
         {
@@ -779,7 +779,7 @@ sal_Int8 ModelData_Impl::CheckFilter( const ::rtl::OUString& aFilterName )
 sal_Bool ModelData_Impl::CheckFilterOptionsDialogExistence()
 {
     uno::Sequence< beans::NamedValue > aSearchRequest( 1 );
-    aSearchRequest[0].Name = ::rtl::OUString::createFromAscii( "DocumentService" );
+    aSearchRequest[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("DocumentService"));
     aSearchRequest[0].Value <<= GetDocServiceName();
 
     uno::Reference< container::XEnumeration > xFilterEnum =
@@ -792,7 +792,7 @@ sal_Bool ModelData_Impl::CheckFilterOptionsDialogExistence()
         {
             ::comphelper::SequenceAsHashMap aPropsHM( pProps );
             ::rtl::OUString aUIServName = aPropsHM.getUnpackedValueOrDefault(
-                                            ::rtl::OUString::createFromAscii( "UIComponent" ),
+                                            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIComponent")),
                                             ::rtl::OUString() );
             if ( aUIServName.getLength() )
                 return sal_True;
@@ -816,7 +816,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
     sal_Bool bUseFilterOptions = sal_False;
 
     ::comphelper::SequenceAsHashMap::const_iterator aOverwriteIter =
-                GetMediaDescr().find( ::rtl::OUString::createFromAscii( "Overwrite" ) );
+                GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Overwrite")) );
 
     // the file name must be specified if overwrite option is set
     if ( aOverwriteIter != GetMediaDescr().end() )
@@ -870,7 +870,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
             // this is a PDF export
             // the filter options has been shown already
             ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
-                                                        ::rtl::OUString::createFromAscii( "UIName" ),
+                                                        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")),
                                                         ::rtl::OUString() );
 
             pFileDlg = new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "pdf" ) ), rStandardDir, rBlackList );
@@ -920,7 +920,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
     {
         // it is export, set the preselected filter
         ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
-                                        ::rtl::OUString::createFromAscii( "UIName" ),
+                                        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")),
                                         ::rtl::OUString() );
         pFileDlg->SetCurrentFilter( aFilterUIName );
     }
@@ -936,24 +936,24 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
             m_pOwner->GetFilterConfiguration()->getByName( aOldFilterName ) >>= aOldFilterProps;
 
         ::comphelper::SequenceAsHashMap aOldFiltPropsHM( aOldFilterProps );
-        sal_Int32 nOldFiltFlags = aOldFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ), (sal_Int32)0 );
+        sal_Int32 nOldFiltFlags = aOldFiltPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")), (sal_Int32)0 );
 
         if ( bSetStandardName || ( nOldFiltFlags & nMust ) != nMust || nOldFiltFlags & nDont )
         {
             // the suggested type will be changed, the extension should be adjusted
             aAdjustToType = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
-                                            ::rtl::OUString::createFromAscii( "Type" ),
+                                            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Type")),
                                             ::rtl::OUString() );
 
             ::rtl::OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault(
-                                            ::rtl::OUString::createFromAscii( "UIName" ),
+                                            ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")),
                                             ::rtl::OUString() );
             pFileDlg->SetCurrentFilter( aFilterUIName );
         }
         else
         {
             pFileDlg->SetCurrentFilter( aOldFiltPropsHM.getUnpackedValueOrDefault(
-                                                        ::rtl::OUString::createFromAscii( "UIName" ),
+                                                        ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIName")),
                                                         ::rtl::OUString() ) );
         }
     }
@@ -967,7 +967,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
 
     uno::Reference < view::XSelectionSupplier > xSel( GetModel()->getCurrentController(), uno::UNO_QUERY );
     if ( xSel.is() && xSel->getSelection().hasValue() )
-        GetMediaDescr()[::rtl::OUString::createFromAscii( "SelectionOnly" )] <<= sal_True;
+        GetMediaDescr()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SelectionOnly"))] <<= sal_True;
 
     // This is a temporary hardcoded solution must be removed when
     // dialogs do not need parameters in SidSet representation any more
@@ -1095,7 +1095,7 @@ sal_Bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
     delete pFileDlg;
 
     // merge in results of the dialog execution
-    GetMediaDescr()[::rtl::OUString::createFromAscii( "URL" )] <<=
+    GetMediaDescr()[::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL"))] <<=
                                                 ::rtl::OUString( aURL.GetMainURL( INetURLObject::NO_DECODE ));
     GetMediaDescr()[aFilterNameString] <<= aFilterName;
 
@@ -1115,7 +1115,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
             if ( xFrameDispatch.is() )
             {
                 util::URL aURL;
-                aURL.Complete = ::rtl::OUString::createFromAscii( ".uno:SetDocumentProperties" );
+                aURL.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SetDocumentProperties"));
 
                 uno::Reference< util::XURLTransformer > xTransformer(
                             m_pOwner->GetServiceFactory()->createInstance(
@@ -1125,7 +1125,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
                 {
                     uno::Reference< frame::XDispatch > xDispatch = xFrameDispatch->queryDispatch(
                                                                                 aURL,
-                                                                                ::rtl::OUString::createFromAscii( "_self" ),
+                                                                                ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_self")),
                                                                                 0 );
                     if ( xDispatch.is() )
                     {
@@ -1149,7 +1149,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
     ::rtl::OUString aReccomendedDir;
 
     if ( ( aSuggestedDir.getLength() || GetStorable()->hasLocation() )
-      && !GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "RepairPackage" ),
+      && !GetMediaDescr().getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RepairPackage")),
                                                                       sal_False ) )
     {
         INetURLObject aLocation;
@@ -1206,7 +1206,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
         {
             // adjust the extension to the type
             uno::Reference< container::XNameAccess > xTypeDetection = uno::Reference< container::XNameAccess >(
-                m_pOwner->GetServiceFactory()->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.TypeDetection" ) ),
+                m_pOwner->GetServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.TypeDetection")) ),
                 uno::UNO_QUERY );
             if ( xTypeDetection.is() )
             {
@@ -1217,7 +1217,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
                 {
                     ::comphelper::SequenceAsHashMap aTypeNamePropsHM( aTypeNameProps );
                     uno::Sequence< ::rtl::OUString > aExtensions = aTypeNamePropsHM.getUnpackedValueOrDefault(
-                                                    ::rtl::OUString::createFromAscii( "Extensions" ),
+                                                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Extensions")),
                                                     ::uno::Sequence< ::rtl::OUString >() );
                     if ( aExtensions.getLength() )
                         aObj.SetExtension( aExtensions[0] );
@@ -1260,7 +1260,7 @@ uno::Reference< container::XNameAccess > SfxStoringHelper::GetFilterConfiguratio
     if ( !m_xFilterCFG.is() )
     {
         m_xFilterCFG = uno::Reference< container::XNameAccess >(
-            GetServiceFactory()->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.document.FilterFactory" ) ),
+            GetServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.document.FilterFactory")) ),
             uno::UNO_QUERY );
 
         if ( !m_xFilterCFG.is() )
@@ -1290,7 +1290,7 @@ uno::Reference< ::com::sun::star::frame::XModuleManager > SfxStoringHelper::GetM
     {
         m_xModuleManager = uno::Reference< ::com::sun::star::frame::XModuleManager >(
             GetServiceFactory()->createInstance(
-                    ::rtl::OUString::createFromAscii( "com.sun.star.frame.ModuleManager" ) ),
+                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.ModuleManager")) ),
             uno::UNO_QUERY );
 
         if ( !m_xModuleManager.is() )
@@ -1337,7 +1337,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
     if ( nStoreMode & SAVEAS_REQUESTED )
     {
         ::comphelper::SequenceAsHashMap::const_iterator aSaveToIter =
-                        aModelData.GetMediaDescr().find( ::rtl::OUString::createFromAscii( "SaveTo" ) );
+                        aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SaveTo")) );
         if ( aSaveToIter != aModelData.GetMediaDescr().end() )
         {
             sal_Bool bWideExport = sal_False;
@@ -1431,7 +1431,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
 
     ::comphelper::SequenceAsHashMap aFilterPropsHM( aFilterProps );
     ::rtl::OUString aFilterName = aFilterPropsHM.getUnpackedValueOrDefault(
-                                                                    ::rtl::OUString::createFromAscii( "Name" ),
+                                                                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name")),
                                                                     ::rtl::OUString() );
 
     ::rtl::OUString aFilterFromMediaDescr = aModelData.GetMediaDescr().getUnpackedValueOrDefault(
@@ -1442,7 +1442,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
                                                     ::rtl::OUString() );
 
     sal_Bool bUseFilterOptions = sal_False;
-    ::comphelper::SequenceAsHashMap::const_iterator aFileNameIter = aModelData.GetMediaDescr().find( ::rtl::OUString::createFromAscii( "URL" ) );
+    ::comphelper::SequenceAsHashMap::const_iterator aFileNameIter = aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) );
 
     if ( ( nStoreMode & EXPORT_REQUESTED ) && ( nStoreMode & PDFEXPORT_REQUESTED ) && !( nStoreMode & PDFDIRECTEXPORT_REQUESTED ) )
     {
@@ -1462,7 +1462,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
     {
         sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG;
         ::comphelper::SequenceAsHashMap::const_iterator aDlgIter =
-            aModelData.GetMediaDescr().find( ::rtl::OUString::createFromAscii( "UseSystemDialog" ) );
+            aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UseSystemDialog")) );
         if ( aDlgIter != aModelData.GetMediaDescr().end() )
         {
             sal_Bool bUseSystemDialog = sal_True;
@@ -1490,14 +1490,14 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
 
         ::rtl::OUString sStandardDir;
         ::comphelper::SequenceAsHashMap::const_iterator aStdDirIter =
-            aModelData.GetMediaDescr().find( ::rtl::OUString::createFromAscii( "StandardDir" ) );
+            aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StandardDir")) );
         if ( aStdDirIter != aModelData.GetMediaDescr().end() )
             aStdDirIter->second >>= sStandardDir;
 
         ::com::sun::star::uno::Sequence< ::rtl::OUString >	aBlackList;
 
         ::comphelper::SequenceAsHashMap::const_iterator aBlackListIter =
-            aModelData.GetMediaDescr().find( ::rtl::OUString::createFromAscii( "BlackList" ) );
+            aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BlackList")) );
         if ( aBlackListIter != aModelData.GetMediaDescr().end() )
             aBlackListIter->second >>= aBlackList;
 
@@ -1531,7 +1531,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
         }
 
         bDialogUsed = sal_True;
-        aFileNameIter = aModelData.GetMediaDescr().find( ::rtl::OUString::createFromAscii( "URL" ) );
+        aFileNameIter = aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("URL")) );
     }
     else
     {
@@ -1578,7 +1578,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( const uno::Reference< frame::XModel >&
     }
 
     ::comphelper::SequenceAsHashMap::const_iterator aIter =
-                            aModelData.GetMediaDescr().find( ::rtl::OUString::createFromAscii( "FilterFlags" ) );
+                            aModelData.GetMediaDescr().find( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FilterFlags")) );
     sal_Bool bFilterFlagsSet = ( aIter != aModelData.GetMediaDescr().end() );
 
     if( !( nStoreMode & PDFEXPORT_REQUESTED ) && !bFilterFlagsSet
@@ -1677,7 +1677,7 @@ uno::Sequence< beans::PropertyValue > SfxStoringHelper::SearchForFilter(
             if ( xFilterEnum->nextElement() >>= aProps )
             {
                 ::comphelper::SequenceAsHashMap aPropsHM( aProps );
-                sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString::createFromAscii( "Flags" ),
+                sal_Int32 nFlags = aPropsHM.getUnpackedValueOrDefault( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Flags")),
                                                                         (sal_Int32)0 );
                 if ( ( ( nFlags & nMustFlags ) == nMustFlags ) && !( nFlags & nDontFlags ) )
                 {
@@ -1714,7 +1714,7 @@ sal_Bool SfxStoringHelper::CheckFilterOptionsAppearence(
                {
                 ::comphelper::SequenceAsHashMap aPropsHM( aProps );
                    ::rtl::OUString aServiceName = aPropsHM.getUnpackedValueOrDefault(
-                                                    ::rtl::OUString::createFromAscii( "UIComponent" ),
+                                                    ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("UIComponent")),
                                                     ::rtl::OUString() );
                 if( aServiceName.getLength() )
                        bUseFilterOptions = sal_True;
commit 4c1a59fa65912a83896f258a7f8112427d4393a5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 25 20:36:47 2010 +0100

    micro optimization

diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 1c89d20..b4172dd 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -133,7 +133,7 @@ bool writeOasis2OOoLibraryElement(
     Reference< beans::XPropertySet > xProps( xMSF, UNO_QUERY );
     OSL_ASSERT( xProps.is() );
     OSL_VERIFY( xProps->getPropertyValue(
-        OUString::createFromAscii(("DefaultContext")) ) >>= xContext );
+        OUString(RTL_CONSTASCII_USTRINGPARAM("DefaultContext")) ) >>= xContext );
 
     Reference< lang::XMultiComponentFactory > xSMgr(
         xContext->getServiceManager() );
@@ -179,7 +179,7 @@ bool writeOasis2OOoLibraryElement(
 
     xml::sax::InputSource source;
     source.aInputStream = xInput;
-    source.sSystemId = OUString::createFromAscii( "virtual file" );
+    source.sSystemId = OUString(RTL_CONSTASCII_USTRINGPARAM("virtual file"));
 
     xParser->parseStream( source );
 
@@ -353,8 +353,8 @@ SfxLibraryContainer* SfxDialogLibraryContainer::createInstanceImpl( void )
 }
 
 
-static OUString aResourceFileNameBase = OUString::createFromAscii( "DialogStrings" );
-static OUString aResourceFileCommentBase = OUString::createFromAscii( "# Strings for Dialog Library " );
+static OUString aResourceFileNameBase(RTL_CONSTASCII_USTRINGPARAM("DialogStrings"));
+static OUString aResourceFileCommentBase(RTL_CONSTASCII_USTRINGPARAM("# Strings for Dialog Library "));
 
 // Resource handling
 Reference< ::com::sun::star::resource::XStringResourcePersistence >
@@ -381,7 +381,7 @@ Reference< ::com::sun::star::resource::XStringResourcePersistence >
 
         // TODO: Ctor
         xRet = Reference< resource::XStringResourcePersistence >( mxMSF->createInstance
-            ( OUString::createFromAscii( "com.sun.star.resource.StringResourceWithStorage" ) ), UNO_QUERY );
+            ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.StringResourceWithStorage")) ), UNO_QUERY );
 
         uno::Reference< embed::XStorage > xLibrariesStor;
         uno::Reference< embed::XStorage > xLibraryStor;
@@ -429,7 +429,7 @@ Reference< ::com::sun::star::resource::XStringResourcePersistence >
 
         // TODO: Ctor
         xRet = Reference< resource::XStringResourcePersistence >( mxMSF->createInstance
-            ( OUString::createFromAscii( "com.sun.star.resource.StringResourceWithLocation" ) ), UNO_QUERY );
+            ( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.resource.StringResourceWithLocation")) ), UNO_QUERY );
 
         // TODO: Ctor
         if( xRet.is() )
@@ -511,9 +511,9 @@ Sequence< ::rtl::OUString > SAL_CALL SfxDialogLibraryContainer::getSupportedServ
 Sequence< OUString > SfxDialogLibraryContainer::getSupportedServiceNames_static()
 {
     Sequence< OUString > aServiceNames( 2 );
-    aServiceNames[0] = OUString::createFromAscii( "com.sun.star.script.DocumentDialogLibraryContainer" );
+    aServiceNames[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.DocumentDialogLibraryContainer"));
     // plus, for compatibility:
-    aServiceNames[1] = OUString::createFromAscii( "com.sun.star.script.DialogLibraryContainer" );
+    aServiceNames[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.DialogLibraryContainer"));
     return aServiceNames;
 }
 
@@ -525,7 +525,7 @@ OUString SfxDialogLibraryContainer::getImplementationName_static()
     MutexGuard aGuard( Mutex::getGlobalMutex() );
     if( bNeedsInit )
     {
-        aImplName = OUString::createFromAscii( "com.sun.star.comp.sfx2.DialogLibraryContainer" );
+        aImplName = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sfx2.DialogLibraryContainer"));
         bNeedsInit = sal_False;
     }
     return aImplName;
commit acb3d5a2e5603fd3213c1857b880b362a901b841
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 25 17:07:40 2010 +0100

    #i96106# WaE

diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 698371a..f31be53 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -1216,7 +1216,7 @@ XPolygon SdrEdgeObj::ImpCalcEdgeTrack(const Point& rPt1, long nAngle1, const Rec
     bool bInsMeetingPoint=aEP1.X()!=aEP2.X() && aEP1.Y()!=aEP2.Y();
     bool bHorzE1=aEP1.Y()==aXP1[nXP1Anz-2].Y(); // letzte Linie von XP1 horizontal?
     bool bHorzE2=aEP2.Y()==aXP2[nXP2Anz-2].Y(); // letzte Linie von XP2 horizontal?
-    if (aEP1==aEP2 && (bHorzE1 && bHorzE2 && aEP1.Y()==aEP2.Y()) || (!bHorzE1 && !bHorzE2 && aEP1.X()==aEP2.X())) {
+    if (aEP1==aEP2 && ((bHorzE1 && bHorzE2 && aEP1.Y()==aEP2.Y()) || (!bHorzE1 && !bHorzE2 && aEP1.X()==aEP2.X()))) {
         // Sonderbehandlung fuer 'I'-Verbinder
         nXP1Anz--; aXP1.Remove(nXP1Anz,1);
         nXP2Anz--; aXP2.Remove(nXP2Anz,1);
commit 6eda93118097c6f0b4cf0d527e870e8101210874
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Oct 25 17:04:06 2010 +0100

    #i106131# ignore bogus tabstops

diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx
index 0827c23..a89a7a6 100644
--- a/editeng/source/items/paraitem.cxx
+++ b/editeng/source/items/paraitem.cxx
@@ -1141,9 +1141,12 @@ bool SvxTabStopItem::PutValue( const uno::Any& rVal, BYTE nMemberId )
             sal_Int32 nNewPos = 0;
             if (!(rVal >>= nNewPos) )
                 return sal_False;
+            if (bConvert)
+                nNewPos = MM100_TO_TWIP ( nNewPos );
+            if (nNewPos <= 0)
+                return sal_False;
             const SvxTabStop& rTab = *(GetStart());
-            SvxTabStop aNewTab ( bConvert ? MM100_TO_TWIP ( nNewPos ) : nNewPos,
-                                 rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() );
+            SvxTabStop aNewTab ( nNewPos, rTab.GetAdjustment(), rTab.GetDecimal(), rTab.GetFill() );
             Remove ( 0 );
             Insert( aNewTab );
             break;


More information about the Libreoffice-commits mailing list