[Libreoffice-commits] .: sw/source
Miklos Vajna
vmiklos at kemper.freedesktop.org
Sat Jun 23 06:03:18 PDT 2012
sw/source/core/text/inftxt.cxx | 6 ++---
sw/source/core/unocore/SwXTextDefaults.cxx | 30 ++++++++++++++---------------
sw/source/ui/config/dbconfig.cxx | 2 -
sw/source/ui/lingu/olmenu.cxx | 4 +--
sw/source/ui/smartmenu/stmenu.cxx | 4 ---
sw/source/ui/uiview/view0.cxx | 2 -
sw/source/ui/utlui/navicfg.cxx | 2 -
7 files changed, 24 insertions(+), 26 deletions(-)
New commits:
commit 833bc9014505d20f25186e7dcf583d34fc9f114e
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Sat Jun 23 15:03:59 2012 +0200
sw: kill C2U() usage in new re-based
Change-Id: I5e4641a70c83ca67793bc64f5b509d7ebe60e53b
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index 4b0b7a5..3970f31 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -602,7 +602,7 @@ void SwTxtPaintInfo::_DrawText( const XubString &rText, const SwLinePortion &rPo
nComp = GetKanaComp();
sal_Bool bCfgIsAutoGrammar = sal_False;
- SvtLinguConfig().GetProperty( C2U( UPN_IS_GRAMMAR_AUTO ) ) >>= bCfgIsAutoGrammar;
+ SvtLinguConfig().GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bCfgIsAutoGrammar;
const sal_Bool bBullet = OnWin() && GetOpt().IsBlank() && IsNoSymbol();
const sal_Bool bTmpWrong = bWrong && OnWin() && GetOpt().IsOnlineSpell();
const sal_Bool bTmpGrammarCheck = bGrammarCheck && OnWin() && bCfgIsAutoGrammar && GetOpt().IsOnlineSpell();
@@ -1209,11 +1209,11 @@ static void lcl_InitHyphValues( PropertyValues &rVals,
rVals.realloc( 2 );
PropertyValue *pVal = rVals.getArray();
- pVal[0].Name = C2U( UPN_HYPH_MIN_LEADING );
+ pVal[0].Name = UPN_HYPH_MIN_LEADING;
pVal[0].Handle = UPH_HYPH_MIN_LEADING;
pVal[0].Value <<= nMinLeading;
- pVal[1].Name = C2U( UPN_HYPH_MIN_TRAILING );
+ pVal[1].Name = UPN_HYPH_MIN_TRAILING;
pVal[1].Handle = UPH_HYPH_MIN_TRAILING;
pVal[1].Value <<= nMinTrailing;
}
diff --git a/sw/source/core/unocore/SwXTextDefaults.cxx b/sw/source/core/unocore/SwXTextDefaults.cxx
index 35c6f89..0bc4fc5 100644
--- a/sw/source/core/unocore/SwXTextDefaults.cxx
+++ b/sw/source/core/unocore/SwXTextDefaults.cxx
@@ -252,20 +252,20 @@ Any SAL_CALL SwXTextDefaults::getPropertyDefault( const OUString& rPropertyName
rtl::OUString SAL_CALL SwXTextDefaults::getImplementationName( )
throw (RuntimeException)
{
- return C2U("SwXTextDefaults");
+ return OUString("SwXTextDefaults");
}
sal_Bool SAL_CALL SwXTextDefaults::supportsService( const ::rtl::OUString& rServiceName )
throw (RuntimeException)
{
- return rServiceName == C2U("com.sun.star.text.Defaults") ||
- rServiceName == C2U("com.sun.star.style.CharacterProperties") ||
- rServiceName == C2U("com.sun.star.style.CharacterPropertiesAsian") ||
- rServiceName == C2U("com.sun.star.style.CharacterPropertiesComplex") ||
- rServiceName == C2U("com.sun.star.style.ParagraphProperties") ||
- rServiceName == C2U("com.sun.star.style.ParagraphPropertiesAsian") ||
- rServiceName == C2U("com.sun.star.style.ParagraphPropertiesComplex");
+ return rServiceName == "com.sun.star.text.Defaults" ||
+ rServiceName == "com.sun.star.style.CharacterProperties" ||
+ rServiceName == "com.sun.star.style.CharacterPropertiesAsian" ||
+ rServiceName == "com.sun.star.style.CharacterPropertiesComplex" ||
+ rServiceName == "com.sun.star.style.ParagraphProperties" ||
+ rServiceName == "com.sun.star.style.ParagraphPropertiesAsian" ||
+ rServiceName == "com.sun.star.style.ParagraphPropertiesComplex";
}
@@ -274,13 +274,13 @@ uno::Sequence< ::rtl::OUString > SAL_CALL SwXTextDefaults::getSupportedServiceNa
{
uno::Sequence< OUString > aRet(7);
OUString* pArr = aRet.getArray();
- *pArr++ = C2U("com.sun.star.text.Defaults");
- *pArr++ = C2U("com.sun.star.style.CharacterProperties");
- *pArr++ = C2U("com.sun.star.style.CharacterPropertiesAsian");
- *pArr++ = C2U("com.sun.star.style.CharacterPropertiesComplex");
- *pArr++ = C2U("com.sun.star.style.ParagraphProperties");
- *pArr++ = C2U("com.sun.star.style.ParagraphPropertiesAsian");
- *pArr++ = C2U("com.sun.star.style.ParagraphPropertiesComplex");
+ *pArr++ = "com.sun.star.text.Defaults";
+ *pArr++ = "com.sun.star.style.CharacterProperties";
+ *pArr++ = "com.sun.star.style.CharacterPropertiesAsian";
+ *pArr++ = "com.sun.star.style.CharacterPropertiesComplex";
+ *pArr++ = "com.sun.star.style.ParagraphProperties";
+ *pArr++ = "com.sun.star.style.ParagraphPropertiesAsian";
+ *pArr++ = "com.sun.star.style.ParagraphPropertiesComplex";
return aRet;
}
diff --git a/sw/source/ui/config/dbconfig.cxx b/sw/source/ui/config/dbconfig.cxx
index 0d37655..0af1aa3 100644
--- a/sw/source/ui/config/dbconfig.cxx
+++ b/sw/source/ui/config/dbconfig.cxx
@@ -66,7 +66,7 @@ const Sequence<OUString>& SwDBConfig::GetPropertyNames()
}
SwDBConfig::SwDBConfig() :
- ConfigItem(C2U("Office.DataAccess"),
+ ConfigItem("Office.DataAccess",
CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
pAdrImpl(0),
pBibImpl(0)
diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx
index 8fbde25..7d7f43a 100644
--- a/sw/source/ui/lingu/olmenu.cxx
+++ b/sw/source/ui/lingu/olmenu.cxx
@@ -429,7 +429,7 @@ SwSpellPopup::SwSpellPopup(
}
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
- OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
+ OUString aSpellingAndGrammar = RetrieveLabelFromCommand( ".uno:SpellingAndGrammarDialog" );
SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
@@ -637,7 +637,7 @@ aInfo16( SW_RES(IMG_INFO_16) )
}
OUString aIgnoreSelection( String( SW_RES( STR_IGNORE_SELECTION ) ) );
- OUString aSpellingAndGrammar = RetrieveLabelFromCommand( C2U(".uno:SpellingAndGrammarDialog") );
+ OUString aSpellingAndGrammar = RetrieveLabelFromCommand( ".uno:SpellingAndGrammarDialog" );
SetItemText( MN_SPELLING_DLG, aSpellingAndGrammar );
sal_uInt16 nItemPos = GetItemPos( MN_IGNORE_WORD );
InsertItem( MN_IGNORE_SELECTION, aIgnoreSelection, 0, nItemPos );
diff --git a/sw/source/ui/smartmenu/stmenu.cxx b/sw/source/ui/smartmenu/stmenu.cxx
index a07edef..211a107 100644
--- a/sw/source/ui/smartmenu/stmenu.cxx
+++ b/sw/source/ui/smartmenu/stmenu.cxx
@@ -30,8 +30,6 @@
#include <view.hxx>
#include <breakit.hxx>
-#define C2U(cChar) rtl::OUString::createFromAscii(cChar)
-
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -96,7 +94,7 @@ SwSmartTagPopup::SwSmartTagPopup( SwView* pSwView,
}
// sub-menu starts with smart tag caption and separator
- const rtl::OUString aSmartTagCaption2 = aSmartTagCaption + C2U(": ") + aRangeText;
+ const rtl::OUString aSmartTagCaption2 = aSmartTagCaption + ": " + aRangeText;
nSubMenuPos = 0;
pSbMenu->InsertItem( nMenuId++, aSmartTagCaption2, MIB_NOSELECT, nSubMenuPos++ );
pSbMenu->InsertSeparator( nSubMenuPos++ );
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index 4467eba..1d23e78 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -523,7 +523,7 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
// right now we don't have view options for automatic grammar checking. Thus...
sal_Bool bIsAutoGrammar = sal_False;
- aCfg.GetProperty( C2U( UPN_IS_GRAMMAR_AUTO ) ) >>= bIsAutoGrammar;
+ aCfg.GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bIsAutoGrammar;
if (pDoc && bIsAutoGrammar)
StartGrammarChecking( *pDoc );
diff --git a/sw/source/ui/utlui/navicfg.cxx b/sw/source/ui/utlui/navicfg.cxx
index 28ef003..1afca26 100644
--- a/sw/source/ui/utlui/navicfg.cxx
+++ b/sw/source/ui/utlui/navicfg.cxx
@@ -62,7 +62,7 @@ Sequence<OUString> SwNavigationConfig::GetPropertyNames()
}
SwNavigationConfig::SwNavigationConfig() :
- utl::ConfigItem(C2U("Office.Writer/Navigator")),
+ utl::ConfigItem("Office.Writer/Navigator"),
nRootType(0xffff),
nSelectedPos(0),
nOutlineLevel(MAXLEVEL),
More information about the Libreoffice-commits
mailing list