Kaydet (Commit) 1848581f authored tarafından Douglas Mencken's avatar Douglas Mencken Kaydeden (comit) Noel Grandin

clean-up for sfx2/source/appl/shutdowniconaqua.mm

Change-Id: I459e00ca0b6578be6f7543eb220720b1a48c1ac7
Reviewed-on: https://gerrit.libreoffice.org/19584Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst ed9867be
...@@ -44,13 +44,6 @@ ...@@ -44,13 +44,6 @@
#include <Cocoa/Cocoa.h> #include <Cocoa/Cocoa.h>
#include "postmac.h" #include "postmac.h"
using namespace ::osl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::task;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::util;
#define MI_OPEN 1 #define MI_OPEN 1
#define MI_WRITER 2 #define MI_WRITER 2
#define MI_CALC 3 #define MI_CALC 3
...@@ -137,7 +130,7 @@ struct RecentMenuEntry ...@@ -137,7 +130,7 @@ struct RecentMenuEntry
rtl::OUString aPassword; rtl::OUString aPassword;
}; };
class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star::util::XStringWidth > class RecentFilesStringLength : public ::cppu::WeakImplHelper< css::util::XStringWidth >
{ {
public: public:
RecentFilesStringLength() {} RecentFilesStringLength() {}
...@@ -145,7 +138,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star: ...@@ -145,7 +138,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star:
// XStringWidth // XStringWidth
sal_Int32 SAL_CALL queryStringWidth( const ::rtl::OUString& aString ) sal_Int32 SAL_CALL queryStringWidth( const ::rtl::OUString& aString )
throw (::com::sun::star::uno::RuntimeException) override throw ( css::uno::RuntimeException ) override
{ {
return aString.getLength(); return aString.getLength();
} }
...@@ -185,7 +178,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star: ...@@ -185,7 +178,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star:
[menu removeItemAtIndex: 0]; [menu removeItemAtIndex: 0];
// update recent item list // update recent item list
Sequence< Sequence< PropertyValue > > aHistoryList( SvtHistoryOptions().GetList( ePICKLIST ) ); css::uno::Sequence< css::uno::Sequence< css::beans::PropertyValue > > aHistoryList( SvtHistoryOptions().GetList( ePICKLIST ) );
int nPickListMenuItems = ( aHistoryList.getLength() > 99 ) ? 99 : aHistoryList.getLength(); int nPickListMenuItems = ( aHistoryList.getLength() > 99 ) ? 99 : aHistoryList.getLength();
...@@ -194,12 +187,12 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star: ...@@ -194,12 +187,12 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star:
{ {
for ( int i = 0; i < nPickListMenuItems; i++ ) for ( int i = 0; i < nPickListMenuItems; i++ )
{ {
Sequence< PropertyValue >& rPickListEntry = aHistoryList[i]; css::uno::Sequence< css::beans::PropertyValue >& rPickListEntry = aHistoryList[i];
RecentMenuEntry aRecentFile; RecentMenuEntry aRecentFile;
for ( int j = 0; j < rPickListEntry.getLength(); j++ ) for ( int j = 0; j < rPickListEntry.getLength(); j++ )
{ {
Any a = rPickListEntry[j].Value; css::uno::Any a = rPickListEntry[j].Value;
if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_URL ) if ( rPickListEntry[j].Name == HISTORY_PROPERTYNAME_URL )
a >>= aRecentFile.aURL; a >>= aRecentFile.aURL;
...@@ -237,7 +230,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star: ...@@ -237,7 +230,7 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star:
else else
{ {
// Use INetURLObject to abbreviate all other URLs // Use INetURLObject to abbreviate all other URLs
Reference< XStringWidth > xStringLength( new RecentFilesStringLength() ); css::uno::Reference< css::util::XStringWidth > xStringLength( new RecentFilesStringLength() );
aMenuTitle = aURL.getAbbreviated( xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS ); aMenuTitle = aURL.getAbbreviated( xStringLength, 46, INetURLObject::DECODE_UNAMBIGUOUS );
} }
...@@ -259,14 +252,14 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star: ...@@ -259,14 +252,14 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star:
{ {
const RecentMenuEntry& rRecentFile = (*m_pRecentFilesItems)[ nIndex ]; const RecentMenuEntry& rRecentFile = (*m_pRecentFilesItems)[ nIndex ];
int NUM_OF_PICKLIST_ARGS = 3; int NUM_OF_PICKLIST_ARGS = 3;
Sequence< PropertyValue > aArgsList( NUM_OF_PICKLIST_ARGS ); css::uno::Sequence< css::beans::PropertyValue > aArgsList( NUM_OF_PICKLIST_ARGS );
aArgsList[0].Name = "Referer"; aArgsList[0].Name = "Referer";
aArgsList[0].Value = makeAny( OUString( "private:user" ) ); aArgsList[0].Value = css::uno::makeAny( OUString( "private:user" ) );
// documents in the picklist will never be opened as templates // documents in the picklist will never be opened as templates
aArgsList[1].Name = "AsTemplate"; aArgsList[1].Name = "AsTemplate";
aArgsList[1].Value = makeAny( false ); aArgsList[1].Value = css::uno::makeAny( false );
::rtl::OUString aFilter( rRecentFile.aFilter ); ::rtl::OUString aFilter( rRecentFile.aFilter );
sal_Int32 nPos = aFilter.indexOf( '|' ); sal_Int32 nPos = aFilter.indexOf( '|' );
...@@ -278,14 +271,14 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star: ...@@ -278,14 +271,14 @@ class RecentFilesStringLength : public ::cppu::WeakImplHelper< ::com::sun::star:
aFilterOptions = aFilter.copy( nPos+1 ); aFilterOptions = aFilter.copy( nPos+1 );
aArgsList[2].Name = "FilterOptions"; aArgsList[2].Name = "FilterOptions";
aArgsList[2].Value = makeAny( aFilterOptions ); aArgsList[2].Value = css::uno::makeAny( aFilterOptions );
aFilter = aFilter.copy( 0, nPos-1 ); aFilter = aFilter.copy( 0, nPos-1 );
aArgsList.realloc( ++NUM_OF_PICKLIST_ARGS ); aArgsList.realloc( ++NUM_OF_PICKLIST_ARGS );
} }
aArgsList[NUM_OF_PICKLIST_ARGS-1].Name = "FilterName"; aArgsList[NUM_OF_PICKLIST_ARGS-1].Name = "FilterName";
aArgsList[NUM_OF_PICKLIST_ARGS-1].Value = makeAny( aFilter ); aArgsList[NUM_OF_PICKLIST_ARGS-1].Value = css::uno::makeAny( aFilter );
ShutdownIcon::OpenURL( rRecentFile.aURL, OUString( "_default" ), aArgsList ); ShutdownIcon::OpenURL( rRecentFile.aURL, OUString( "_default" ), aArgsList );
} }
...@@ -418,11 +411,11 @@ void aqua_init_systray() ...@@ -418,11 +411,11 @@ void aqua_init_systray()
SvtModuleOptions aModuleOptions; SvtModuleOptions aModuleOptions;
std::set< rtl::OUString > aFileNewAppsAvailable; std::set< rtl::OUString > aFileNewAppsAvailable;
SvtDynamicMenuOptions aOpt; SvtDynamicMenuOptions aOpt;
Sequence < Sequence < PropertyValue > > aNewMenu = aOpt.GetMenu( E_NEWMENU ); css::uno::Sequence < css::uno::Sequence < css::beans::PropertyValue > > aNewMenu = aOpt.GetMenu( E_NEWMENU );
const rtl::OUString sURLKey( "URL" ); const rtl::OUString sURLKey( "URL" );
const Sequence< PropertyValue >* pNewMenu = aNewMenu.getConstArray(); const css::uno::Sequence< css::beans::PropertyValue >* pNewMenu = aNewMenu.getConstArray();
const Sequence< PropertyValue >* pNewMenuEnd = aNewMenu.getConstArray() + aNewMenu.getLength(); const css::uno::Sequence< css::beans::PropertyValue >* pNewMenuEnd = aNewMenu.getConstArray() + aNewMenu.getLength();
for ( ; pNewMenu != pNewMenuEnd; ++pNewMenu ) for ( ; pNewMenu != pNewMenuEnd; ++pNewMenu )
{ {
comphelper::SequenceAsHashMap aEntryItems( *pNewMenu ); comphelper::SequenceAsHashMap aEntryItems( *pNewMenu );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment