summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2010-06-22 09:36:55 +0200
committerJoachim Lingner <jl@openoffice.org>2010-06-22 09:36:55 +0200
commit084b4499451860a5c17cc43e3516730266acb923 (patch)
tree5c064bebfd2235d87274204483fff3167ee4ed9a /desktop
parent22dedfaadf4a53093a9ccbccbf3a70f78b1dbb06 (diff)
parent34dd33af79caf3a13ec3a4e7098616ac0b16cf50 (diff)
jl152 merge with DEV300_m83
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx17
-rw-r--r--desktop/source/deployment/dp_xml.cxx209
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_dialog2.cxx20
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_service.cxx8
-rw-r--r--desktop/source/deployment/gui/makefile.mk1
-rw-r--r--desktop/source/deployment/inc/dp_descriptioninfoset.hxx10
-rw-r--r--desktop/source/deployment/inc/dp_xml.h104
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx6
-rw-r--r--desktop/source/deployment/misc/dp_platform.cxx6
-rw-r--r--desktop/source/migration/migration.cxx589
-rw-r--r--desktop/source/migration/migration_impl.hxx122
-rw-r--r--desktop/source/migration/pages.cxx16
-rw-r--r--desktop/source/migration/pages.hxx8
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/oo3extensionmigration.cxx61
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/oo3extensionmigration.hxx4
-rw-r--r--desktop/source/migration/wizard.cxx9
-rw-r--r--desktop/source/migration/wizard.hxx3
17 files changed, 772 insertions, 421 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 5e0460891c30..bba615e0ebbc 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -362,6 +362,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
@@ -425,6 +427,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_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index d57fbdb9f4ed..1a66ff38e4a4 100755
--- 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"
@@ -229,7 +229,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();
@@ -247,21 +250,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_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index c4269e6ac137..29bedf1b229f 100755
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -93,6 +93,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 > {};
}
@@ -108,6 +110,7 @@ void ReplaceProductNameHookProc( String& rStr )
String &rVersion = Version::get();
String &rAboutBoxVersion = AboutBoxVersion::get();
String &rExtension = Extension::get();
+ String &rOOOVendor = OOOVendor::get();
if ( !rProductName.Len() )
{
@@ -124,6 +127,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 );
@@ -136,6 +143,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 3d2d56cad00a..37e616bb1a0b 100644
--- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
+++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
@@ -217,16 +217,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;
-
bool hasDescription() const;
private:
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 d97b400f4609..b4132db61f03 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -512,12 +512,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 0b757212eaa6..2e3a8d1d518c 100755..100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -373,35 +373,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
@@ -487,32 +458,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)
{
@@ -550,12 +495,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 7962da177217..03995652888c 100755..100644
--- a/desktop/source/migration/services/oo3extensionmigration.hxx
+++ b/desktop/source/migration/services/oo3extensionmigration.hxx
@@ -97,8 +97,6 @@ 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 );
@@ -138,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