summaryrefslogtreecommitdiff
path: root/odk
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-04-27 15:39:47 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-04-27 15:39:47 +0200
commit3caf268f9a73c5d398a0d49e0e91eb18525465cf (patch)
tree5e0c86da5dd79dd3cff22d77bd37da4bcf0d532d /odk
parent5e4fc9540993ee5e10f1986918acdd868a1fcf1b (diff)
Make SDK examples compile again
Revert (parts of) various commits that tried to use LIBO_INTERNAL_ONLY features in external odk/examples/ code. Change-Id: I275c3e8979c995430329bca61e51b2841503234f
Diffstat (limited to 'odk')
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx3
-rw-r--r--odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx3
-rw-r--r--odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx3
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx50
-rw-r--r--odk/examples/cpp/complextoolbarcontrols/exports.cxx6
-rw-r--r--odk/examples/cpp/custompanel/ctp_factory.cxx3
-rw-r--r--odk/examples/cpp/remoteclient/remoteclient.cxx3
7 files changed, 46 insertions, 25 deletions
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
index 5278d586bff1..b9cf6f17b49b 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx
@@ -52,7 +52,8 @@ namespace my_sc_impl
Sequence< OUString > SAL_CALL getSupportedServiceNames_MyService1Impl()
{
- Sequence< OUString > names { "my_module.MyService1" };
+ Sequence< OUString > names(1);
+ names[0] = "my_module.MyService1";
return names;
}
diff --git a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
index fd36a4582cfa..def49109571e 100644
--- a/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
+++ b/odk/examples/DevelopersGuide/Components/CppComponent/service2_impl.cxx
@@ -60,7 +60,8 @@ extern Reference< XInterface > SAL_CALL create_MyService1Impl(
static Sequence< OUString > getSupportedServiceNames_MyService2Impl()
{
- Sequence<OUString> names { "my_module.MyService2" };
+ Sequence<OUString> names(1);
+ names[0] = "my_module.MyService2";
return names;
}
diff --git a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
index 87dfee75c312..1c259404425a 100644
--- a/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
+++ b/odk/examples/DevelopersGuide/Database/DriverSkeleton/SDriver.cxx
@@ -88,7 +88,8 @@ Sequence< ::rtl::OUString > SkeletonDriver::getSupportedServiceNames_Static( )
{
/// which service is supported
/// for more information @see com.sun.star.sdbc.Driver
- Sequence<OUString> aSNS { ::rtl::OUString("com.sun.star.sdbc.Driver") };
+ Sequence< ::rtl::OUString > aSNS( 1 );
+ aSNS[0] = ::rtl::OUString("com.sun.star.sdbc.Driver");
return aSNS;
}
diff --git a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
index 924e7695a62e..721329d4c9e0 100644
--- a/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/MyProtocolHandler.cxx
@@ -235,15 +235,17 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
else if ( aURL.Path == "ComboboxCmd" )
{
// remove the text if it's in our list
- Sequence< NamedValue > aRemoveArgs { { "Text", css:uno::makeAny(maComboBoxText) } };
+ Sequence< NamedValue > aRemoveArgs( 1 );
+ aRemoveArgs[0].Name = rtl::OUString( "Text" );
+ aRemoveArgs[0].Value <<= maComboBoxText;
SendCommand( aURL, ::rtl::OUString( "RemoveEntryText" ), aRemoveArgs, sal_True );
// add the new text to the start of the list
- Sequence< NamedValue > aInsertArgs
- {
- { "Pos", css::uno::makeAny(sal_Int32( 0 )) },
- { "Text", css::uno::makeAny(maComboBoxText)) },
- };
+ Sequence< NamedValue > aInsertArgs( 2 );
+ aInsertArgs[0].Name = rtl::OUString( "Pos" );
+ aInsertArgs[0].Value <<= sal_Int32( 0 );
+ aInsertArgs[1].Name = rtl::OUString( "Text" );
+ aInsertArgs[1].Value <<= maComboBoxText;
SendCommand( aURL, ::rtl::OUString("InsertEntry"), aInsertArgs, sal_True );
}
else if ( aURL.Path == "InsertEntry" )
@@ -266,7 +268,9 @@ void SAL_CALL BaseDispatch::dispatch( const URL& aURL, const Sequence < Property
aCmdURL.Complete = aCmdURL.Path + aCmdURL.Protocol;
// set the selected item as text into the combobox
- Sequence< NamedValue > aArgs { { "Text", css::uno::makeAny(aText) } };
+ Sequence< NamedValue > aArgs( 1 );
+ aArgs[0].Name = "Text";
+ aArgs[0].Value <<= aText;
SendCommand( aCmdURL, ::rtl::OUString( "SetText" ), aArgs, sal_True );
}
else if ( aURL.Path == "DropdownButtonCmd" )
@@ -360,6 +364,7 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
// A toggle dropdown box is normally used for a group of commands
// where the user can select the last issued command easily.
// E.g. a typical command group would be "Insert shape"
+ Sequence< NamedValue > aArgs( 1 );
// send command to set context menu content
Sequence< rtl::OUString > aContextMenu( 3 );
@@ -367,7 +372,8 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aContextMenu[1] = "Command 2";
aContextMenu[2] = "Command 3";
- Sequence< NamedValue > aArgs { { "List", css::uno::makeAny(aContextMenu) } };
+ aArgs[0].Name = "List";
+ aArgs[0].Value <<= aContextMenu;
SendCommandTo( xControl, aURL, rtl::OUString( "SetList" ), aArgs, sal_True );
// send command to check item on pos=0
@@ -380,13 +386,15 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
// A dropdown box is normally used for a group of dependent modes, where
// the user can only select one. The modes cannot be combined.
// E.g. a typical group would be left,right,center,block.
+ Sequence< NamedValue > aArgs( 1 );
// send command to set context menu content
Sequence< rtl::OUString > aContextMenu( 2 );
aContextMenu[0] = "Button Enabled";
aContextMenu[1] = "Button Disabled";
- Sequence< NamedValue > aArgs { { "List", css::uno::makeAny(aContextMenu) } };
+ aArgs[0].Name = "List";
+ aArgs[0].Value <<= aContextMenu;
SendCommandTo( xControl, aURL, rtl::OUString( "SetList" ), aArgs, sal_True );
// set position according to enable/disable state of button
@@ -400,22 +408,27 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
else if ( aURL.Path == "SpinfieldCmd" )
{
// A spin button
- Sequence< NamedValue > aArgs
- {
- { "Value", css::uno::makeAny(double( 0.0 )) },
- { "UpperLimit", css::uno::makeAny(double( 10.0 )) },
- { "LowerLimit", css::uno::makeAny(double( 0.0 )) },
- { "Step", css::uno::makeAny(double( 0.1 )) },
- { "OutputFormat", css::uno::makeAny(OUString("%.2f cm")) }
- };
+ Sequence< NamedValue > aArgs( 5 );
// send command to initialize spin button
+ aArgs[0].Name = "Value";
+ aArgs[0].Value <<= double( 0.0 );
+ aArgs[1].Name = "UpperLimit";
+ aArgs[1].Value <<= double( 10.0 );
+ aArgs[2].Name = "LowerLimit";
+ aArgs[2].Value <<= double( 0.0 );
+ aArgs[3].Name = "Step";
+ aArgs[3].Value <<= double( 0.1 );
+ aArgs[4].Name = "OutputFormat";
+ aArgs[4].Value <<= rtl::OUString("%.2f cm");
+
SendCommandTo( xControl, aURL, rtl::OUString( "SetValues" ), aArgs, sal_True );
}
else if ( aURL.Path == "DropdownboxCmd" )
{
// A dropdown box is normally used for a group of commands
// where the user can select one of a defined set.
+ Sequence< NamedValue > aArgs( 1 );
// send command to set context menu content
Sequence< rtl::OUString > aList( 10 );
@@ -430,7 +443,8 @@ void SAL_CALL BaseDispatch::addStatusListener( const Reference< XStatusListener
aList[8] = "Brown";
aList[9] = "Pink";
- Sequence< NamedValue > aArgs { { "List", css::uno::makeAny(aList) } };
+ aArgs[0].Name = "List";
+ aArgs[0].Value <<= aList;
SendCommandTo( xControl, aURL, rtl::OUString( "SetList" ), aArgs, sal_True );
}
diff --git a/odk/examples/cpp/complextoolbarcontrols/exports.cxx b/odk/examples/cpp/complextoolbarcontrols/exports.cxx
index f66191eca316..35a4f3910128 100644
--- a/odk/examples/cpp/complextoolbarcontrols/exports.cxx
+++ b/odk/examples/cpp/complextoolbarcontrols/exports.cxx
@@ -39,12 +39,14 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* pImplNa
if (sImplName == MYLISTENER_IMPLEMENTATIONNAME)
{
- css::uno::Sequence<OUString> lNames { MYLISTENER_IMPLEMENTATIONNAME };
+ css::uno::Sequence< ::rtl::OUString > lNames(1);
+ lNames[0] = MYLISTENER_IMPLEMENTATIONNAME;
xFactory = ::cppu::createSingleFactory(xSMGR, sImplName, MyListener::st_createInstance, lNames);
}
else if (sImplName == MYPROTOCOLHANDLER_IMPLEMENTATIONNAME)
{
- css::uno::Sequence<OUString> lNames { MYPROTOCOLHANDLER_SERVICENAME };
+ css::uno::Sequence< ::rtl::OUString > lNames(1);
+ lNames[0] = MYPROTOCOLHANDLER_SERVICENAME;
xFactory = ::cppu::createSingleComponentFactory(MyProtocolHandler_createInstance, sImplName, lNames);
}
diff --git a/odk/examples/cpp/custompanel/ctp_factory.cxx b/odk/examples/cpp/custompanel/ctp_factory.cxx
index 2b2387d53106..e2e29ee0d53b 100644
--- a/odk/examples/cpp/custompanel/ctp_factory.cxx
+++ b/odk/examples/cpp/custompanel/ctp_factory.cxx
@@ -108,7 +108,8 @@ namespace sd { namespace colortoolpanel
Sequence< OUString > SAL_CALL ToolPanelFactory::getSupportedServiceNames_static() throw (RuntimeException)
{
- Sequence< OUString > aServiceNames { "org.openoffice.example.colorpanel.ToolPanelFactory" };
+ Sequence< OUString > aServiceNames(1);
+ aServiceNames[0] = "org.openoffice.example.colorpanel.ToolPanelFactory";
return aServiceNames;
}
diff --git a/odk/examples/cpp/remoteclient/remoteclient.cxx b/odk/examples/cpp/remoteclient/remoteclient.cxx
index 1c9d043e4a7f..373efaee8a24 100644
--- a/odk/examples/cpp/remoteclient/remoteclient.cxx
+++ b/odk/examples/cpp/remoteclient/remoteclient.cxx
@@ -209,7 +209,8 @@ Sequence< OUString > getSupportedServiceNames()
MutexGuard guard( Mutex::getGlobalMutex() );
if( !pNames )
{
- static Sequence< OUString > seqNames { "com.sun.star.bridge.example.RemoteClientSample" };
+ static Sequence< OUString > seqNames(1);
+ seqNames[0] = "com.sun.star.bridge.example.RemoteClientSample";
pNames = &seqNames;
}
}