[Libreoffice-commits] .: sd/source
Olivier Hallot
ohallot at kemper.freedesktop.org
Sun Apr 8 16:12:31 PDT 2012
sd/source/ui/toolpanel/LayoutMenu.cxx | 2 -
sd/source/ui/toolpanel/ScrollPanel.cxx | 7 +---
sd/source/ui/toolpanel/SubToolPanel.cxx | 7 +---
sd/source/ui/toolpanel/ToolPanelFactory.cxx | 14 ++++----
sd/source/ui/toolpanel/ToolPanelViewShell.cxx | 2 -
sd/source/ui/toolpanel/controls/MasterPageContainer.cxx | 9 +----
sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx | 17 ++--------
sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx | 6 +--
sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx | 9 +----
9 files changed, 29 insertions(+), 44 deletions(-)
New commits:
commit a2a982508f3424c552fe63433bc39ffda0d63604
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date: Sun Apr 8 20:11:18 2012 -0300
More RTL_CONSTASCII_USTRINGPARAM removals
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx
index ae37191..70af4cd 100644
--- a/sd/source/ui/toolpanel/LayoutMenu.cxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.cxx
@@ -226,7 +226,7 @@ void LayoutMenu::implConstruct( DrawDocShell& rDocumentShell )
mxListener = new ::sd::tools::SlotStateListener(
aStateChangeLink,
Reference<frame::XDispatchProvider>(mrBase.GetController()->getFrame(), UNO_QUERY),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:VerticalTextState")));
+ ".uno:VerticalTextState");
// Add this new object as shell to the shell factory.
GetShellManager()->AddSubShell(SHELLID_SD_TASK_PANE_PREVIEW_LAYOUTS,this,this);
diff --git a/sd/source/ui/toolpanel/ScrollPanel.cxx b/sd/source/ui/toolpanel/ScrollPanel.cxx
index 1793ff4..ee575ce 100644
--- a/sd/source/ui/toolpanel/ScrollPanel.cxx
+++ b/sd/source/ui/toolpanel/ScrollPanel.cxx
@@ -60,8 +60,7 @@ ScrollPanel::ScrollPanel (
void ScrollPanel::Construct()
{
- SetAccessibleName (
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sub Task Panel")));
+ SetAccessibleName (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sub Task Panel")));
mpControlContainer->SetMultiSelection (true);
SetBorderStyle (WINDOW_BORDER_NORMAL);
@@ -693,8 +692,8 @@ long ScrollPanel::Notify( NotifyEvent& rNEvt )
{
return new ::accessibility::AccessibleScrollPanel (
*this,
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Scroll Panel")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Scroll Panel")));
+ "Scroll Panel",
+ "Scroll Panel");
}
diff --git a/sd/source/ui/toolpanel/SubToolPanel.cxx b/sd/source/ui/toolpanel/SubToolPanel.cxx
index ba0a33f..e753918 100644
--- a/sd/source/ui/toolpanel/SubToolPanel.cxx
+++ b/sd/source/ui/toolpanel/SubToolPanel.cxx
@@ -52,8 +52,7 @@ SubToolPanel::SubToolPanel (
mnVerticalGap(3),
mnHorizontalBorder(2)
{
- SetAccessibleName (
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sub Task Panel")));
+ SetAccessibleName (::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sub Task Panel")));
mpControlContainer->SetMultiSelection (true);
SetBorderStyle (WINDOW_BORDER_NORMAL);
@@ -381,8 +380,8 @@ IMPL_LINK(SubToolPanel, WindowEventListener, VclSimpleEvent*, pEvent)
{
return new ::accessibility::AccessibleTreeNode (
*this,
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sub Task Panel")),
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Sub Task Panel")),
+ "Sub Task Panel",
+ "Sub Task Panel",
::com::sun::star::accessibility::AccessibleRole::PANEL);
}
diff --git a/sd/source/ui/toolpanel/ToolPanelFactory.cxx b/sd/source/ui/toolpanel/ToolPanelFactory.cxx
index 94ef6c4..4b5bb57 100644
--- a/sd/source/ui/toolpanel/ToolPanelFactory.cxx
+++ b/sd/source/ui/toolpanel/ToolPanelFactory.cxx
@@ -117,14 +117,14 @@ namespace sd { namespace toolpanel
//------------------------------------------------------------------------------------------------------------------
::rtl::OUString ToolPanelFactory_getImplementationName() throw(RuntimeException)
{
- return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.drawing.ToolPanelFactory" ) );
+ return ::rtl::OUString( "com.sun.star.comp.drawing.ToolPanelFactory" ) ;
}
//------------------------------------------------------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL ToolPanelFactory_getSupportedServiceNames (void)
throw (RuntimeException)
{
- const ::rtl::OUString sServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.drawing.DefaultToolPanelFactory" ) );
+ const ::rtl::OUString sServiceName( "com.sun.star.drawing.DefaultToolPanelFactory" );
return Sequence< ::rtl::OUString >( &sServiceName, 1 );
}
@@ -153,7 +153,7 @@ namespace sd { namespace toolpanel
const Reference< XWindow > xParentWindow( aArgs.getOrDefault( "ParentWindow", Reference< XWindow >() ) );
if ( !xDocFrame.is() || !xParentWindow.is() )
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "For creating a standard tool panel, a Frame and a Parent window are needed." ) ),
+ "For creating a standard tool panel, a Frame and a Parent window are needed." ,
*this,
2
);
@@ -174,7 +174,7 @@ namespace sd { namespace toolpanel
if ( !pViewFrame || !pViewFrame->HasChildWindow( SID_TASKPANE ) )
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Illegal frame." ) ),
+ "Illegal frame." ,
*this,
2
);
@@ -183,7 +183,7 @@ namespace sd { namespace toolpanel
ToolPanelChildWindow* pToolPanelWindow( dynamic_cast< ToolPanelChildWindow* >( pViewFrame->GetChildWindow( SID_TASKPANE ) ) );
if ( !pToolPanelWindow )
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "No Impress document, or no Impress Task Pane." ) ),
+ "No Impress document, or no Impress Task Pane." ,
*this,
2
);
@@ -200,7 +200,7 @@ namespace sd { namespace toolpanel
if ( !pToolPanelShell )
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Wrong document type." ) ),
+ "Wrong document type." ,
*this,
2
);
@@ -208,7 +208,7 @@ namespace sd { namespace toolpanel
::Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow );
if ( !pParentWindow || !pToolPanelShell->IsPanelAnchorWindow( *pParentWindow ) )
throw IllegalArgumentException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unsupported parent window." ) ),
+ "Unsupported parent window." ,
*this,
2
);
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
index 4891dfc..66fe8f6 100644
--- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
+++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
@@ -709,7 +709,7 @@ namespace
default:
break;
}
- throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "illegal panel ID" ) ), NULL );
+ throw RuntimeException( "illegal panel ID" , NULL );
}
}
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
index 1533b2e..84d0a38 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainer.cxx
@@ -999,17 +999,14 @@ Reference<frame::XModel> MasterPageContainer::Implementation::GetModel (void)
if ( ! mxModel.is())
{
// Get the desktop a s service factory.
- ::rtl::OUString sDesktopServiceName (
- RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"));
+ ::rtl::OUString sDesktopServiceName ( "com.sun.star.frame.Desktop");
uno::Reference<frame::XComponentLoader> xDesktop (
::comphelper::getProcessServiceFactory()->createInstance(
sDesktopServiceName),
uno::UNO_QUERY);
// Create a new model.
- ::rtl::OUString sModelServiceName (
- RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.presentation.PresentationDocument"));
+ ::rtl::OUString sModelServiceName ( "com.sun.star.presentation.PresentationDocument");
mxModel = uno::Reference<frame::XModel>(
::comphelper::getProcessServiceFactory()->createInstance(
sModelServiceName),
@@ -1042,7 +1039,7 @@ Reference<frame::XModel> MasterPageContainer::Implementation::GetModel (void)
uno::Reference<beans::XPropertySet> xProperties(xNewPage, uno::UNO_QUERY);
if (xProperties.is())
xProperties->setPropertyValue(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Layout")),
+ "Layout",
makeAny((sal_Int16)AUTOLAYOUT_TITLE));
}
}
diff --git a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
index 42f2869..34eccd6 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageContainerProviders.cxx
@@ -128,9 +128,7 @@ Image TemplatePreviewProvider::operator() (
try
{
uno::Reference<lang::XSingleServiceFactory> xStorageFactory(
- xServiceManager->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.embed.StorageFactory"))),
+ xServiceManager->createInstance( "com.sun.star.embed.StorageFactory"),
uno::UNO_QUERY);
if (xStorageFactory.is())
@@ -148,14 +146,12 @@ Image TemplatePreviewProvider::operator() (
{
uno::Reference<embed::XStorage> xStorage (
xDocStorage->openStorageElement(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Thumbnails")),
+ "Thumbnails",
embed::ElementModes::READ));
if (xStorage.is())
{
uno::Reference<io::XStream> xThumbnailCopy (
- xStorage->cloneStreamElement(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "thumbnail.png"))));
+ xStorage->cloneStreamElement("thumbnail.png"));
if (xThumbnailCopy.is())
xIStream = xThumbnailCopy->getInputStream();
}
@@ -180,15 +176,12 @@ Image TemplatePreviewProvider::operator() (
if ( ! xIStream.is())
{
uno::Reference<embed::XStorage> xStorage (
- xDocStorage->openStorageElement(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Thumbnail")),
+ xDocStorage->openStorageElement( "Thumbnail",
embed::ElementModes::READ));
if (xStorage.is())
{
uno::Reference<io::XStream> xThumbnailCopy (
- xStorage->cloneStreamElement(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
- "thumbnail.png"))));
+ xStorage->cloneStreamElement("thumbnail.png"));
if (xThumbnailCopy.is())
xIStream = xThumbnailCopy->getInputStream();
}
diff --git a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
index 897c075..caa68ac 100644
--- a/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPageDescriptor.cxx
@@ -291,15 +291,15 @@ MasterPageDescriptor::URLClassification MasterPageDescriptor::GetURLClassificati
{
if (msURL.isEmpty())
meURLClassification = URLCLASS_UNKNOWN;
- else if (msURL.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("presnt")))>=0)
+ else if (msURL.indexOf("presnt")>=0)
{
meURLClassification = URLCLASS_PRESENTATION;
}
- else if (msURL.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("layout")))>=0)
+ else if (msURL.indexOf("layout")>=0)
{
meURLClassification = URLCLASS_LAYOUT;
}
- else if (msURL.indexOf(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("educate")))>=0)
+ else if (msURL.indexOf("educate")>=0)
{
meURLClassification = URLCLASS_OTHER;
}
diff --git a/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx b/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx
index 5722edd..6b3d690 100644
--- a/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/toolpanel/controls/RecentlyUsedMasterPages.cxx
@@ -62,15 +62,12 @@ namespace {
static const OUString& GetPathToImpressConfigurationRoot (void)
{
- static const OUString sPathToImpressConfigurationRoot (
- RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Impress/"));
+ static const OUString sPathToImpressConfigurationRoot ("/org.openoffice.Office.Impress/");
return sPathToImpressConfigurationRoot;
}
static const OUString& GetPathToSetNode (void)
{
- static const OUString sPathToSetNode(
- RTL_CONSTASCII_USTRINGPARAM(
- "MultiPaneGUI/ToolPanel/RecentlyUsedMasterPages"));
+ static const OUString sPathToSetNode("MultiPaneGUI/ToolPanel/RecentlyUsedMasterPages");
return sPathToSetNode;
}
@@ -285,7 +282,7 @@ void RecentlyUsedMasterPages::SavePersistentValues (void)
++iDescriptor,++nIndex)
{
// Create new child.
- OUString sKey (RTL_CONSTASCII_USTRINGPARAM("index_"));
+ OUString sKey ("index_");
sKey += OUString::valueOf(nIndex);
Reference<container::XNameReplace> xChild(
xChildFactory->createInstance(), UNO_QUERY);
More information about the Libreoffice-commits
mailing list