summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2016-11-10 02:35:06 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2016-11-11 11:14:25 +0200
commit01be56c648ba615fed45ca6b8492714cbff65863 (patch)
tree8745f6603be08cadccc13a944b7f5a051d22f7e3 /framework
parent2a778b4a4db25cc383e765be4c12b9e47b925d5b (diff)
Type detection can handle empty doc service just fine
But actually I can't imagine why the doc service could be empty here, esp. since 8655fa318c1924994eb659b4bb60074c86ad70c1 ("Fix property name: ModuleName -> ModuleIdentifier"). Change-Id: I9a39cf0840910069769b4bedd61930aab2155e1b
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/recentfilesmenucontroller.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index da721d2bc618..0c7425bae05d 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -250,8 +250,7 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex )
if (( nIndex >= 0 ) &&
( nIndex < sal::static_int_cast<sal_Int32>( m_aRecentFilesItems.size() )))
{
- sal_Int32 nSize = 2;
- Sequence< PropertyValue > aArgsList(nSize);
+ Sequence< PropertyValue > aArgsList(3);
aArgsList[0].Name = "Referer";
aArgsList[0].Value = makeAny( OUString( "private:user" ) );
@@ -259,13 +258,9 @@ void RecentFilesMenuController::executeEntry( sal_Int32 nIndex )
aArgsList[1].Name = "AsTemplate";
aArgsList[1].Value = makeAny( false );
- if (!m_aModuleName.isEmpty())
- {
- // Type detection needs to know which app we are opening it from.
- aArgsList.realloc(++nSize);
- aArgsList[nSize-1].Name = "DocumentService";
- aArgsList[nSize-1].Value <<= m_aModuleName;
- }
+ // Type detection needs to know which app we are opening it from.
+ aArgsList[2].Name = "DocumentService";
+ aArgsList[2].Value <<= m_aModuleName;
dispatchCommand( m_aRecentFilesItems[ nIndex ], aArgsList, "_default" );
}