diff options
Diffstat (limited to 'desktop/source')
21 files changed, 797 insertions, 439 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index efba60ca75b9..6f00d47332ac 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -359,6 +359,8 @@ namespace : public rtl::Static< String, Version > {}; struct AboutBoxVersion : public rtl::Static< String, AboutBoxVersion > {}; + struct OOOVendor + : public rtl::Static< String, OOOVendor > {}; struct Extension : public rtl::Static< String, Extension > {}; struct XMLFileFormatName @@ -422,6 +424,21 @@ void ReplaceStringHookProc( UniString& rStr ) rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATNAME", rXMLFileFormatName ); rStr.SearchAndReplaceAllAscii( "%PRODUCTXMLFILEFORMATVERSION", rXMLFileFormatVersion ); } + if ( rStr.SearchAscii( "%OOOVENDOR" ) != STRING_NOTFOUND ) + { + String &rOOOVendor = OOOVendor::get(); + + if ( !rOOOVendor.Len() ) + { + rtl::OUString aTmp; + Any aRet = ::utl::ConfigManager::GetDirectConfigProperty( + ::utl::ConfigManager::OOOVENDOR ); + aRet >>= aTmp; + rOOOVendor = aTmp; + + } + rStr.SearchAndReplaceAllAscii( "%OOOVENDOR" ,rOOOVendor ); + } if ( rStr.SearchAscii( "%WRITERCOMPATIBILITYVERSIONOOO11" ) != STRING_NOTFOUND ) { diff --git a/desktop/source/deployment/dp_xml.cxx b/desktop/source/deployment/dp_xml.cxx index 0453ab8372c0..65c48d70c92d 100644 --- a/desktop/source/deployment/dp_xml.cxx +++ b/desktop/source/deployment/dp_xml.cxx @@ -44,6 +44,20 @@ namespace dp_misc //============================================================================== void xml_parse( + Reference<xml::input::XRoot> const & xRoot, + ::ucbhelper::Content & ucb_content, + Reference<XComponentContext> const & xContext ) +{ + const Any arg(xRoot); + const Reference<xml::sax::XDocumentHandler> xDocHandler( + xContext->getServiceManager()->createInstanceWithArgumentsAndContext( + OUSTR("com.sun.star.xml.input.SaxDocumentHandler"), + Sequence<Any>( &arg, 1 ), xContext ), UNO_QUERY_THROW ); + xml_parse( xDocHandler, ucb_content, xContext ); + } + +//============================================================================== +void xml_parse( Reference<xml::sax::XDocumentHandler> const & xDocHandler, ::ucbhelper::Content & ucb_content, Reference<XComponentContext> const & xContext ) @@ -61,199 +75,4 @@ void xml_parse( xParser->parseStream( source ); } -//============================================================================== -void xml_parse( - Reference<xml::input::XRoot> const & xRoot, - ::ucbhelper::Content & ucb_content, - Reference<XComponentContext> const & xContext ) -{ - const Any arg(xRoot); - const Reference<xml::sax::XDocumentHandler> xDocHandler( - xContext->getServiceManager()->createInstanceWithArgumentsAndContext( - OUSTR("com.sun.star.xml.input.SaxDocumentHandler"), - Sequence<Any>( &arg, 1 ), xContext ), UNO_QUERY_THROW ); - xml_parse( xDocHandler, ucb_content, xContext ); -} - -//############################################################################## - -//______________________________________________________________________________ -XmlRootElement::XmlRootElement( - OUString const & uri, OUString const & localname ) - : m_uri( uri ) -{ - m_localname = localname; -} - -//______________________________________________________________________________ -XmlRootElement::~XmlRootElement() -{ -} - -// XRoot -//______________________________________________________________________________ -void XmlRootElement::startDocument( - Reference<xml::input::XNamespaceMapping> const & xMapping ) - throw (xml::sax::SAXException, RuntimeException) -{ - m_xNamespaceMapping = xMapping; - - try { - m_uid = m_xNamespaceMapping->getUidByUri( m_uri ); - } - catch (container::NoSuchElementException & exc) { - throw xml::sax::SAXException( - exc.Message, static_cast<OWeakObject *>(this), Any(exc) ); - } -} - -//______________________________________________________________________________ -void XmlRootElement::endDocument() - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -void XmlRootElement::processingInstruction( - OUString const &, OUString const & ) - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -void XmlRootElement::setDocumentLocator( - Reference<xml::sax::XLocator> const & ) - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -Reference<xml::input::XElement> XmlRootElement::startRootElement( - sal_Int32 uid, OUString const & localname, - Reference<xml::input::XAttributes> const & xAttributes ) - throw (xml::sax::SAXException, RuntimeException) -{ - check_xmlns( uid ); - if (! localname.equals( m_localname )) { - throw xml::sax::SAXException( - OUSTR("unexpected root element ") + localname, - static_cast<OWeakObject *>(this), Any() ); - } - m_xAttributes = xAttributes; - - return this; -} - -//############################################################################## - -//______________________________________________________________________________ -XmlElement::~XmlElement() -{ -} - -//______________________________________________________________________________ -void XmlElement::check_xmlns( sal_Int32 uid ) const - throw (xml::sax::SAXException) -{ - if (uid != m_uid) - { - ::rtl::OUStringBuffer buf; - buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("illegal xml namespace uri=\"") ); - try { - buf.append( m_xNamespaceMapping->getUriByUid( uid ) ); - } - catch (container::NoSuchElementException & exc) { - throw xml::sax::SAXException( - exc.Message, static_cast<OWeakObject *>( - const_cast<XmlElement *>(this) ), Any(exc) ); - } - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") ); - throw xml::sax::SAXException( - buf.makeStringAndClear(), - static_cast<OWeakObject *>( const_cast<XmlElement *>(this) ), - Any() ); - } -} - -// XElement -//______________________________________________________________________________ -Reference<xml::input::XElement> XmlElement::getParent() - throw (RuntimeException) -{ - return m_xParent; -} - -//______________________________________________________________________________ -OUString XmlElement::getLocalName() - throw (RuntimeException) -{ - return m_localname; -} - -//______________________________________________________________________________ -sal_Int32 XmlElement::getUid() - throw (RuntimeException) -{ - return m_uid; -} - -//______________________________________________________________________________ -Reference<xml::input::XAttributes> XmlElement::getAttributes() - throw (RuntimeException) -{ - return m_xAttributes; -} - -//______________________________________________________________________________ -void XmlElement::ignorableWhitespace( - OUString const & ) - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -void XmlElement::characters( OUString const & chars ) - throw (xml::sax::SAXException, RuntimeException) -{ - m_characters += chars; -} - -//______________________________________________________________________________ -void XmlElement::processingInstruction( - OUString const &, OUString const & ) - throw (xml::sax::SAXException, RuntimeException) -{ -} - -//______________________________________________________________________________ -void XmlElement::endElement() - throw (xml::sax::SAXException, RuntimeException) -{ - m_got_endElement = true; -} - -//______________________________________________________________________________ -Reference<xml::input::XElement> XmlElement::startChildElement( - sal_Int32 uid, OUString const & localName, - Reference<xml::input::XAttributes> const & ) - throw (xml::sax::SAXException, RuntimeException) -{ - ::rtl::OUStringBuffer buf; - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("unexpected element " - "{ tag=\"") ); - buf.append( localName ); - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\", uri=\"") ); - try { - buf.append( m_xNamespaceMapping->getUriByUid( uid ) ); - } - catch (container::NoSuchElementException & exc) { - throw xml::sax::SAXException( - exc.Message, static_cast<OWeakObject *>(this), Any(exc) ); - } - buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\" }!") ); - throw xml::sax::SAXException( - buf.makeStringAndClear(), static_cast<OWeakObject *>(this), Any() ); -} - } diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc index 8da4db5ca74f..1d2f4869cc7f 100644 --- a/desktop/source/deployment/gui/dp_gui.hrc +++ b/desktop/source/deployment/gui/dp_gui.hrc @@ -138,6 +138,8 @@ #define RID_IMG_LOCKED_HC (RID_DEPLOYMENT_GUI_START+59) #define RID_IMG_EXTENSION (RID_DEPLOYMENT_GUI_START+60) #define RID_IMG_EXTENSION_HC (RID_DEPLOYMENT_GUI_START+61) +#define RID_IMG_SHARED (RID_DEPLOYMENT_GUI_START+62) +#define RID_IMG_SHARED_HC (RID_DEPLOYMENT_GUI_START+63) #define RID_STR_ADD_PACKAGES (RID_DEPLOYMENT_GUI_START+70) diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index 2d0733dfbae3..71fda4d9b3e0 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -30,7 +30,7 @@ #include "dp_gui.hrc" #include "svtools/controldims.hrc" -#include "svl/svtools.hrc" +#include "svtools/svtools.hrc" #include "dp_gui.h" #include "dp_gui_dialog2.hxx" @@ -239,7 +239,10 @@ void ExtBoxWithBtns_Impl::RecalcAll() const sal_Int32 nActive = getSelIndex(); if ( nActive != EXTENSION_LISTBOX_ENTRY_NOTFOUND ) + { SetButtonPos( GetEntryRect( nActive ) ); + SetButtonStatus( GetEntryData( nActive) ); + } else { m_pOptionsBtn->Hide(); @@ -257,21 +260,6 @@ void ExtBoxWithBtns_Impl::selectEntry( const long nPos ) return; ExtensionBox_Impl::selectEntry( nPos ); - - if ( ( nPos >= 0 ) && ( nPos < GetEntryCount() ) ) - { - if ( IsReallyVisible() ) - { - SetButtonPos( GetEntryRect( nPos ) ); - } - SetButtonStatus( GetEntryData( nPos) ); - } - else - { - m_pOptionsBtn->Hide(); - m_pEnableBtn->Hide(); - m_pRemoveBtn->Hide(); - } } // ----------------------------------------------------------------------- diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src index d55421d50d75..7c47365999a0 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.src +++ b/desktop/source/deployment/gui/dp_gui_dialog2.src @@ -165,11 +165,21 @@ Image RID_IMG_WARNING_HC Image RID_IMG_LOCKED { - ImageBitmap = Bitmap { File = "shared_16.png"; }; + ImageBitmap = Bitmap { File = "lock_16.png"; }; }; Image RID_IMG_LOCKED_HC { + ImageBitmap = Bitmap { File = "lock_16_h.png"; }; +}; + +Image RID_IMG_SHARED +{ + ImageBitmap = Bitmap { File = "shared_16.png"; }; +}; + +Image RID_IMG_SHARED_HC +{ ImageBitmap = Bitmap { File = "shared_16_h.png"; }; }; diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 2e02a90f59fd..bcaa3252ea8f 100644..100755 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -177,6 +177,8 @@ ExtensionBox_Impl::ExtensionBox_Impl( Dialog* pParent, TheExtensionManager *pMan m_nTopIndex( 0 ), m_nActiveHeight( 0 ), m_nExtraHeight( 2 ), + m_aSharedImage( DialogHelper::getResId( RID_IMG_SHARED ) ), + m_aSharedImageHC( DialogHelper::getResId( RID_IMG_SHARED_HC ) ), m_aLockedImage( DialogHelper::getResId( RID_IMG_LOCKED ) ), m_aLockedImageHC( DialogHelper::getResId( RID_IMG_LOCKED_HC ) ), m_aWarningImage( DialogHelper::getResId( RID_IMG_WARNING ) ), @@ -469,13 +471,15 @@ void ExtensionBox_Impl::selectEntry( const long nPos ) if ( IsReallyVisible() ) { - m_bNeedsRecalc = true; m_bAdjustActive = true; } } if ( IsReallyVisible() ) + { + m_bNeedsRecalc = true; Invalidate(); + } guard.clear(); } @@ -618,7 +622,10 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr if ( pEntry->m_bShared ) { aPos = rRect.TopRight() + Point( -(RIGHT_ICON_OFFSET + SMALL_ICON_SIZE), TOP_OFFSET ); - DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aLockedImageHC : m_aLockedImage ); + if ( pEntry->m_bLocked ) + DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aLockedImageHC : m_aLockedImage ); + else + DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aSharedImageHC : m_aSharedImage ); } if ( ( pEntry->m_eState == AMBIGUOUS ) || pEntry->m_bMissingDeps ) { diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx index ad62bfd1a2d8..16ef974deff9 100644..100755 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx @@ -135,6 +135,8 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox long m_nActiveHeight; long m_nExtraHeight; Size m_aOutputSize; + Image m_aSharedImage; + Image m_aSharedImageHC; Image m_aLockedImage; Image m_aLockedImageHC; Image m_aWarningImage; diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index 061988d5b04d..578ff04a6c88 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -92,6 +92,8 @@ namespace : public rtl::Static< String, Version > {}; struct AboutBoxVersion : public rtl::Static< String, AboutBoxVersion > {}; + struct OOOVendor + : public rtl::Static< String, OOOVendor > {}; struct Extension : public rtl::Static< String, Extension > {}; } @@ -107,6 +109,7 @@ void ReplaceProductNameHookProc( String& rStr ) String &rVersion = Version::get(); String &rAboutBoxVersion = AboutBoxVersion::get(); String &rExtension = Extension::get(); + String &rOOOVendor = OOOVendor::get(); if ( !rProductName.Len() ) { @@ -123,6 +126,10 @@ void ReplaceProductNameHookProc( String& rStr ) aRet >>= aTmp; rAboutBoxVersion = aTmp; + aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::OOOVENDOR ); + aRet >>= aTmp; + rOOOVendor = aTmp; + if ( !rExtension.Len() ) { aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTEXTENSION ); @@ -135,6 +142,7 @@ void ReplaceProductNameHookProc( String& rStr ) rStr.SearchAndReplaceAllAscii( "%PRODUCTNAME", rProductName ); rStr.SearchAndReplaceAllAscii( "%PRODUCTVERSION", rVersion ); rStr.SearchAndReplaceAllAscii( "%ABOUTBOXPRODUCTVERSION", rAboutBoxVersion ); + rStr.SearchAndReplaceAllAscii( "%OOOVENDOR", rOOOVendor ); rStr.SearchAndReplaceAllAscii( "%PRODUCTEXTENSION", rExtension ); } } diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk index 6a9c7b6bbb38..52092a077a4b 100644 --- a/desktop/source/deployment/gui/makefile.mk +++ b/desktop/source/deployment/gui/makefile.mk @@ -77,6 +77,7 @@ SHL1STDLIBS = \ $(SVTOOLLIB) \ $(SVLLIB) \ $(SVXLIB) \ + $(SVXCORELIB) \ $(SFXLIB) \ $(DEPLOYMENTMISCLIB) \ $(OLE32LIB) diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx index 38a1870782ed..e58ff1e71acd 100644 --- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx +++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx @@ -216,16 +216,6 @@ public: */ ::rtl::OUString getIconURL( sal_Bool bHighContrast ) const; - /** - Allow direct access to the XPath functionality. - - @return - direct access to the XPath functionality; null iff this instance was - constructed with a null <code>element</code> - */ - ::com::sun::star::uno::Reference< ::com::sun::star::xml::xpath::XXPathAPI > - getXpath() const; - private: SAL_DLLPRIVATE ::boost::optional< ::rtl::OUString > getOptionalValue( ::rtl::OUString const & expression) const; diff --git a/desktop/source/deployment/inc/dp_xml.h b/desktop/source/deployment/inc/dp_xml.h index 41c12f282428..300051bd1512 100644 --- a/desktop/source/deployment/inc/dp_xml.h +++ b/desktop/source/deployment/inc/dp_xml.h @@ -52,110 +52,6 @@ void xml_parse( ::ucbhelper::Content & ucb_content, css::uno::Reference< css::uno::XComponentContext > const & xContext ); -//============================================================================== -void xml_parse( - css::uno::Reference< css::xml::input::XRoot > const & xRoot, - ::ucbhelper::Content & ucb_content, - css::uno::Reference< css::uno::XComponentContext > const & xContext ); - -//============================================================================== -class XmlElement : public ::cppu::WeakImplHelper1< css::xml::input::XElement > -{ -protected: - css::uno::Reference<css::xml::input::XNamespaceMapping> m_xNamespaceMapping; - const css::uno::Reference<css::xml::input::XElement> m_xParent; - sal_Int32 m_uid; - ::rtl::OUString m_localname; - css::uno::Reference<css::xml::input::XAttributes> m_xAttributes; - ::rtl::OUString m_characters; - bool m_got_endElement; - - void check_xmlns( sal_Int32 uid ) const throw (css::xml::sax::SAXException); - - inline XmlElement() - : m_uid( -1 ), - m_got_endElement( false ) - {} - virtual ~XmlElement(); -public: - inline bool isParsed() const { return m_got_endElement; } - - inline XmlElement( - css::uno::Reference<css::xml::input::XNamespaceMapping> - const & xMapping, - css::uno::Reference<css::xml::input::XElement> const & xParent, - sal_Int32 uid, ::rtl::OUString const & localname, - css::uno::Reference< css::xml::input::XAttributes > - const & xAttributes ) - : m_xNamespaceMapping( xMapping ), - m_xParent( xParent ), - m_uid( uid ), - m_localname( localname ), - m_xAttributes( xAttributes ), - m_got_endElement( false ) - {} - - // XElement - virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL - getParent() throw (css::uno::RuntimeException); - virtual ::rtl::OUString SAL_CALL getLocalName() - throw (css::uno::RuntimeException); - virtual sal_Int32 SAL_CALL getUid() - throw (css::uno::RuntimeException); - virtual css::uno::Reference<css::xml::input::XAttributes> SAL_CALL - getAttributes() throw (css::uno::RuntimeException); - virtual void SAL_CALL ignorableWhitespace( - ::rtl::OUString const & rWhitespaces ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL characters( ::rtl::OUString const & rChars ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL processingInstruction( - ::rtl::OUString const & Target, ::rtl::OUString const & Data ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL endElement() - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL - startChildElement( - sal_Int32 nUid, ::rtl::OUString const & rLocalName, - css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); -}; - -//============================================================================== -class XmlRootElement : public ::cppu::ImplInheritanceHelper1< - XmlElement, css::xml::input::XRoot > -{ - const ::rtl::OUString m_uri; - -protected: - virtual ~XmlRootElement(); -public: - inline ::rtl::OUString const & getUri() const - { return m_uri; } - - XmlRootElement( - ::rtl::OUString const & uri, ::rtl::OUString const & localname ); - - // XRoot - virtual void SAL_CALL startDocument( - css::uno::Reference<css::xml::input::XNamespaceMapping> - const & xMapping ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL endDocument() - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL processingInstruction( - ::rtl::OUString const & target, ::rtl::OUString const & data ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual void SAL_CALL setDocumentLocator( - css::uno::Reference<css::xml::sax::XLocator> const & xLocator ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); - virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL - startRootElement( - sal_Int32 uid, ::rtl::OUString const & localname, - css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) - throw (css::xml::sax::SAXException, css::uno::RuntimeException); -}; - } #endif diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 28f45918e9e2..049f781dfd90 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -264,12 +264,6 @@ DescriptionInfoset::getUpdateDownloadUrls() const ::boost::optional< ::rtl::OUString >(); } -css::uno::Reference< css::xml::xpath::XXPathAPI > DescriptionInfoset::getXpath() - const -{ - return m_xpath; -} - ::boost::optional< ::rtl::OUString > DescriptionInfoset::getOptionalValue( ::rtl::OUString const & expression) const { diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx index 4a144f3fdf20..ac28b6816708 100644 --- a/desktop/source/deployment/misc/dp_platform.cxx +++ b/desktop/source/deployment/misc/dp_platform.cxx @@ -39,6 +39,8 @@ #define PLATFORM_WIN_X86 "windows_x86" #define PLATFORM_LINUX_X86 "linux_x86" #define PLATFORM_LINUX_X86_64 "linux_x86_64" +#define PLATFORM_KFREEBSD_X86 "kfreebsd_x86" +#define PLATFORM_KFREEBSD_X86_64 "kfreebsd_x86_64" #define PLATFORM_LINUX_SPARC "linux_sparc" #define PLATFORM_LINUX_POWERPC "linux_powerpc" #define PLATFORM_LINUX_POWERPC64 "linux_powerpc64" @@ -129,6 +131,10 @@ namespace ret = checkOSandCPU(OUSTR("Linux"), OUSTR("x86")); else if (token.equals(OUSTR(PLATFORM_LINUX_X86_64))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("X86_64")); + else if (token.equals(OUSTR(PLATFORM_KFREEBSD_X86))) + ret = checkOSandCPU(OUSTR("kFreeBSD"), OUSTR("x86")); + else if (token.equals(OUSTR(PLATFORM_KFREEBSD_X86_64))) + ret = checkOSandCPU(OUSTR("kFreeBSD"), OUSTR("X86_64")); else if (token.equals(OUSTR(PLATFORM_LINUX_SPARC))) ret = checkOSandCPU(OUSTR("Linux"), OUSTR("SPARC")); else if (token.equals(OUSTR(PLATFORM_LINUX_POWERPC))) diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 4bcbf250907f..c219a839b99a 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -59,6 +59,11 @@ #include <com/sun/star/util/XRefreshable.hpp> #include <com/sun/star/util/XChangesBatch.hpp> #include <com/sun/star/util/XStringSubstitution.hpp> +#include <com/sun/star/embed/ElementModes.hpp> +#include <com/sun/star/embed/XStorage.hpp> +#include <com/sun/star/ui/XUIConfiguration.hpp> +#include <com/sun/star/ui/XUIConfigurationStorage.hpp> +#include <com/sun/star/ui/XUIConfigurationPersistence.hpp> using namespace rtl; using namespace osl; @@ -73,6 +78,120 @@ using namespace com::sun::star; namespace desktop { +static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL = ::rtl::OUString::createFromAscii("CommandURL"); +static const ::rtl::OUString ITEM_DESCRIPTOR_CONTAINER = ::rtl::OUString::createFromAscii("ItemDescriptorContainer"); +static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL = ::rtl::OUString::createFromAscii("Label"); + +static const ::rtl::OUString MENU_SEPERATOR = ::rtl::OUString::createFromAscii(" | "); +static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("..."); + +::rtl::OUString retrieveLabelFromCommand(const ::rtl::OUString& sCommand, const ::rtl::OUString& sModuleIdentifier) +{ + ::rtl::OUString sLabel; + + uno::Reference< container::XNameAccess > xUICommands; + uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY ); + if ( xNameAccess.is() ) + { + uno::Any a = xNameAccess->getByName( sModuleIdentifier ); + a >>= xUICommands; + } + if (xUICommands.is()) + { + if ( sCommand.getLength() > 0 ) + { + rtl::OUString aStr; + ::uno::Sequence< beans::PropertyValue > aPropSeq; + try + { + uno::Any a( xUICommands->getByName( sCommand )); + if ( a >>= aPropSeq ) + { + for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) + { + if ( aPropSeq[i].Name.equalsAscii( "Label" )) + { + aPropSeq[i].Value >>= aStr; + break; + } + } + } + + sLabel = aStr; + } + + catch(container::NoSuchElementException&) + { + sLabel = sCommand; + sal_Int32 nIndex = sLabel.indexOf(':'); + if (nIndex>=0 && nIndex <= sLabel.getLength()-1) + sLabel = sLabel.copy(nIndex+1); + } + + } + } + + return sLabel; +} + +::rtl::OUString stripHotKey( const ::rtl::OUString& str ) +{ + sal_Int32 index = str.indexOf( '~' ); + if ( index == -1 ) + { + return str; + } + else + { + return str.replaceAt( index, 1, ::rtl::OUString() ); + } +} + +::rtl::OUString mapModuleShortNameToIdentifier(const ::rtl::OUString& sShortName) +{ + ::rtl::OUString sIdentifier; + + if (sShortName.equals(::rtl::OUString::createFromAscii("StartModule"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.StartModule"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("swriter"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("scalc"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sdraw"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.drawing.DrawingDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("simpress"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.presentation.PresentationDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("smath"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.formula.FormulaProperties"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("schart"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("BasicIDE"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("dbapp"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sdb.OfficeDatabaseDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sglobal"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.GlobalDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sweb"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.WebDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("swxform"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.xforms.XMLFormDocument"); + + else if (sShortName.equals(::rtl::OUString::createFromAscii("sbibliography"))) + sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.Bibliography"); + + return sIdentifier; +} static MigrationImpl *pImpl = 0; static Mutex aMutex; @@ -160,9 +279,72 @@ sal_Bool MigrationImpl::doMigration() m_vrFileList = compileFileList(); sal_Bool result = sal_False; - try{ + try + { + NewVersionUIInfo aNewVersionUIInfo; + ::std::vector< MigrationModuleInfo > vModulesInfo = dectectUIChangesForAllModules(); + aNewVersionUIInfo.init(vModulesInfo); + copyFiles(); + const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar"); + const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/"); + for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i) + { + ::rtl::OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName); + if (sModuleIdentifier.getLength()==0) + continue; + + uno::Sequence< uno::Any > lArgs(2); + ::rtl::OUString aOldCfgDataPath = m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules/"); + lArgs[0] <<= aOldCfgDataPath + vModulesInfo[i].sModuleShortName; + lArgs[1] <<= embed::ElementModes::READ; + + uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY); + uno::Reference< embed::XStorage > xModules; + + xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY); + uno::Reference< ui::XUIConfigurationManager > xOldCfgManager( m_xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.ui.UIConfigurationManager")), uno::UNO_QUERY ); + uno::Reference< ui::XUIConfigurationStorage > xOldCfgStorage( xOldCfgManager, uno::UNO_QUERY ); + uno::Reference< ui::XUIConfigurationPersistence > xOldCfgPersistence( xOldCfgManager, uno::UNO_QUERY ); + + if ( xOldCfgStorage.is() && xOldCfgPersistence.is() && xModules.is() ) + { + xOldCfgStorage->setStorage( xModules ); + xOldCfgPersistence->reload(); + } + + uno::Reference< ui::XUIConfigurationManager > xCfgManager = aNewVersionUIInfo.getConfigManager(vModulesInfo[i].sModuleShortName); + + if (vModulesInfo[i].bHasMenubar) + { + uno::Reference< container::XIndexContainer > xOldVersionMenuSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sMenubarResourceURL, sal_True), uno::UNO_QUERY); + uno::Reference< container::XIndexContainer > xNewVersionMenuSettings = aNewVersionUIInfo.getNewMenubarSettings(vModulesInfo[i].sModuleShortName); + ::rtl::OUString sParent; + compareOldAndNewConfig(sParent, xOldVersionMenuSettings, xNewVersionMenuSettings, sMenubarResourceURL); + mergeOldToNewVersion(xCfgManager, xNewVersionMenuSettings, sModuleIdentifier, sMenubarResourceURL); + } + + sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size(); + if (nToolbars >0) + { + for (sal_Int32 j=0; j<nToolbars; ++j) + { + ::rtl::OUString sToolbarName = vModulesInfo[i].m_vToolbars[j]; + ::rtl::OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName; + + uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings = uno::Reference< container::XIndexContainer >(xOldCfgManager->getSettings(sToolbarResourceURL, sal_True), uno::UNO_QUERY); + uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(vModulesInfo[i].sModuleShortName, sToolbarName); + ::rtl::OUString sParent; + compareOldAndNewConfig(sParent, xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL); + mergeOldToNewVersion(xCfgManager, xNewVersionToolbarSettings, sModuleIdentifier, sToolbarResourceURL); + } + } + + m_aOldVersionItemsHashMap.clear(); + m_aNewVersionItemsHashMap.clear(); + } + // execute the migration items from Setup.xcu copyConfig(); @@ -231,7 +413,7 @@ static void insertSorted(migrations_available& rAvailableMigrations, supported_m { rAvailableMigrations.insert(pIter, aSupportedMigration ); bInserted = true; - break; // i111193: insert invalidates iterator! + break; } ++pIter; } @@ -291,10 +473,14 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio tmpStep.name = seqMigrations[i]; // read included files from current step description + ::rtl::OUString aSeqEntry; if (tmpAccess->getByName(OUString::createFromAscii("IncludedFiles")) >>= tmpSeq) { for (sal_Int32 j=0; j<tmpSeq.getLength(); j++) - tmpStep.includeFiles.push_back(tmpSeq[j]); + { + aSeqEntry = tmpSeq[j]; + tmpStep.includeFiles.push_back(aSeqEntry); + } } // exluded files... @@ -329,7 +515,10 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio if (tmpAccess->getByName(OUString::createFromAscii("ExcludedExtensions")) >>= tmpSeq) { for (sal_Int32 j=0; j<tmpSeq.getLength(); j++) - tmpStep.excludeExtensions.push_back(tmpSeq[j]); + { + aSeqEntry = tmpSeq[j]; + tmpStep.excludeExtensions.push_back(aSeqEntry); + } } // generic service @@ -781,4 +970,396 @@ void MigrationImpl::runServices() } } +::std::vector< MigrationModuleInfo > MigrationImpl::dectectUIChangesForAllModules() const +{ + ::std::vector< MigrationModuleInfo > vModulesInfo; + const ::rtl::OUString MENUBAR = ::rtl::OUString::createFromAscii("menubar"); + const ::rtl::OUString TOOLBAR = ::rtl::OUString::createFromAscii("toolbar"); + + uno::Sequence< uno::Any > lArgs(2); + lArgs[0] <<= m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules"); + lArgs[1] <<= embed::ElementModes::READ; + + uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY); + uno::Reference< embed::XStorage > xModules; + + xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY); + if (!xModules.is()) + return vModulesInfo; + + uno::Reference< container::XNameAccess > xAccess = uno::Reference< container::XNameAccess >(xModules, uno::UNO_QUERY); + uno::Sequence< ::rtl::OUString > lNames = xAccess->getElementNames(); + sal_Int32 nLength = lNames.getLength(); + for (sal_Int32 i=0; i<nLength; ++i) + { + ::rtl::OUString sModuleShortName = lNames[i]; + uno::Reference< embed::XStorage > xModule = xModules->openStorageElement(sModuleShortName, embed::ElementModes::READ); + if (xModule.is()) + { + MigrationModuleInfo aModuleInfo; + + uno::Reference< embed::XStorage > xMenubar = xModule->openStorageElement(MENUBAR, embed::ElementModes::READ); + if (xMenubar.is()) + { + uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xMenubar, uno::UNO_QUERY); + if (xNameAccess->getElementNames().getLength() > 0) + { + aModuleInfo.sModuleShortName = sModuleShortName; + aModuleInfo.bHasMenubar = sal_True; + } + } + + uno::Reference< embed::XStorage > xToolbar = xModule->openStorageElement(TOOLBAR, embed::ElementModes::READ); + if (xToolbar.is()) + { + const ::rtl::OUString RESOURCEURL_CUSTOM_ELEMENT = ::rtl::OUString::createFromAscii("custom_"); + sal_Int32 nCustomLen = 7; + + uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xToolbar, uno::UNO_QUERY); + ::uno::Sequence< ::rtl::OUString > lToolbars = xNameAccess->getElementNames(); + for (sal_Int32 j=0; j<lToolbars.getLength(); ++j) + { + ::rtl::OUString sToolbarName = lToolbars[j]; + if (sToolbarName.getLength()>=nCustomLen && + sToolbarName.copy(0, nCustomLen).equals(RESOURCEURL_CUSTOM_ELEMENT)) + continue; + + aModuleInfo.sModuleShortName = sModuleShortName; + sal_Int32 nIndex = sToolbarName.lastIndexOf('.'); + if (nIndex > 0) + { + ::rtl::OUString sExtension(sToolbarName.copy(nIndex)); + ::rtl::OUString sToolbarResourceName(sToolbarName.copy(0, nIndex)); + if (sToolbarResourceName.getLength()>0 && sExtension.equalsAsciiL(".xml", 4)) + aModuleInfo.m_vToolbars.push_back(sToolbarResourceName); + } + } + } + + if (aModuleInfo.sModuleShortName.getLength()>0) + vModulesInfo.push_back(aModuleInfo); + } + } + + return vModulesInfo; +} + +void MigrationImpl::compareOldAndNewConfig(const ::rtl::OUString& sParent, + const uno::Reference< container::XIndexContainer >& xIndexOld, + const uno::Reference< container::XIndexContainer >& xIndexNew, + const ::rtl::OUString& sResourceURL) +{ + ::std::vector< MigrationItem > vOldItems; + ::std::vector< MigrationItem > vNewItems; + uno::Sequence< beans::PropertyValue > aProp; + sal_Int32 nOldCount = xIndexOld->getCount(); + sal_Int32 nNewCount = xIndexNew->getCount(); + + for (int n=0; n<nOldCount; ++n) + { + MigrationItem aMigrationItem; + if (xIndexOld->getByIndex(n) >>= aProp) + { + for(int i=0; i<aProp.getLength(); ++i) + { + if (aProp[i].Name.equals(ITEM_DESCRIPTOR_COMMANDURL)) + aProp[i].Value >>= aMigrationItem.m_sCommandURL; + else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER)) + aProp[i].Value >>= aMigrationItem.m_xPopupMenu; + } + + if (aMigrationItem.m_sCommandURL.getLength()) + vOldItems.push_back(aMigrationItem); + } + } + + for (int n=0; n<nNewCount; ++n) + { + MigrationItem aMigrationItem; + if (xIndexNew->getByIndex(n) >>= aProp) + { + for(int i=0; i<aProp.getLength(); ++i) + { + if (aProp[i].Name.equals(ITEM_DESCRIPTOR_COMMANDURL)) + aProp[i].Value >>= aMigrationItem.m_sCommandURL; + else if (aProp[i].Name.equals(ITEM_DESCRIPTOR_CONTAINER)) + aProp[i].Value >>= aMigrationItem.m_xPopupMenu; + } + + if (aMigrationItem.m_sCommandURL.getLength()) + vNewItems.push_back(aMigrationItem); + } + } + + ::std::vector< MigrationItem >::iterator it; + + ::rtl::OUString sSibling; + for (it = vOldItems.begin(); it!=vOldItems.end(); ++it) + { + ::std::vector< MigrationItem >::iterator pFound = ::std::find(vNewItems.begin(), vNewItems.end(), *it); + if (pFound != vNewItems.end() && it->m_xPopupMenu.is()) + { + ::rtl::OUString sName; + if (sParent.getLength()>0) + sName = sParent + MENU_SEPERATOR + it->m_sCommandURL; + else + sName = it->m_sCommandURL; + compareOldAndNewConfig(sName, it->m_xPopupMenu, pFound->m_xPopupMenu, sResourceURL); + } + else if (pFound == vNewItems.end()) + { + MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu); + if (m_aOldVersionItemsHashMap.find(sResourceURL)==m_aOldVersionItemsHashMap.end()) + { + ::std::vector< MigrationItem > vMigrationItems; + m_aOldVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems)); + m_aOldVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + else + { + if (::std::find(m_aOldVersionItemsHashMap[sResourceURL].begin(), m_aOldVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aOldVersionItemsHashMap[sResourceURL].end()) + m_aOldVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + } + + sSibling = it->m_sCommandURL; + } + + ::rtl::OUString sNewSibling; + uno::Reference< container::XIndexContainer > xPopup; + for (it = vNewItems.begin(); it!=vNewItems.end(); ++it) + { + ::std::vector< MigrationItem >::iterator pFound = ::std::find(vOldItems.begin(), vOldItems.end(), *it); + if (pFound != vOldItems.end() && it->m_xPopupMenu.is()) + { + ::rtl::OUString sName; + if (sParent.getLength()>0) + sName = sParent + MENU_SEPERATOR + it->m_sCommandURL; + else + sName = it->m_sCommandURL; + compareOldAndNewConfig(sName, pFound->m_xPopupMenu, it->m_xPopupMenu, sResourceURL); + } + else if (::std::find(vOldItems.begin(), vOldItems.end(), *it) == vOldItems.end()) + { + MigrationItem aMigrationItem(sParent, sSibling, it->m_sCommandURL, it->m_xPopupMenu); + if (m_aNewVersionItemsHashMap.find(sResourceURL)==m_aNewVersionItemsHashMap.end()) + { + ::std::vector< MigrationItem > vMigrationItems; + m_aNewVersionItemsHashMap.insert(MigrationHashMap::value_type(sResourceURL, vMigrationItems)); + m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + else + { + if (::std::find(m_aNewVersionItemsHashMap[sResourceURL].begin(), m_aNewVersionItemsHashMap[sResourceURL].end(), aMigrationItem)==m_aNewVersionItemsHashMap[sResourceURL].end()) + m_aNewVersionItemsHashMap[sResourceURL].push_back(aMigrationItem); + } + } + } +} + +void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurationManager >& xCfgManager, + const uno::Reference< container::XIndexContainer>& xIndexContainer, + const ::rtl::OUString& sModuleIdentifier, + const ::rtl::OUString& sResourceURL) +{ + MigrationHashMap::iterator pFound = m_aOldVersionItemsHashMap.find(sResourceURL); + if (pFound==m_aOldVersionItemsHashMap.end()) + return; + + ::std::vector< MigrationItem >::iterator it; + for (it=pFound->second.begin(); it!=pFound->second.end(); ++it) + { + uno::Reference< container::XIndexContainer > xTemp = xIndexContainer; + + ::rtl::OUString sParentNodeName = it->m_sParentNodeName; + sal_Int32 nIndex = 0; + do + { + ::rtl::OUString sToken = sParentNodeName.getToken(0, '|', nIndex).trim(); + if (sToken.getLength()<=0) + break; + + sal_Int32 nCount = xTemp->getCount(); + for (sal_Int32 i=0; i<nCount; ++i) + { + ::rtl::OUString sCommandURL; + ::rtl::OUString sLabel; + uno::Reference< container::XIndexContainer > xChild; + + uno::Sequence< beans::PropertyValue > aPropSeq; + xTemp->getByIndex(i) >>= aPropSeq; + for (sal_Int32 j=0; j<aPropSeq.getLength(); ++j) + { + ::rtl::OUString sPropName = aPropSeq[j].Name; + if (sPropName.equals(ITEM_DESCRIPTOR_COMMANDURL)) + aPropSeq[j].Value >>= sCommandURL; + else if (sPropName.equals(ITEM_DESCRIPTOR_LABEL)) + aPropSeq[j].Value >>= sLabel; + else if (sPropName.equals(ITEM_DESCRIPTOR_CONTAINER)) + aPropSeq[j].Value >>= xChild; + } + + if (sCommandURL == sToken) + { + xTemp = xChild; + break; + } + } + + } while (nIndex>=0); + + if (nIndex == -1) + { + uno::Sequence< beans::PropertyValue > aPropSeq(3); + + aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL; + aPropSeq[0].Value <<= it->m_sCommandURL; + aPropSeq[1].Name = ITEM_DESCRIPTOR_LABEL; + aPropSeq[1].Value <<= retrieveLabelFromCommand(it->m_sCommandURL, sModuleIdentifier); + aPropSeq[2].Name = ITEM_DESCRIPTOR_CONTAINER; + aPropSeq[2].Value <<= it->m_xPopupMenu; + + if (it->m_sPrevSibling.getLength() == 0) + xTemp->insertByIndex(0, uno::makeAny(aPropSeq)); + else if (it->m_sPrevSibling.getLength() > 0) + { + sal_Int32 nCount = xTemp->getCount(); + sal_Int32 i = 0; + for (; i<nCount; ++i) + { + ::rtl::OUString sCmd; + uno::Sequence< beans::PropertyValue > aTempPropSeq; + xTemp->getByIndex(i) >>= aTempPropSeq; + for (sal_Int32 j=0; j<aTempPropSeq.getLength(); ++j) + { + if (aTempPropSeq[j].Name.equals(ITEM_DESCRIPTOR_COMMANDURL)) + { + aTempPropSeq[j].Value >>= sCmd; + break; + } + } + + if (sCmd.equals(it->m_sPrevSibling)) + break; + } + + xTemp->insertByIndex(i+1, uno::makeAny(aPropSeq)); + } + } + } + + uno::Reference< container::XIndexAccess > xIndexAccess(xIndexContainer, uno::UNO_QUERY); + if (xIndexAccess.is()) + xCfgManager->replaceSettings(sResourceURL, xIndexAccess); + + uno::Reference< ui::XUIConfigurationPersistence > xUIConfigurationPersistence(xCfgManager, uno::UNO_QUERY); + if (xUIConfigurationPersistence.is()) + xUIConfigurationPersistence->store(); +} + +uno::Reference< ui::XUIConfigurationManager > NewVersionUIInfo::getConfigManager(const ::rtl::OUString& sModuleShortName) const +{ + uno::Reference< ui::XUIConfigurationManager > xCfgManager; + + for (sal_Int32 i=0; i<m_lCfgManagerSeq.getLength(); ++i) + { + if (m_lCfgManagerSeq[i].Name.equals(sModuleShortName)) + { + m_lCfgManagerSeq[i].Value >>= xCfgManager; + break; + } + } + + return xCfgManager; +} + +uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const +{ + uno::Reference< container::XIndexContainer > xNewMenuSettings; + + for (sal_Int32 i=0; i<m_lNewVersionMenubarSettingsSeq.getLength(); ++i) + { + if (m_lNewVersionMenubarSettingsSeq[i].Name.equals(sModuleShortName)) + { + m_lNewVersionMenubarSettingsSeq[i].Value >>= xNewMenuSettings; + break; + } + } + + return xNewMenuSettings; +} + +uno::Reference< container::XIndexContainer > NewVersionUIInfo::getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const +{ + uno::Reference< container::XIndexContainer > xNewToolbarSettings; + + for (sal_Int32 i=0; i<m_lNewVersionToolbarSettingsSeq.getLength(); ++i) + { + if (m_lNewVersionToolbarSettingsSeq[i].Name.equals(sModuleShortName)) + { + uno::Sequence< beans::PropertyValue > lToolbarSettingsSeq; + m_lNewVersionToolbarSettingsSeq[i].Value >>= lToolbarSettingsSeq; + for (sal_Int32 j=0; j<lToolbarSettingsSeq.getLength(); ++j) + { + if (lToolbarSettingsSeq[j].Name.equals(sToolbarName)) + { + lToolbarSettingsSeq[j].Value >>= xNewToolbarSettings; + break; + } + } + + break; + } + } + + return xNewToolbarSettings; +} + +void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModulesInfo) +{ + m_lCfgManagerSeq.realloc(vModulesInfo.size()); + m_lNewVersionMenubarSettingsSeq.realloc(vModulesInfo.size()); + m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size()); + + const ::rtl::OUString sModuleCfgSupplier = ::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"); + const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar"); + const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/"); + + uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = uno::Reference< ui::XModuleUIConfigurationManagerSupplier >(::comphelper::getProcessServiceFactory()->createInstance(sModuleCfgSupplier), uno::UNO_QUERY); + + for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i) + { + ::rtl::OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName); + if (sModuleIdentifier.getLength() > 0) + { + uno::Reference< ui::XUIConfigurationManager > xCfgManager = xModuleCfgSupplier->getUIConfigurationManager(sModuleIdentifier); + m_lCfgManagerSeq[i].Name = vModulesInfo[i].sModuleShortName; + m_lCfgManagerSeq[i].Value <<= xCfgManager; + + if (vModulesInfo[i].bHasMenubar) + { + m_lNewVersionMenubarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName; + m_lNewVersionMenubarSettingsSeq[i].Value <<= xCfgManager->getSettings(sMenubarResourceURL, sal_True); + } + + sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size(); + if (nToolbars > 0) + { + uno::Sequence< beans::PropertyValue > lPropSeq(nToolbars); + for (sal_Int32 j=0; j<nToolbars; ++j) + { + ::rtl::OUString sToolbarName = vModulesInfo[i].m_vToolbars[j]; + ::rtl::OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName; + + lPropSeq[j].Name = sToolbarName; + lPropSeq[j].Value <<= xCfgManager->getSettings(sToolbarResourceURL, sal_True); + } + + m_lNewVersionToolbarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName; + m_lNewVersionToolbarSettingsSeq[i].Value <<= lPropSeq; + } + } + } +} + } // namespace desktop diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx index 8cad1cce4b16..f73e44fea523 100644 --- a/desktop/source/migration/migration_impl.hxx +++ b/desktop/source/migration/migration_impl.hxx @@ -30,6 +30,7 @@ #include <vector> #include <algorithm> #include <memory> +#include <hash_map> #include "migration.hxx" @@ -41,6 +42,13 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/lang/XSingleComponentFactory.hpp> +#include <com/sun/star/lang/XSingleServiceFactory.hpp> +#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp> +#include <com/sun/star/ui/XUIConfigurationManager.hpp> +#include <com/sun/star/ui/XUIConfigurationPersistence.hpp> #define NS_CSS com::sun::star #define NS_UNO com::sun::star::uno @@ -80,6 +88,107 @@ typedef std::vector< migration_step > migrations_v; typedef std::auto_ptr< migrations_v > migrations_vr; typedef std::vector< supported_migration > migrations_available; +//__________________________________________ +/** + define the item, e.g.:menuitem, toolbaritem, to be migrated. we keep the information + of the command URL, the previous sibling node and the parent node of a item +*/ +struct MigrationItem +{ + ::rtl::OUString m_sParentNodeName; + ::rtl::OUString m_sPrevSibling; + ::rtl::OUString m_sCommandURL; + NS_UNO::Reference< NS_CSS::container::XIndexContainer > m_xPopupMenu; + + MigrationItem() + :m_xPopupMenu(0) + { + } + + MigrationItem(const ::rtl::OUString& sParentNodeName, + const ::rtl::OUString& sPrevSibling, + const ::rtl::OUString& sCommandURL, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer > xPopupMenu) + { + m_sParentNodeName = sParentNodeName; + m_sPrevSibling = sPrevSibling; + m_sCommandURL = sCommandURL; + m_xPopupMenu = xPopupMenu; + } + + MigrationItem& operator=(const MigrationItem& aMigrationItem) + { + m_sParentNodeName = aMigrationItem.m_sParentNodeName; + m_sPrevSibling = aMigrationItem.m_sPrevSibling; + m_sCommandURL = aMigrationItem.m_sCommandURL; + m_xPopupMenu = aMigrationItem.m_xPopupMenu; + + return *this; + } + + sal_Bool operator==(const MigrationItem& aMigrationItem) + { + return ( aMigrationItem.m_sParentNodeName == m_sParentNodeName && + aMigrationItem.m_sPrevSibling == m_sPrevSibling && + aMigrationItem.m_sCommandURL == m_sCommandURL && + aMigrationItem.m_xPopupMenu.is() == m_xPopupMenu.is() ); + } + + ::rtl::OUString GetPrevSibling() const { return m_sPrevSibling; } +}; + +typedef ::std::hash_map< ::rtl::OUString, + ::std::vector< MigrationItem >, + ::rtl::OUStringHash, + ::std::equal_to< ::rtl::OUString > > MigrationHashMap; + +struct MigrationItemInfo +{ + ::rtl::OUString m_sResourceURL; + MigrationItem m_aMigrationItem; + + MigrationItemInfo(){} + + MigrationItemInfo(const ::rtl::OUString& sResourceURL, const MigrationItem& aMigratiionItem) + { + m_sResourceURL = sResourceURL; + m_aMigrationItem = aMigratiionItem; + } +}; + +//__________________________________________ +/** + information for the UI elements to be migrated for one module +*/ +struct MigrationModuleInfo +{ + ::rtl::OUString sModuleShortName; + sal_Bool bHasMenubar; + ::std::vector< ::rtl::OUString > m_vToolbars; + + MigrationModuleInfo():bHasMenubar(sal_False){}; +}; + +//__________________________________________ +/** + get the information before copying the ui configuration files of old version to new version +*/ +class NewVersionUIInfo +{ +public: + + NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager > getConfigManager(const ::rtl::OUString& sModuleShortName) const; + NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewMenubarSettings(const ::rtl::OUString& sModuleShortName) const; + NS_UNO::Reference< NS_CSS::container::XIndexContainer > getNewToolbarSettings(const ::rtl::OUString& sModuleShortName, const ::rtl::OUString& sToolbarName) const; + void init(const ::std::vector< MigrationModuleInfo >& vModulesInfo); + +private: + + NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lCfgManagerSeq; + NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionMenubarSettingsSeq; + NS_UNO::Sequence< NS_CSS::beans::PropertyValue > m_lNewVersionToolbarSettingsSeq; +}; + class MigrationImpl { @@ -91,6 +200,9 @@ private: migrations_vr m_vrMigrations; // list of all migration specs from config install_info m_aInfo; // info about the version being migrated strings_vr m_vrFileList; // final list of files to be copied + MigrationHashMap m_aOldVersionItemsHashMap; + MigrationHashMap m_aNewVersionItemsHashMap; + ::rtl::OUString m_sModuleIdentifier; // functions to control the migration process bool readAvailableMigrations(migrations_available&); @@ -105,6 +217,16 @@ private: strings_vr applyPatterns(const strings_v& vSet, const strings_v& vPatterns) const; NS_UNO::Reference< NS_CSS::container::XNameAccess > getConfigAccess(const sal_Char* path, sal_Bool rw=sal_False); + ::std::vector< MigrationModuleInfo > dectectUIChangesForAllModules() const; + void compareOldAndNewConfig(const ::rtl::OUString& sParentNodeName, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xOldIndexContainer, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer >& xNewIndexContainer, + const ::rtl::OUString& sToolbarName); + void mergeOldToNewVersion(const NS_UNO::Reference< NS_CSS::ui::XUIConfigurationManager >& xCfgManager, + const NS_UNO::Reference< NS_CSS::container::XIndexContainer>& xIndexContainer, + const ::rtl::OUString& sModuleIdentifier, + const ::rtl::OUString& sResourceURL); + // actual processing function that perform the migration steps void copyFiles(); void copyConfig(); diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx index 11cc61ed84ff..53ec488c2082 100644 --- a/desktop/source/migration/pages.cxx +++ b/desktop/source/migration/pages.cxx @@ -357,9 +357,9 @@ MigrationPage::MigrationPage( m_ftBody.SetText( aText ); } -sal_Bool MigrationPage::commitPage( CommitPageReason _eReason ) +sal_Bool MigrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason ) { - if (_eReason == eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone) + if (_eReason == svt::WizardTypes::eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone) { GetParent()->EnterWait(); FirstStartWizard* pWizard = dynamic_cast< FirstStartWizard* >( GetParent() ); @@ -433,7 +433,7 @@ UserPage::UserPage( svt::OWizardMachine* parent, const ResId& resid) } } -sal_Bool UserPage::commitPage( CommitPageReason ) +sal_Bool UserPage::commitPage( svt::WizardTypes::CommitPageReason ) { SvtUserOptions aUserOpt; aUserOpt.SetFirstName(m_edFirst.GetText()); @@ -463,9 +463,9 @@ UpdateCheckPage::UpdateCheckPage( svt::OWizardMachine* parent, const ResId& resi _setBold(m_ftHead); } -sal_Bool UpdateCheckPage::commitPage( CommitPageReason _eReason ) +sal_Bool UpdateCheckPage::commitPage( svt::WizardTypes::CommitPageReason _eReason ) { - if ( _eReason == eTravelForward ) + if ( _eReason == svt::WizardTypes::eTravelForward ) { try { Reference < XNameReplace > xUpdateAccess; @@ -589,9 +589,9 @@ void RegistrationPage::updateButtonStates() m_rbNever.Show( m_bNeverVisible ); } -sal_Bool RegistrationPage::commitPage( CommitPageReason _eReason ) +sal_Bool RegistrationPage::commitPage( svt::WizardTypes::CommitPageReason _eReason ) { - if ( _eReason == eFinish ) + if ( _eReason == svt::WizardTypes::eFinish ) { ::utl::RegOptions aOptions; rtl::OUString aEvent; @@ -665,7 +665,7 @@ void RegistrationPage::executeSingleMode() // the registration modes "Now" and "Later" are handled by the page RegistrationPage::RegistrationMode eMode = pPage->getRegistrationMode(); if ( eMode == RegistrationPage::rmNow || eMode == RegistrationPage::rmLater ) - pPage->commitPage( IWizardPage::eFinish ); + pPage->commitPage( WizardTypes::eFinish ); if ( eMode != RegistrationPage::rmLater ) ::utl::RegOptions().removeReminder(); } diff --git a/desktop/source/migration/pages.hxx b/desktop/source/migration/pages.hxx index 9740773fe602..776268eb475c 100644 --- a/desktop/source/migration/pages.hxx +++ b/desktop/source/migration/pages.hxx @@ -125,7 +125,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > m_xThrobber; public: MigrationPage( svt::OWizardMachine* parent, const ResId& resid, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > xThrobber ); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason ); protected: virtual void ActivatePage(); @@ -148,7 +148,7 @@ private: public: UserPage( svt::OWizardMachine* parent, const ResId& resid); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason ); protected: virtual void ActivatePage(); }; @@ -161,7 +161,7 @@ private: CheckBox m_cbUpdateCheck; public: UpdateCheckPage( svt::OWizardMachine* parent, const ResId& resid); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason ); protected: virtual void ActivatePage(); @@ -188,7 +188,7 @@ protected: virtual bool canAdvance() const; virtual void ActivatePage(); - virtual sal_Bool commitPage( CommitPageReason _eReason ); + virtual sal_Bool commitPage( svt::WizardTypes::CommitPageReason _eReason ); public: RegistrationPage( Window* parent, const ResId& resid); diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx index 11bf8129cc04..b7da88b85013 100755..100644 --- a/desktop/source/migration/services/oo3extensionmigration.cxx +++ b/desktop/source/migration/services/oo3extensionmigration.cxx @@ -139,17 +139,7 @@ OO3ExtensionMigration::~OO3ExtensionMigration() } } -void OO3ExtensionMigration::registerConfigurationPackage( const uno::Reference< deployment::XPackage > & xPkg) -{ - const ::rtl::OUString sMediaType = xPkg->getPackageType()->getMediaType(); - if ( (sMediaType.equals(sConfigurationDataType) || sMediaType.equals(sConfigurationSchemaType) ) ) - { - xPkg->revokePackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ()); - xPkg->registerPackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ()); - } -} - - void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions ) +void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions ) { osl::Directory aScanRootDir( sSourceDir ); osl::FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL); @@ -382,35 +372,6 @@ bool OO3ExtensionMigration::migrateExtension( const ::rtl::OUString& sSourceDir return false; } -bool OO3ExtensionMigration::copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir ) -{ - bool bRet = false; - - INetURLObject aSourceObj( sSourceDir ); - INetURLObject aDestObj( sTargetDir ); - String aName = aDestObj.getName(); - aDestObj.removeSegment(); - aDestObj.setFinalSlash(); - - try - { - ::ucbhelper::Content aDestPath( aDestObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () ); - uno::Reference< ucb::XCommandInfo > xInfo = aDestPath.getCommands(); - ::rtl::OUString aTransferName = ::rtl::OUString::createFromAscii( "transfer" ); - if ( xInfo->hasCommandByName( aTransferName ) ) - { - aDestPath.executeCommand( aTransferName, uno::makeAny( - ucb::TransferInfo( sal_False, aSourceObj.GetMainURL( INetURLObject::NO_DECODE ), aName, ucb::NameClash::OVERWRITE ) ) ); - bRet = true; - } - } - catch( uno::Exception& ) - { - } - - return bRet; -} - // ----------------------------------------------------------------------------- // XServiceInfo @@ -496,32 +457,6 @@ TStringVectorPtr getContent( const ::rtl::OUString& rBaseURL ) return aResult; } -// ----------------------------------------------------------------------------- -// XJob -// ----------------------------------------------------------------------------- - -void OO3ExtensionMigration::copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir ) -{ - ::rtl::OUString sEx1( m_sSourceDir ); - sEx1 += sExcludeDir1; - ::rtl::OUString sEx2( m_sSourceDir ); - sEx2 += sExcludeDir2; - - TStringVectorPtr aList = getContent( sSourceDir ); - TStringVector::const_iterator aI = aList->begin(); - while ( aI != aList->end() ) - { - ::rtl::OUString sSourceLocalName = aI->copy( sSourceDir.getLength() ); - ::rtl::OUString aTemp = aI->copy( m_sSourceDir.getLength() ); - if ( aTemp != sExcludeDir1 && aTemp != sExcludeDir2 ) - { - ::rtl::OUString sTargetName = sTargetDir + sSourceLocalName; - copy( (*aI), sTargetName ); - } - ++aI; - } -} - Any OO3ExtensionMigration::execute( const Sequence< beans::NamedValue >& ) throw (lang::IllegalArgumentException, Exception, RuntimeException) { @@ -559,12 +494,6 @@ TmpRepositoryCommandEnv::TmpRepositoryCommandEnv() { } -TmpRepositoryCommandEnv::TmpRepositoryCommandEnv( - uno::Reference< task::XInteractionHandler> const & handler) - : m_forwardHandler(handler) -{ -} - TmpRepositoryCommandEnv::~TmpRepositoryCommandEnv() { } diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx index a001f41d92c5..fb7e69c2b87f 100755..100644 --- a/desktop/source/migration/services/oo3extensionmigration.hxx +++ b/desktop/source/migration/services/oo3extensionmigration.hxx @@ -97,16 +97,10 @@ namespace migration }; ::osl::FileBase::RC checkAndCreateDirectory( INetURLObject& rDirURL ); - void copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir ); - bool copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir ); ScanResult scanExtensionFolder( const ::rtl::OUString& sExtFolder ); void scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions ); bool scanDescriptionXml( const ::rtl::OUString& sDescriptionXmlFilePath ); bool migrateExtension( const ::rtl::OUString& sSourceDir ); - /* fills m_scriptElements and m_dialogElements - */ - void registerConfigurationPackage( - const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > & xPkg); public: OO3ExtensionMigration(::com::sun::star::uno::Reference< @@ -142,8 +136,6 @@ namespace migration public: virtual ~TmpRepositoryCommandEnv(); TmpRepositoryCommandEnv(); - TmpRepositoryCommandEnv( - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> const & handler); // XCommandEnvironment virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx index 48ee2abc71ca..81a789a613b9 100644 --- a/desktop/source/migration/wizard.cxx +++ b/desktop/source/migration/wizard.cxx @@ -219,11 +219,6 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep defaultButton(WZB_NEXT); } -void FirstStartWizard::EnableButtonsWhileMigration() -{ - enableButtons(0xff, sal_True); -} - void FirstStartWizard::DisableButtonsWhileMigration() { enableButtons(0xff, sal_False); @@ -439,10 +434,10 @@ sal_Bool FirstStartWizard::leaveState(WizardState) return sal_True; } -sal_Bool FirstStartWizard::onFinish(sal_Int32 _nResult) +sal_Bool FirstStartWizard::onFinish() { // return sal_True; - if (svt::RoadmapWizard::onFinish(_nResult)) + if ( svt::RoadmapWizard::onFinish() ) { #ifndef OS2 // cannot enable quickstart on first startup, see shutdownicon.cxx comments. enableQuickstart(); diff --git a/desktop/source/migration/wizard.hxx b/desktop/source/migration/wizard.hxx index e41bfe373cde..3317880f8bd6 100644 --- a/desktop/source/migration/wizard.hxx +++ b/desktop/source/migration/wizard.hxx @@ -62,7 +62,6 @@ public: virtual short Execute(); virtual long PreNotify( NotifyEvent& rNEvt ); - void EnableButtonsWhileMigration(); void DisableButtonsWhileMigration(); private: @@ -97,7 +96,7 @@ protected: virtual TabPage* createPage(WizardState _nState); virtual sal_Bool prepareLeaveCurrentState( CommitPageReason _eReason ); virtual sal_Bool leaveState(WizardState _nState ); - virtual sal_Bool onFinish(sal_Int32 _nResult); + virtual sal_Bool onFinish(); virtual void enterState(WizardState _nState); // from svt::RoadmapWizard |