diff options
Diffstat (limited to 'desktop/source/deployment')
-rw-r--r-- | desktop/source/deployment/dp_xml.cxx | 209 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui.hrc | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.cxx | 18 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_dialog2.src | 12 | ||||
-rwxr-xr-x[-rw-r--r--] | desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | desktop/source/deployment/gui/dp_gui_extlistbox.hxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_service.cxx | 8 | ||||
-rw-r--r-- | desktop/source/deployment/inc/dp_descriptioninfoset.hxx | 10 | ||||
-rw-r--r-- | desktop/source/deployment/inc/dp_xml.h | 104 | ||||
-rw-r--r-- | desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 6 |
10 files changed, 49 insertions, 333 deletions
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 21ec1ce46ff5..71fda4d9b3e0 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -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/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 { |