summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-02-06 16:06:48 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-08 12:31:10 +0000
commit4c411636d9f3e8be085ca02af6fad448838834b1 (patch)
tree155932e717fe95d2237c37d18f164fd93c5a50c9
parent310b65e5e93c500ac5ae3981120809df09230e56 (diff)
sequence->vector in basic
Change-Id: Ic42f7218bda81effe870d950f666ba7653d60c66 Reviewed-on: https://gerrit.libreoffice.org/22177 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r--basic/source/basmgr/basmgr.cxx7
-rw-r--r--basic/source/uno/modsizeexceeded.cxx4
-rw-r--r--basic/source/uno/scriptcont.cxx2
-rw-r--r--include/basic/basmgr.hxx2
-rw-r--r--include/basic/modsizeexceeded.hxx3
-rw-r--r--sfx2/source/appl/appbaslib.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx2
-rw-r--r--sfx2/source/inc/appbaslib.hxx3
8 files changed, 13 insertions, 12 deletions
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index fce79cabb7f0..c558e8b09e37 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -1508,7 +1508,7 @@ uno::Any BasicManager::SetGlobalUNOConstant( const sal_Char* _pAsciiName, const
return aOldValue;
}
-bool BasicManager::LegacyPsswdBinaryLimitExceeded( uno::Sequence< OUString >& _out_rModuleNames )
+bool BasicManager::LegacyPsswdBinaryLimitExceeded( std::vector< OUString >& _out_rModuleNames )
{
try
{
@@ -1531,7 +1531,7 @@ bool BasicManager::LegacyPsswdBinaryLimitExceeded( uno::Sequence< OUString >& _o
uno::Sequence< OUString > aElementNames( xScriptLibrary->getElementNames() );
sal_Int32 nLen = aElementNames.getLength();
- uno::Sequence< OUString > aBigModules( nLen );
+ std::vector< OUString > aBigModules( nLen );
sal_Int32 nBigModules = 0;
const OUString* pElementNames = aElementNames.getConstArray();
@@ -1545,8 +1545,7 @@ bool BasicManager::LegacyPsswdBinaryLimitExceeded( uno::Sequence< OUString >& _o
if ( nBigModules )
{
- aBigModules.realloc( nBigModules );
- _out_rModuleNames = aBigModules;
+ _out_rModuleNames.swap(aBigModules);
return true;
}
}
diff --git a/basic/source/uno/modsizeexceeded.cxx b/basic/source/uno/modsizeexceeded.cxx
index 37235112ba55..a0cf139b8ee2 100644
--- a/basic/source/uno/modsizeexceeded.cxx
+++ b/basic/source/uno/modsizeexceeded.cxx
@@ -26,10 +26,10 @@ using namespace com::sun::star;
using namespace cppu;
using namespace osl;
-ModuleSizeExceeded::ModuleSizeExceeded( const uno::Sequence< OUString >& sModules )
+ModuleSizeExceeded::ModuleSizeExceeded( const std::vector< OUString >& sModules )
{
script::ModuleSizeExceededRequest aReq;
- aReq.Names = sModules;
+ aReq.Names = comphelper::containerToSequence(sModules);
m_aRequest <<= aReq;
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index f548c0ad0c79..ab49180eeafd 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -574,7 +574,7 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, cons
// Only need to handle the export case here,
// save/saveas etc are handled in sfxbasemodel::storeSelf &
// sfxbasemodel::impl_store
- uno::Sequence<OUString> aNames;
+ std::vector<OUString> aNames;
if ( bExport && pBasicMgr->LegacyPsswdBinaryLimitExceeded(aNames) )
{
if ( xHandler.is() )
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index d64259a0c598..c9227ee55010 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -194,7 +194,7 @@ public:
@param _out_rModuleNames
takes the names of modules whose size exceeds the legacy limit
*/
- bool LegacyPsswdBinaryLimitExceeded( css::uno::Sequence< OUString >& _out_rModuleNames );
+ bool LegacyPsswdBinaryLimitExceeded( std::vector< OUString >& _out_rModuleNames );
bool HasExeCode( const OUString& );
/// determines whether the Basic Manager has a given macro, given by fully qualified name
bool HasMacro( OUString const& i_fullyQualifiedName ) const;
diff --git a/include/basic/modsizeexceeded.hxx b/include/basic/modsizeexceeded.hxx
index 1ddec377af8d..5f9cc18cda49 100644
--- a/include/basic/modsizeexceeded.hxx
+++ b/include/basic/modsizeexceeded.hxx
@@ -23,12 +23,13 @@
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <cppuhelper/implbase1.hxx>
#include <basic/basicdllapi.h>
+#include <vector>
class BASIC_DLLPUBLIC ModuleSizeExceeded : public ::cppu::WeakImplHelper1< css::task::XInteractionRequest >
{
// C++ interface
public:
- ModuleSizeExceeded( const css::uno::Sequence<OUString>& sModules );
+ ModuleSizeExceeded( const std::vector<OUString>& sModules );
bool isAbort() const;
bool isApprove() const;
diff --git a/sfx2/source/appl/appbaslib.cxx b/sfx2/source/appl/appbaslib.cxx
index 78e0def08b49..a49aa7d46c70 100644
--- a/sfx2/source/appl/appbaslib.cxx
+++ b/sfx2/source/appl/appbaslib.cxx
@@ -156,7 +156,7 @@ void SfxBasicManagerHolder::impl_releaseContainers()
mxDialogContainer.clear();
}
-bool SfxBasicManagerHolder::LegacyPsswdBinaryLimitExceeded( Sequence< OUString >& sModules )
+bool SfxBasicManagerHolder::LegacyPsswdBinaryLimitExceeded( std::vector< OUString >& sModules )
{
#if !HAVE_FEATURE_SCRIPTING
(void) sModules;
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 87518733a044..fe4b46193540 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -3610,7 +3610,7 @@ bool SfxObjectShell::QuerySaveSizeExceededModules_Impl( const uno::Reference< ta
if ( !pImp->aBasicManager.isValid() )
GetBasicManager();
- uno::Sequence< OUString > sModules;
+ std::vector< OUString > sModules;
if ( xHandler.is() )
{
if( pImp->aBasicManager.LegacyPsswdBinaryLimitExceeded( sModules ) )
diff --git a/sfx2/source/inc/appbaslib.hxx b/sfx2/source/inc/appbaslib.hxx
index f90590426ecc..9c07c6638a07 100644
--- a/sfx2/source/inc/appbaslib.hxx
+++ b/sfx2/source/inc/appbaslib.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/script/XStorageBasedLibraryContainer.hpp>
#include <com/sun/star/embed/XStorage.hpp>
+#include <vector>
class BasicManager;
@@ -85,7 +86,7 @@ public:
/** checks if any modules in the SfxLibraryContainer exceed the binary
limits.
*/
- bool LegacyPsswdBinaryLimitExceeded( css::uno::Sequence< OUString >& sModules );
+ bool LegacyPsswdBinaryLimitExceeded( std::vector< OUString >& sModules );
virtual void Notify(SfxBroadcaster& rBC, SfxHint const& rHint) override;