diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-12 09:33:27 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-13 09:08:08 +0200 |
commit | 9c5a91efdb41cd340936846169da130d855a335a (patch) | |
tree | b7a10f7682a9e85c3ff8bdf56549166439b3a429 | |
parent | 74816814a2c03ab5305e47c6d1f6e04f6918d946 (diff) |
expand out the A2S macro
Which is not doing anything useful anymore.
Change-Id: I83422e811d52a77b65655924c07b55dd7229449c
29 files changed, 135 insertions, 162 deletions
diff --git a/framework/source/services/ContextChangeEventMultiplexer.cxx b/framework/source/services/ContextChangeEventMultiplexer.cxx index cf3174adba11..db8f8f17f17a 100644 --- a/framework/source/services/ContextChangeEventMultiplexer.cxx +++ b/framework/source/services/ContextChangeEventMultiplexer.cxx @@ -21,8 +21,6 @@ using ::rtl::OUString; -#define A2S(s) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)) - using namespace css; using namespace cssu; @@ -92,7 +90,7 @@ void SAL_CALL ContextChangeEventMultiplexer::addContextChangeEventListener ( { if ( ! rxListener.is()) throw css::lang::IllegalArgumentException( - A2S("can not add an empty reference"), + "can not add an empty reference", static_cast<XWeak*>(this), 0); @@ -106,7 +104,7 @@ void SAL_CALL ContextChangeEventMultiplexer::addContextChangeEventListener ( { // The listener was added for the same event focus // previously. That is an error. - throw cssl::IllegalArgumentException(A2S("listener added twice"), static_cast<XWeak*>(this), 0); + throw cssl::IllegalArgumentException("listener added twice", static_cast<XWeak*>(this), 0); } } @@ -132,7 +130,7 @@ void SAL_CALL ContextChangeEventMultiplexer::removeContextChangeEventListener ( { if ( ! rxListener.is()) throw cssl::IllegalArgumentException( - A2S("can not remove an empty reference"), + "can not remove an empty reference", static_cast<XWeak*>(this), 0); FocusDescriptor* pFocusDescriptor = GetFocusDescriptor(rxEventFocus, false); @@ -161,7 +159,7 @@ void SAL_CALL ContextChangeEventMultiplexer::removeAllContextChangeEventListener { if ( ! rxListener.is()) throw cssl::IllegalArgumentException( - A2S("can not remove an empty reference"), + "can not remove an empty reference", static_cast<XWeak*>(this), 0); for (ListenerMap::iterator @@ -341,7 +339,7 @@ void SAL_CALL ContextChangeEventMultiplexer::disposing ( OUString SAL_CALL ContextChangeEventMultiplexer::impl_getStaticImplementationName (void) { - return A2S(IMPLEMENTATION_NAME); + return OUString(IMPLEMENTATION_NAME); } @@ -350,8 +348,8 @@ OUString SAL_CALL ContextChangeEventMultiplexer::impl_getStaticImplementationNam cssu::Sequence<OUString> SAL_CALL ContextChangeEventMultiplexer::static_GetSupportedServiceNames (void) { cssu::Sequence<OUString> aServiceNames (2); - aServiceNames[0] = A2S(SERVICE_NAME); - aServiceNames[1] = A2S(SINGLETON_NAME); + aServiceNames[0] = SERVICE_NAME; + aServiceNames[1] = SINGLETON_NAME; return aServiceNames; } diff --git a/include/sfx2/sidebar/Tools.hxx b/include/sfx2/sidebar/Tools.hxx index 7b984c08fbf5..9ba363d68a43 100644 --- a/include/sfx2/sidebar/Tools.hxx +++ b/include/sfx2/sidebar/Tools.hxx @@ -31,7 +31,6 @@ #include <com/sun/star/util/URL.hpp> -#define A2S(s) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))) #define S2A(s) rtl::OUStringToOString(s, RTL_TEXTENCODING_ASCII_US).getStr() namespace cssu = ::com::sun::star::uno; diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index 4b6dd3b79c4d..4e2316a7b07d 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -44,8 +44,6 @@ const char UNO_ALIGNRIGHT[] = ".uno:AlignRight"; const char UNO_ALIGNTOP[] = ".uno:AlignTop"; const char UNO_ALIGNVCENTER[] = ".uno:AlignVCenter"; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - ////////////////////////////////////////////////////////////////////////////// // namespace open @@ -316,11 +314,11 @@ AlignmentPropertyPanel* AlignmentPropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == NULL) - throw lang::IllegalArgumentException(A2S("no parent Window given to AlignmentPropertyPanel::Create"), NULL, 0); + throw lang::IllegalArgumentException("no parent Window given to AlignmentPropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException(A2S("no XFrame given to AlignmentPropertyPanel::Create"), NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to AlignmentPropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw lang::IllegalArgumentException(A2S("no SfxBindings given to AlignmentPropertyPanel::Create"), NULL, 2); + throw lang::IllegalArgumentException("no SfxBindings given to AlignmentPropertyPanel::Create", NULL, 2); return new AlignmentPropertyPanel( pParent, diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx index d7bc7ab39c38..34b823b48afa 100644 --- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx +++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx @@ -51,8 +51,6 @@ const char UNO_SETBORDERSTYLE[] = ".uno:SetBorderStyle"; const char UNO_LINESTYLE[] = ".uno:LineStyle"; const char UNO_FRAMELINECOLOR[] = ".uno:FrameLineColor"; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - ////////////////////////////////////////////////////////////////////////////// // helpers @@ -373,11 +371,11 @@ CellAppearancePropertyPanel* CellAppearancePropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == NULL) - throw lang::IllegalArgumentException(A2S("no parent Window given to CellAppearancePropertyPanel::Create"), NULL, 0); + throw lang::IllegalArgumentException("no parent Window given to CellAppearancePropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException(A2S("no XFrame given to CellAppearancePropertyPanel::Create"), NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to CellAppearancePropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw lang::IllegalArgumentException(A2S("no SfxBindings given to CellAppearancePropertyPanel::Create"), NULL, 2); + throw lang::IllegalArgumentException("no SfxBindings given to CellAppearancePropertyPanel::Create", NULL, 2); return new CellAppearancePropertyPanel( pParent, diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 229b9c40bcb9..fdeceabb08dc 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -43,8 +43,6 @@ const char UNO_NUMBERFORMATCURRENCY[] = ".uno:NumberFormatCurrency"; const char UNO_NUMBERFORMATDATE[] = ".uno:NumberFormatDate"; const char UNO_INSERTFIXEDTEXT[] = ".uno:InsertFixedText"; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - ////////////////////////////////////////////////////////////////////////////// // namespace open @@ -193,11 +191,11 @@ NumberFormatPropertyPanel* NumberFormatPropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == NULL) - throw lang::IllegalArgumentException(A2S("no parent Window given to NumberFormatPropertyPanel::Create"), NULL, 0); + throw lang::IllegalArgumentException("no parent Window given to NumberFormatPropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException(A2S("no XFrame given to NumberFormatPropertyPanel::Create"), NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to NumberFormatPropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw lang::IllegalArgumentException(A2S("no SfxBindings given to NumberFormatPropertyPanel::Create"), NULL, 2); + throw lang::IllegalArgumentException("no SfxBindings given to NumberFormatPropertyPanel::Create", NULL, 2); return new NumberFormatPropertyPanel( pParent, diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx b/sc/source/ui/sidebar/ScPanelFactory.cxx index 0de7e83fc147..4366c2f06902 100644 --- a/sc/source/ui/sidebar/ScPanelFactory.cxx +++ b/sc/source/ui/sidebar/ScPanelFactory.cxx @@ -43,14 +43,13 @@ using ::rtl::OUString; namespace sc { namespace sidebar { -#define A2S(s) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)) #define IMPLEMENTATION_NAME "org.apache.openoffice.comp.sc.sidebar.ScPanelFactory" #define SERVICE_NAME "com.sun.star.ui.UIElementFactory" ::rtl::OUString SAL_CALL ScPanelFactory::getImplementationName (void) { - return A2S(IMPLEMENTATION_NAME); + return OUString(IMPLEMENTATION_NAME); } @@ -66,7 +65,7 @@ cssu::Reference<cssu::XInterface> SAL_CALL ScPanelFactory::createInstance( cssu::Sequence<OUString> SAL_CALL ScPanelFactory::getSupportedServiceNames (void) { cssu::Sequence<OUString> aServiceNames (1); - aServiceNames[0] = A2S(SERVICE_NAME); + aServiceNames[0] = SERVICE_NAME; return aServiceNames; } @@ -102,15 +101,15 @@ Reference<ui::XUIElement> SAL_CALL ScPanelFactory::createUIElement ( ::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); if ( ! xParentWindow.is() || pParentWindow==NULL) throw RuntimeException( - A2S("PanelFactory::createUIElement called without ParentWindow"), + "PanelFactory::createUIElement called without ParentWindow", NULL); if ( ! xFrame.is()) throw RuntimeException( - A2S("PanelFactory::createUIElement called without Frame"), + "PanelFactory::createUIElement called without Frame", NULL); if (pBindings == NULL) throw RuntimeException( - A2S("PanelFactory::createUIElement called without SfxBindings"), + "PanelFactory::createUIElement called without SfxBindings", NULL); #define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s)) diff --git a/sfx2/source/sidebar/CommandInfoProvider.cxx b/sfx2/source/sidebar/CommandInfoProvider.cxx index aff8f94d2f3a..6753692384b7 100644 --- a/sfx2/source/sidebar/CommandInfoProvider.cxx +++ b/sfx2/source/sidebar/CommandInfoProvider.cxx @@ -35,8 +35,6 @@ using namespace cssu; using ::rtl::OUString; -#define A2S(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)) - namespace { @@ -126,7 +124,7 @@ OUString CommandInfoProvider::GetLabelForCommand ( const OUString sLabel (GetCommandLabel(rsCommandName)); const OUString sShortCut (GetCommandShortcut(rsCommandName)); if (sShortCut.getLength() > 0) - return sLabel + A2S(" (") + sShortCut + A2S(")"); + return sLabel + " (" + sShortCut + ")"; else return sLabel; } diff --git a/sfx2/source/sidebar/Context.cxx b/sfx2/source/sidebar/Context.cxx index 42716b92686d..c5c9ae3511e1 100644 --- a/sfx2/source/sidebar/Context.cxx +++ b/sfx2/source/sidebar/Context.cxx @@ -28,11 +28,9 @@ const sal_Int32 Context::ApplicationWildcardMatch = 1; const sal_Int32 Context::ContextWildcardMatch = 2; const sal_Int32 Context::OptimalMatch = 0; // Neither application nor context name is "any". -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - Context::Context (void) - : msApplication(A2S(AnyApplicationName)), - msContext(A2S(AnyContextName)) + : msApplication(AnyApplicationName), + msContext(AnyContextName) { } diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx index 57fe4a38ab7c..90e202ca9232 100644 --- a/sfx2/source/sidebar/ControllerFactory.cxx +++ b/sfx2/source/sidebar/ControllerFactory.cxx @@ -84,15 +84,15 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController( beans::PropertyValue aPropValue; std::vector<Any> aPropertyVector; - aPropValue.Name = A2S("Frame"); + aPropValue.Name = "Frame"; aPropValue.Value <<= rxFrame; aPropertyVector.push_back(makeAny(aPropValue)); - aPropValue.Name = A2S("ServiceManager"); + aPropValue.Name = "ServiceManager"; aPropValue.Value <<= ::comphelper::getProcessServiceFactory(); aPropertyVector.push_back(makeAny(aPropValue)); - aPropValue.Name = A2S("CommandURL"); + aPropValue.Name = "CommandURL"; aPropValue.Value <<= rsCommandName; aPropertyVector.push_back(makeAny(aPropValue)); @@ -155,25 +155,25 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBarController( beans::PropertyValue aPropValue; std::vector<Any> aPropertyVector; - aPropValue.Name = A2S("ModuleIdentifier"); + aPropValue.Name = "ModuleIdentifier"; aPropValue.Value <<= sModuleName; aPropertyVector.push_back( makeAny( aPropValue )); - aPropValue.Name = A2S("Frame"); + aPropValue.Name = "Frame"; aPropValue.Value <<= rxFrame; aPropertyVector.push_back( makeAny( aPropValue )); - aPropValue.Name = A2S("ServiceManager"); + aPropValue.Name = "ServiceManager"; aPropValue.Value <<= comphelper::getProcessServiceFactory(); aPropertyVector.push_back( makeAny( aPropValue )); - aPropValue.Name = A2S("ParentWindow"); + aPropValue.Name = "ParentWindow"; aPropValue.Value <<= VCLUnoHelper::GetInterface(pToolBox); aPropertyVector.push_back( makeAny( aPropValue )); if (nWidth > 0) { - aPropValue.Name = A2S("Width"); + aPropValue.Name = "Width"; aPropValue.Value <<= nWidth; aPropertyVector.push_back( makeAny( aPropValue )); } diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx index 3afbab8d4425..ac0614d7c10f 100644 --- a/sfx2/source/sidebar/ControllerItem.cxx +++ b/sfx2/source/sidebar/ControllerItem.cxx @@ -36,8 +36,6 @@ using namespace css; using namespace cssu; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - namespace { typedef ::cppu::WeakComponentImplHelper1 < @@ -197,7 +195,7 @@ void ControllerItem::ResetFrame (void) ::rtl::OUString ControllerItem::GetLabel (void) const { return CommandInfoProvider::Instance().GetLabelForCommand( - A2S(".uno:")+msCommandName, + ".uno:" + msCommandName, mxFrame); } @@ -211,7 +209,7 @@ void ControllerItem::ResetFrame (void) { if (msCommandName.getLength() > 0) { - const ::rtl::OUString sHelp (pHelp->GetHelpText(A2S(".uno:")+msCommandName, NULL)); + const ::rtl::OUString sHelp (pHelp->GetHelpText(".uno:" + msCommandName, NULL)); return sHelp; } } @@ -223,7 +221,7 @@ void ControllerItem::ResetFrame (void) Image ControllerItem::GetIcon (void) const { - return GetImage(mxFrame, A2S(".uno:")+msCommandName, sal_False); + return GetImage(mxFrame, ".uno:" + msCommandName, sal_False); } diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx index 6a81093b437f..3d0f43c0fecf 100644 --- a/sfx2/source/sidebar/Deck.cxx +++ b/sfx2/source/sidebar/Deck.cxx @@ -69,10 +69,10 @@ Deck::Deck ( mpVerticalScrollBar->SetScrollHdl(LINK(this, Deck, HandleVerticalScrollBarChange)); #ifdef DEBUG - SetText(A2S("Deck")); - mpScrollClipWindow->SetText(A2S("ScrollClipWindow")); - mpFiller->SetText(A2S("Filler")); - mpVerticalScrollBar->SetText(A2S("VerticalScrollBar")); + SetText(OUString("Deck")); + mpScrollClipWindow->SetText(OUString("ScrollClipWindow")); + mpFiller->SetText(OUString("Filler")); + mpVerticalScrollBar->SetText(OUString("VerticalScrollBar")); #endif } @@ -407,7 +407,7 @@ Deck::ScrollContainerWindow::ScrollContainerWindow (Window* pParentWindow) maSeparators() { #ifdef DEBUG - SetText(A2S("ScrollContainerWindow")); + SetText(OUString("ScrollContainerWindow")); #endif } diff --git a/sfx2/source/sidebar/DeckTitleBar.cxx b/sfx2/source/sidebar/DeckTitleBar.cxx index 6e1d10c9aef1..49cbacfa2264 100644 --- a/sfx2/source/sidebar/DeckTitleBar.cxx +++ b/sfx2/source/sidebar/DeckTitleBar.cxx @@ -50,7 +50,7 @@ DeckTitleBar::DeckTitleBar ( SetCloserVisible(true); #ifdef DEBUG - SetText(A2S("DeckTitleBar")); + SetText(OUString("DeckTitleBar")); #endif } diff --git a/sfx2/source/sidebar/EnumContext.cxx b/sfx2/source/sidebar/EnumContext.cxx index 59b937f24341..5d7a3376a737 100644 --- a/sfx2/source/sidebar/EnumContext.cxx +++ b/sfx2/source/sidebar/EnumContext.cxx @@ -22,8 +22,6 @@ namespace sfx2 { namespace sidebar { -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - namespace { typedef ::std::map<rtl::OUString,EnumContext::Application> ApplicationMap; @@ -164,18 +162,18 @@ void EnumContext::ProvideApplicationContainers (void) if (maApplicationMap.empty()) { maApplicationVector.resize(static_cast<size_t>(EnumContext::__LastApplicationEnum)+1); - AddEntry(A2S("com.sun.star.text.TextDocument"), EnumContext::Application_Writer); - AddEntry(A2S("com.sun.star.text.GlobalDocument"), EnumContext::Application_WriterGlobal); - AddEntry(A2S("com.sun.star.text.WebDocument"), EnumContext::Application_WriterWeb); - AddEntry(A2S("com.sun.star.xforms.XMLFormDocument"), EnumContext::Application_WriterXML); - AddEntry(A2S("com.sun.star.sdb.FormDesign"), EnumContext::Application_WriterForm); - AddEntry(A2S("com.sun.star.sdb.TextReportDesign"), EnumContext::Application_WriterReport); - AddEntry(A2S("com.sun.star.sheet.SpreadsheetDocument"), EnumContext::Application_Calc); - AddEntry(A2S("com.sun.star.drawing.DrawingDocument"), EnumContext::Application_Draw); - AddEntry(A2S("com.sun.star.presentation.PresentationDocument"), EnumContext::Application_Impress); - - AddEntry(A2S("any"), EnumContext::Application_Any); - AddEntry(A2S("none"), EnumContext::Application_None); + AddEntry(OUString("com.sun.star.text.TextDocument"), EnumContext::Application_Writer); + AddEntry(OUString("com.sun.star.text.GlobalDocument"), EnumContext::Application_WriterGlobal); + AddEntry(OUString("com.sun.star.text.WebDocument"), EnumContext::Application_WriterWeb); + AddEntry(OUString("com.sun.star.xforms.XMLFormDocument"), EnumContext::Application_WriterXML); + AddEntry(OUString("com.sun.star.sdb.FormDesign"), EnumContext::Application_WriterForm); + AddEntry(OUString("com.sun.star.sdb.TextReportDesign"), EnumContext::Application_WriterReport); + AddEntry(OUString("com.sun.star.sheet.SpreadsheetDocument"), EnumContext::Application_Calc); + AddEntry(OUString("com.sun.star.drawing.DrawingDocument"), EnumContext::Application_Draw); + AddEntry(OUString("com.sun.star.presentation.PresentationDocument"), EnumContext::Application_Impress); + + AddEntry(OUString("any"), EnumContext::Application_Any); + AddEntry(OUString("none"), EnumContext::Application_None); } } @@ -228,10 +226,10 @@ void EnumContext::ProvideContextContainers (void) if (maContextMap.empty()) { maContextVector.resize(static_cast<size_t>(__LastContextEnum)+1); - AddEntry(A2S("any"), Context_Any); - AddEntry(A2S("default"), Context_Default); - AddEntry(A2S("empty"), Context_Empty); -#define AddContext(context) AddEntry(A2S(#context), Context_##context); + AddEntry(OUString("any"), Context_Any); + AddEntry(OUString("default"), Context_Default); + AddEntry(OUString("empty"), Context_Empty); +#define AddContext(context) AddEntry(OUString(#context), Context_##context); AddContext(3DObject); AddContext(Annotation); AddContext(Auditing); diff --git a/sfx2/source/sidebar/MenuButton.cxx b/sfx2/source/sidebar/MenuButton.cxx index 244d02d7edb2..5afb53296de9 100644 --- a/sfx2/source/sidebar/MenuButton.cxx +++ b/sfx2/source/sidebar/MenuButton.cxx @@ -37,7 +37,7 @@ MenuButton::MenuButton (Window* pParentWindow) mePaintType(PT_Theme) { #ifdef DEBUG - SetText(A2S("MenuButton")); + SetText(OUString("MenuButton")); #endif } diff --git a/sfx2/source/sidebar/Panel.cxx b/sfx2/source/sidebar/Panel.cxx index f6f738d30f21..848bb4b37d70 100644 --- a/sfx2/source/sidebar/Panel.cxx +++ b/sfx2/source/sidebar/Panel.cxx @@ -68,7 +68,7 @@ Panel::Panel ( SetBackground(Theme::GetPaint(Theme::Paint_PanelBackground).GetWallpaper()); #ifdef DEBUG - SetText(A2S("Panel")); + SetText(OUString("Panel")); #endif } diff --git a/sfx2/source/sidebar/PanelTitleBar.cxx b/sfx2/source/sidebar/PanelTitleBar.cxx index e6204bd0edf0..c7de577d55ac 100644 --- a/sfx2/source/sidebar/PanelTitleBar.cxx +++ b/sfx2/source/sidebar/PanelTitleBar.cxx @@ -56,7 +56,7 @@ PanelTitleBar::PanelTitleBar ( OSL_ASSERT(mpPanel != NULL); #ifdef DEBUG - SetText(A2S("PanelTitleBar")); + SetText(OUString("PanelTitleBar")); #endif } diff --git a/sfx2/source/sidebar/ResourceManager.cxx b/sfx2/source/sidebar/ResourceManager.cxx index d085ae9a531f..5900b3efff9a 100644 --- a/sfx2/source/sidebar/ResourceManager.cxx +++ b/sfx2/source/sidebar/ResourceManager.cxx @@ -229,7 +229,7 @@ void ResourceManager::ReadDeckList (void) { const ::utl::OConfigurationTreeRoot aDeckRootNode ( ::comphelper::getProcessComponentContext(), - A2S("org.openoffice.Office.UI.Sidebar/Content/DeckList"), + OUString("org.openoffice.Office.UI.Sidebar/Content/DeckList"), false); if ( ! aDeckRootNode.isValid() ) return; @@ -284,7 +284,7 @@ void ResourceManager::ReadPanelList (void) { const ::utl::OConfigurationTreeRoot aPanelRootNode ( ::comphelper::getProcessComponentContext(), - A2S("org.openoffice.Office.UI.Sidebar/Content/PanelList"), + OUString("org.openoffice.Office.UI.Sidebar/Content/PanelList"), false); if ( ! aPanelRootNode.isValid() ) return; @@ -544,7 +544,7 @@ void ResourceManager::ReadLegacyAddons (const Reference<frame::XFrame>& rxFrame) rDeckDescriptor.msHelpText = rDeckDescriptor.msTitle; rDeckDescriptor.mbIsEnabled = true; rDeckDescriptor.mnOrderIndex = 100000 + nReadIndex; - rDeckDescriptor.maContextList.AddContextDescription(Context(sModuleName, A2S("any")), true, OUString()); + rDeckDescriptor.maContextList.AddContextDescription(Context(sModuleName, OUString("any")), true, OUString()); PanelDescriptor& rPanelDescriptor (maPanels[nPanelWriteIndex++]); rPanelDescriptor.msTitle = ::comphelper::getString(aChildNode.getNodeValue("UIName")); @@ -558,7 +558,7 @@ void ResourceManager::ReadLegacyAddons (const Reference<frame::XFrame>& rxFrame) rPanelDescriptor.mnOrderIndex = 100000 + nReadIndex; rPanelDescriptor.mbShowForReadOnlyDocuments = false; rPanelDescriptor.mbWantsCanvas = false; - rPanelDescriptor.maContextList.AddContextDescription(Context(sModuleName, A2S("any")), true, OUString()); + rPanelDescriptor.maContextList.AddContextDescription(Context(sModuleName, OUString("any")), true, OUString()); } // When there where invalid nodes then we have to adapt the size diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 97fd3cf58c7e..d6fd4ba301a1 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -145,7 +145,7 @@ SidebarController::SidebarController ( // Listen for theme property changes. Theme::GetPropertySet()->addPropertyChangeListener( - A2S(""), + OUString(""), static_cast<css::beans::XPropertyChangeListener*>(this)); // Get the dispatch object as preparation to listen for changes of @@ -155,7 +155,7 @@ SidebarController::SidebarController ( if (mxReadOnlyModeDispatch.is()) mxReadOnlyModeDispatch->addStatusListener(this, aURL); - SwitchToDeck(A2S("default")); + SwitchToDeck(OUString("default")); WeakReference<SidebarController> xWeakController (this); maSidebarControllerContainer.insert( @@ -230,7 +230,7 @@ void SAL_CALL SidebarController::disposing (void) mpTabBar.reset(); Theme::GetPropertySet()->removePropertyChangeListener( - A2S(""), + OUString(""), static_cast<css::beans::XPropertyChangeListener*>(this)); maContextChangeUpdate.CancelRequest(); diff --git a/sfx2/source/sidebar/SidebarToolBox.cxx b/sfx2/source/sidebar/SidebarToolBox.cxx index 16f9af251861..95cf7d2246df 100644 --- a/sfx2/source/sidebar/SidebarToolBox.cxx +++ b/sfx2/source/sidebar/SidebarToolBox.cxx @@ -49,7 +49,7 @@ SidebarToolBox::SidebarToolBox (Window* pParentWindow) SetToolboxButtonSize( TOOLBOX_BUTTONSIZE_SMALL ); #ifdef DEBUG - SetText(A2S("SidebarToolBox")); + SetText(OUString("SidebarToolBox")); #endif } diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 30d0b95f18bd..ba5974dadf12 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -62,7 +62,7 @@ TabBar::TabBar ( Layout(); #ifdef DEBUG - SetText(A2S("TabBar")); + SetText(OUString("TabBar")); #endif } diff --git a/sfx2/source/sidebar/TabItem.cxx b/sfx2/source/sidebar/TabItem.cxx index 772c5916cb25..e4d43c07849e 100644 --- a/sfx2/source/sidebar/TabItem.cxx +++ b/sfx2/source/sidebar/TabItem.cxx @@ -40,7 +40,7 @@ TabItem::TabItem (Window* pParentWindow) SetStyle(GetStyle() | WB_TABSTOP | WB_DIALOGCONTROL | WB_NOPOINTERFOCUS); SetBackground(Theme::GetPaint(Theme::Paint_TabBarBackground).GetWallpaper()); #ifdef DEBUG - SetText(A2S("TabItem")); + SetText(OUString("TabItem")); #endif } diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx index 36e58bb07006..3db9949517bb 100644 --- a/sfx2/source/sidebar/Theme.cxx +++ b/sfx2/source/sidebar/Theme.cxx @@ -323,29 +323,29 @@ void Theme::UpdateTheme (void) Any(sal_Int32(aBorderColor.GetRGBColor()))); setPropertyValue( maPropertyIdToNameMap[Image_Grip], - Any(A2S("private:graphicrepository/sfx2/res/grip.png"))); + Any(OUString("private:graphicrepository/sfx2/res/grip.png"))); setPropertyValue( maPropertyIdToNameMap[Image_Expand], - Any(A2S("private:graphicrepository/res/plus.png"))); + Any(OUString("private:graphicrepository/res/plus.png"))); setPropertyValue( maPropertyIdToNameMap[Image_Collapse], - Any(A2S("private:graphicrepository/res/minus.png"))); + Any(OUString("private:graphicrepository/res/minus.png"))); setPropertyValue( maPropertyIdToNameMap[Image_TabBarMenu], - Any(A2S("private:graphicrepository/sfx2/res/symphony/open_more.png"))); + Any(OUString("private:graphicrepository/sfx2/res/symphony/open_more.png"))); setPropertyValue( maPropertyIdToNameMap[Image_PanelMenu], - Any(A2S("private:graphicrepository/sfx2/res/symphony/morebutton.png"))); + Any(OUString("private:graphicrepository/sfx2/res/symphony/morebutton.png"))); setPropertyValue( maPropertyIdToNameMap[Image_Closer], - Any(A2S("private:graphicrepository/sfx2/res/closedoc.png"))); + Any(OUString("private:graphicrepository/sfx2/res/closedoc.png"))); setPropertyValue( maPropertyIdToNameMap[Image_CloseIndicator], - Any(A2S("private:graphicrepository/cmd/lc_decrementlevel.png"))); + Any(OUString("private:graphicrepository/cmd/lc_decrementlevel.png"))); setPropertyValue( maPropertyIdToNameMap[Image_ToolBoxItemSeparator], Any( - A2S("private:graphicrepository/sfx2/res/separator.png"))); + OUString("private:graphicrepository/sfx2/res/separator.png"))); // ToolBox @@ -754,7 +754,7 @@ void Theme::SetupPropertyMaps (void) maBooleans.resize(__Bool_Rect - __Int_Bool - 1); maRectangles.resize(__Post_Rect - __Bool_Rect - 1); - #define AddEntry(e) maPropertyNameToIdMap[A2S(#e)]=e; maPropertyIdToNameMap[e]=A2S(#e) + #define AddEntry(e) maPropertyNameToIdMap[OUString(#e)]=e; maPropertyIdToNameMap[e]=OUString(#e) AddEntry(Image_Grip); AddEntry(Image_Expand); diff --git a/svx/source/sidebar/PanelFactory.cxx b/svx/source/sidebar/PanelFactory.cxx index aefe017979f3..693c00f9a02e 100644 --- a/svx/source/sidebar/PanelFactory.cxx +++ b/svx/source/sidebar/PanelFactory.cxx @@ -55,7 +55,7 @@ namespace svx { namespace sidebar { ::rtl::OUString SAL_CALL PanelFactory::getImplementationName (void) { - return A2S(IMPLEMENTATION_NAME); + return OUString(IMPLEMENTATION_NAME); } @@ -77,7 +77,7 @@ cssu::Reference<cssu::XInterface> SAL_CALL PanelFactory::createInstance ( cssu::Sequence<OUString> SAL_CALL PanelFactory::getSupportedServiceNames (void) { cssu::Sequence<OUString> aServiceNames (1); - aServiceNames[0] = A2S(SERVICE_NAME); + aServiceNames[0] = SERVICE_NAME; return aServiceNames; } @@ -121,15 +121,15 @@ Reference<ui::XUIElement> SAL_CALL PanelFactory::createUIElement ( ::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); if ( ! xParentWindow.is() || pParentWindow==NULL) throw RuntimeException( - A2S("PanelFactory::createUIElement called without ParentWindow"), + "PanelFactory::createUIElement called without ParentWindow", NULL); if ( ! xFrame.is()) throw RuntimeException( - A2S("PanelFactory::createUIElement called without Frame"), + "PanelFactory::createUIElement called without Frame", NULL); if (pBindings == NULL) throw RuntimeException( - A2S("PanelFactory::createUIElement called without SfxBindings"), + "PanelFactory::createUIElement called without SfxBindings", NULL); Window* pControl = NULL; diff --git a/svx/source/sidebar/area/AreaPropertyPanel.cxx b/svx/source/sidebar/area/AreaPropertyPanel.cxx index e667840bb52a..75395df17c79 100644 --- a/svx/source/sidebar/area/AreaPropertyPanel.cxx +++ b/svx/source/sidebar/area/AreaPropertyPanel.cxx @@ -48,8 +48,6 @@ using ::sfx2::sidebar::Theme; const char UNO_SIDEBARCOLOR[] = ".uno:sidebarcolor"; const char UNO_SIDEBARGRADIENT[] = ".uno:sidebargradient"; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - namespace svx { namespace sidebar { const sal_Int32 AreaPropertyPanel::DEFAULT_CENTERX = 50; @@ -583,11 +581,11 @@ AreaPropertyPanel* AreaPropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == NULL) - throw lang::IllegalArgumentException(A2S("no parent Window given to AreaPropertyPanel::Create"), NULL, 0); + throw lang::IllegalArgumentException("no parent Window given to AreaPropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException(A2S("no XFrame given to AreaPropertyPanel::Create"), NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to AreaPropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw lang::IllegalArgumentException(A2S("no SfxBindings given to AreaPropertyPanel::Create"), NULL, 2); + throw lang::IllegalArgumentException("no SfxBindings given to AreaPropertyPanel::Create", NULL, 2); return new AreaPropertyPanel( pParent, diff --git a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx index e56ae685ea3a..aa4149416ccb 100644 --- a/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx +++ b/svx/source/sidebar/graphic/GraphicPropertyPanel.cxx @@ -32,8 +32,6 @@ using namespace css; using namespace cssu; using ::sfx2::sidebar::Theme; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - ////////////////////////////////////////////////////////////////////////////// // namespace open @@ -229,11 +227,11 @@ GraphicPropertyPanel* GraphicPropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == NULL) - throw lang::IllegalArgumentException(A2S("no parent Window given to GraphicPropertyPanel::Create"), NULL, 0); + throw lang::IllegalArgumentException("no parent Window given to GraphicPropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException(A2S("no XFrame given to GraphicPropertyPanel::Create"), NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to GraphicPropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw lang::IllegalArgumentException(A2S("no SfxBindings given to GraphicPropertyPanel::Create"), NULL, 2); + throw lang::IllegalArgumentException("no SfxBindings given to GraphicPropertyPanel::Create", NULL, 2); return new GraphicPropertyPanel( pParent, diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 1e54be7617ba..2457bcfc967a 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -96,11 +96,11 @@ ParaPropertyPanel* ParaPropertyPanel::Create ( const cssu::Reference<css::ui::XSidebar>& rxSidebar) { if (pParent == NULL) - throw lang::IllegalArgumentException(A2S("no parent Window given to ParaPropertyPanel::Create"), NULL, 0); + throw lang::IllegalArgumentException("no parent Window given to ParaPropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException(A2S("no XFrame given to ParaPropertyPanel::Create"), NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to ParaPropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw lang::IllegalArgumentException(A2S("no SfxBindings given to ParaPropertyPanel::Create"), NULL, 2); + throw lang::IllegalArgumentException("no SfxBindings given to ParaPropertyPanel::Create", NULL, 2); return new ParaPropertyPanel( pParent, @@ -1457,22 +1457,22 @@ ParaPropertyPanel::ParaPropertyPanel(Window* pParent, m_last_eMetricUnit(FUNIT_NONE), m_eLRSpaceUnit(), m_eULSpaceUnit(), - maLeftAlignControl(SID_ATTR_PARA_ADJUST_LEFT, *pBindings, *this, A2S("LeftPara"), rxFrame), - maCenterAlignControl(SID_ATTR_PARA_ADJUST_CENTER, *pBindings, *this, A2S("CenterPara"), rxFrame), - maRightAlignControl(SID_ATTR_PARA_ADJUST_RIGHT, *pBindings, *this, A2S("RightPara"), rxFrame), - maJustifyAlignControl(SID_ATTR_PARA_ADJUST_BLOCK, *pBindings, *this, A2S("JustifyPara"), rxFrame), + maLeftAlignControl(SID_ATTR_PARA_ADJUST_LEFT, *pBindings, *this, OUString("LeftPara"), rxFrame), + maCenterAlignControl(SID_ATTR_PARA_ADJUST_CENTER, *pBindings, *this, OUString("CenterPara"), rxFrame), + maRightAlignControl(SID_ATTR_PARA_ADJUST_RIGHT, *pBindings, *this, OUString("RightPara"), rxFrame), + maJustifyAlignControl(SID_ATTR_PARA_ADJUST_BLOCK, *pBindings, *this, OUString("JustifyPara"), rxFrame), maLRSpaceControl (SID_ATTR_PARA_LRSPACE,*pBindings,*this), maLNSpaceControl (SID_ATTR_PARA_LINESPACE, *pBindings,*this), maULSpaceControl (SID_ATTR_PARA_ULSPACE, *pBindings,*this), - maOutLineLeftControl(SID_OUTLINE_LEFT, *pBindings, *this, A2S("OutlineRight"), rxFrame), - maOutLineRightControl(SID_OUTLINE_RIGHT, *pBindings, *this, A2S("OutlineLeft"), rxFrame), - maDecIndentControl(SID_DEC_INDENT, *pBindings,*this, A2S("DecrementIndent"), rxFrame), - maIncIndentControl(SID_INC_INDENT, *pBindings,*this, A2S("IncrementIndent"), rxFrame), - maVertTop (SID_TABLE_VERT_NONE, *pBindings, *this, A2S("CellVertTop"), rxFrame), - maVertCenter (SID_TABLE_VERT_CENTER, *pBindings,*this, A2S("CellVertCenter"), rxFrame), - maVertBottom (SID_TABLE_VERT_BOTTOM,*pBindings,*this, A2S("CellVertBottom"), rxFrame), - maBulletOnOff(FN_NUM_BULLET_ON, *pBindings, *this, A2S("DefaultBullet"), rxFrame), - maNumberOnOff(FN_NUM_NUMBERING_ON, *pBindings, *this, A2S("DefaultNumbering"), rxFrame), + maOutLineLeftControl(SID_OUTLINE_LEFT, *pBindings, *this, OUString("OutlineRight"), rxFrame), + maOutLineRightControl(SID_OUTLINE_RIGHT, *pBindings, *this, OUString("OutlineLeft"), rxFrame), + maDecIndentControl(SID_DEC_INDENT, *pBindings,*this, OUString("DecrementIndent"), rxFrame), + maIncIndentControl(SID_INC_INDENT, *pBindings,*this, OUString("IncrementIndent"), rxFrame), + maVertTop (SID_TABLE_VERT_NONE, *pBindings, *this, OUString("CellVertTop"), rxFrame), + maVertCenter (SID_TABLE_VERT_CENTER, *pBindings,*this, OUString("CellVertCenter"), rxFrame), + maVertBottom (SID_TABLE_VERT_BOTTOM,*pBindings,*this, OUString("CellVertBottom"), rxFrame), + maBulletOnOff(FN_NUM_BULLET_ON, *pBindings, *this, OUString("DefaultBullet"), rxFrame), + maNumberOnOff(FN_NUM_NUMBERING_ON, *pBindings, *this, OUString("DefaultNumbering"), rxFrame), maBackColorControl (SID_BACKGROUND_COLOR, *pBindings,*this), m_aMetricCtl (SID_ATTR_METRIC, *pBindings,*this), maBulletNumRuleIndex (FN_BUL_NUM_RULE_INDEX, *pBindings,*this), diff --git a/svx/source/sidebar/text/TextPropertyPanel.cxx b/svx/source/sidebar/text/TextPropertyPanel.cxx index d40d212d4559..0b8283edd7e8 100644 --- a/svx/source/sidebar/text/TextPropertyPanel.cxx +++ b/svx/source/sidebar/text/TextPropertyPanel.cxx @@ -77,8 +77,6 @@ const char UNO_SUBSCRIPT[] = ".uno:SubScript"; const char UNO_SUPERSCRIPT[] = ".uno:SuperScript"; const char UNO_UNDERLINE[] = ".uno:Underline"; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - namespace svx { namespace sidebar { #undef HAS_IA2 @@ -111,11 +109,11 @@ TextPropertyPanel* TextPropertyPanel::Create ( const ::sfx2::sidebar::EnumContext& rContext) { if (pParent == NULL) - throw lang::IllegalArgumentException(A2S("no parent Window given to TextPropertyPanel::Create"), NULL, 0); + throw lang::IllegalArgumentException("no parent Window given to TextPropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw lang::IllegalArgumentException(A2S("no XFrame given to TextPropertyPanel::Create"), NULL, 1); + throw lang::IllegalArgumentException("no XFrame given to TextPropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw lang::IllegalArgumentException(A2S("no SfxBindings given to TextPropertyPanel::Create"), NULL, 2); + throw lang::IllegalArgumentException("no SfxBindings given to TextPropertyPanel::Create", NULL, 2); return new TextPropertyPanel( pParent, @@ -132,19 +130,19 @@ TextPropertyPanel* TextPropertyPanel::Create ( TextPropertyPanel::TextPropertyPanel ( Window* pParent, const cssu::Reference<css::frame::XFrame>& rxFrame, SfxBindings* pBindings, const ::sfx2::sidebar::EnumContext& rContext ) : PanelLayout(pParent, "SidebarTextPanel", "svx/ui/sidebartextpanel.ui", rxFrame), - maFontNameControl (SID_ATTR_CHAR_FONT, *pBindings, *this, A2S("CharFontName"), rxFrame), - maFontSizeControl (SID_ATTR_CHAR_FONTHEIGHT, *pBindings, *this, A2S("FontHeight"), rxFrame), - maWeightControl (SID_ATTR_CHAR_WEIGHT, *pBindings, *this, A2S("Bold"), rxFrame), - maItalicControl (SID_ATTR_CHAR_POSTURE, *pBindings, *this, A2S("Italic"), rxFrame), - maUnderlineControl (SID_ATTR_CHAR_UNDERLINE, *pBindings, *this, A2S("Underline"), rxFrame), - maStrikeControl (SID_ATTR_CHAR_STRIKEOUT, *pBindings, *this, A2S("Strikeout"), rxFrame), - maShadowControl (SID_ATTR_CHAR_SHADOWED, *pBindings, *this, A2S("Shadowed"), rxFrame), - maScriptControlSw (SID_ATTR_CHAR_ESCAPEMENT, *pBindings, *this, A2S("Escapement"), rxFrame), - maSuperScriptControl(SID_SET_SUPER_SCRIPT, *pBindings, *this, A2S("SuperScript"), rxFrame), - maSubScriptControl (SID_SET_SUB_SCRIPT, *pBindings, *this, A2S("SubScript"), rxFrame), - maSpacingControl (SID_ATTR_CHAR_KERNING, *pBindings, *this, A2S("Spacing"), rxFrame), - maSDFontGrow (SID_GROW_FONT_SIZE, *pBindings, *this, A2S("Grow"), rxFrame), - maSDFontShrink (SID_SHRINK_FONT_SIZE, *pBindings, *this, A2S("Shrink"), rxFrame), + maFontNameControl (SID_ATTR_CHAR_FONT, *pBindings, *this, OUString("CharFontName"), rxFrame), + maFontSizeControl (SID_ATTR_CHAR_FONTHEIGHT, *pBindings, *this, OUString("FontHeight"), rxFrame), + maWeightControl (SID_ATTR_CHAR_WEIGHT, *pBindings, *this, OUString("Bold"), rxFrame), + maItalicControl (SID_ATTR_CHAR_POSTURE, *pBindings, *this, OUString("Italic"), rxFrame), + maUnderlineControl (SID_ATTR_CHAR_UNDERLINE, *pBindings, *this, OUString("Underline"), rxFrame), + maStrikeControl (SID_ATTR_CHAR_STRIKEOUT, *pBindings, *this, OUString("Strikeout"), rxFrame), + maShadowControl (SID_ATTR_CHAR_SHADOWED, *pBindings, *this, OUString("Shadowed"), rxFrame), + maScriptControlSw (SID_ATTR_CHAR_ESCAPEMENT, *pBindings, *this, OUString("Escapement"), rxFrame), + maSuperScriptControl(SID_SET_SUPER_SCRIPT, *pBindings, *this, OUString("SuperScript"), rxFrame), + maSubScriptControl (SID_SET_SUB_SCRIPT, *pBindings, *this, OUString("SubScript"), rxFrame), + maSpacingControl (SID_ATTR_CHAR_KERNING, *pBindings, *this, OUString("Spacing"), rxFrame), + maSDFontGrow (SID_GROW_FONT_SIZE, *pBindings, *this, OUString("Grow"), rxFrame), + maSDFontShrink (SID_SHRINK_FONT_SIZE, *pBindings, *this, OUString("Shrink"), rxFrame), mpFontList (NULL), mbMustDelete (false), diff --git a/sw/source/ui/sidebar/PagePropertyPanel.cxx b/sw/source/ui/sidebar/PagePropertyPanel.cxx index 90a9b3a5dab1..684da1a65642 100644 --- a/sw/source/ui/sidebar/PagePropertyPanel.cxx +++ b/sw/source/ui/sidebar/PagePropertyPanel.cxx @@ -55,8 +55,6 @@ const char UNO_MARGIN[] = ".uno:Margin"; const char UNO_SIZE[] = ".uno:Size"; const char UNO_COLUMN[] = ".uno:Column"; -#define A2S(pString) (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(pString))) - namespace { const cssu::Reference< css::document::XUndoManager > getUndoManager( const cssu::Reference< css::frame::XFrame >& rxFrame ) { @@ -88,11 +86,11 @@ PagePropertyPanel* PagePropertyPanel::Create ( SfxBindings* pBindings) { if (pParent == NULL) - throw ::com::sun::star::lang::IllegalArgumentException(A2S("no parent Window given to PagePropertyPanel::Create"), NULL, 0); + throw ::com::sun::star::lang::IllegalArgumentException("no parent Window given to PagePropertyPanel::Create", NULL, 0); if ( ! rxFrame.is()) - throw ::com::sun::star::lang::IllegalArgumentException(A2S("no XFrame given to PagePropertyPanel::Create"), NULL, 1); + throw ::com::sun::star::lang::IllegalArgumentException("no XFrame given to PagePropertyPanel::Create", NULL, 1); if (pBindings == NULL) - throw ::com::sun::star::lang::IllegalArgumentException(A2S("no SfxBindings given to PagePropertyPanel::Create"), NULL, 2); + throw ::com::sun::star::lang::IllegalArgumentException("no SfxBindings given to PagePropertyPanel::Create", NULL, 2); return new PagePropertyPanel( pParent, @@ -172,16 +170,16 @@ PagePropertyPanel::PagePropertyPanel( , maOrientationPopup( this, ::boost::bind( &PagePropertyPanel::CreatePageOrientationControl, this, _1 ), - A2S("Page orientation") ) + OUString("Page orientation") ) , maMarginPopup( this, ::boost::bind( &PagePropertyPanel::CreatePageMarginControl, this, _1 ), - A2S("Page margins") ) + OUString("Page margins") ) , maSizePopup( this, ::boost::bind( &PagePropertyPanel::CreatePageSizeControl, this, _1 ), - A2S("Page size") ) + OUString("Page size") ) , maColumnPopup( this, ::boost::bind( &PagePropertyPanel::CreatePageColumnControl, this, _1 ), - A2S("Page columns") ) + OUString("Page columns") ) , mxUndoManager( getUndoManager( rxFrame ) ) @@ -757,7 +755,7 @@ void PagePropertyPanel::StartUndo() { if ( mxUndoManager.is() ) { - mxUndoManager->enterUndoContext( A2S("") ); + mxUndoManager->enterUndoContext( OUString("") ); } } diff --git a/sw/source/ui/sidebar/SwPanelFactory.cxx b/sw/source/ui/sidebar/SwPanelFactory.cxx index c82f11ee8765..46edc90b1cb5 100644 --- a/sw/source/ui/sidebar/SwPanelFactory.cxx +++ b/sw/source/ui/sidebar/SwPanelFactory.cxx @@ -40,14 +40,13 @@ using ::rtl::OUString; namespace sw { namespace sidebar { -#define A2S(s) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s)) #define IMPLEMENTATION_NAME "org.apache.openoffice.comp.sw.sidebar.SwPanelFactory" #define SERVICE_NAME "com.sun.star.ui.UIElementFactory" ::rtl::OUString SAL_CALL SwPanelFactory::getImplementationName (void) { - return A2S(IMPLEMENTATION_NAME); + return OUString(IMPLEMENTATION_NAME); } @@ -63,7 +62,7 @@ cssu::Reference<cssu::XInterface> SAL_CALL SwPanelFactory::createInstance( cssu::Sequence<OUString> SAL_CALL SwPanelFactory::getSupportedServiceNames (void) { cssu::Sequence<OUString> aServiceNames (1); - aServiceNames[0] = A2S(SERVICE_NAME); + aServiceNames[0] = SERVICE_NAME; return aServiceNames; } @@ -99,15 +98,15 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement ( ::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); if ( ! xParentWindow.is() || pParentWindow==NULL) throw RuntimeException( - A2S("PanelFactory::createUIElement called without ParentWindow"), + "PanelFactory::createUIElement called without ParentWindow", NULL); if ( ! xFrame.is()) throw RuntimeException( - A2S("PanelFactory::createUIElement called without Frame"), + "PanelFactory::createUIElement called without Frame", NULL); if (pBindings == NULL) throw RuntimeException( - A2S("PanelFactory::createUIElement called without SfxBindings"), + "PanelFactory::createUIElement called without SfxBindings", NULL); #define DoesResourceEndWith(s) rsResourceURL.endsWithAsciiL(s,strlen(s)) |