summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-12 09:33:27 +0200
committerNoel Grandin <noel@peralex.com>2013-11-13 09:08:08 +0200
commit9c5a91efdb41cd340936846169da130d855a335a (patch)
treeb7a10f7682a9e85c3ff8bdf56549166439b3a429 /sfx2
parent74816814a2c03ab5305e47c6d1f6e04f6918d946 (diff)
expand out the A2S macro
Which is not doing anything useful anymore. Change-Id: I83422e811d52a77b65655924c07b55dd7229449c
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/CommandInfoProvider.cxx4
-rw-r--r--sfx2/source/sidebar/Context.cxx6
-rw-r--r--sfx2/source/sidebar/ControllerFactory.cxx16
-rw-r--r--sfx2/source/sidebar/ControllerItem.cxx8
-rw-r--r--sfx2/source/sidebar/Deck.cxx10
-rw-r--r--sfx2/source/sidebar/DeckTitleBar.cxx2
-rw-r--r--sfx2/source/sidebar/EnumContext.cxx34
-rw-r--r--sfx2/source/sidebar/MenuButton.cxx2
-rw-r--r--sfx2/source/sidebar/Panel.cxx2
-rw-r--r--sfx2/source/sidebar/PanelTitleBar.cxx2
-rw-r--r--sfx2/source/sidebar/ResourceManager.cxx8
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx6
-rw-r--r--sfx2/source/sidebar/SidebarToolBox.cxx2
-rw-r--r--sfx2/source/sidebar/TabBar.cxx2
-rw-r--r--sfx2/source/sidebar/TabItem.cxx2
-rw-r--r--sfx2/source/sidebar/Theme.cxx18
16 files changed, 58 insertions, 66 deletions
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);