diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-15 09:16:51 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-15 09:16:51 +0100 |
commit | a94ddc5749d22d9e811ee03c5c42cf7950bc431e (patch) | |
tree | 71e5d3af21dfe17c0d019f82f01ca8d8b86c6c71 | |
parent | 8765a3bf9f2926a50d0f644e4263782269abe023 (diff) | |
parent | 4d4bfb28a75c7887a46fec3c0f71260781ae0471 (diff) |
dba33b: merge m69
-rw-r--r-- | comphelper/source/property/property.cxx | 23 | ||||
-rw-r--r-- | svtools/source/control/filectrl.cxx | 3 | ||||
-rw-r--r-- | svtools/source/uno/unoiface.cxx | 80 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindows.cxx | 6 | ||||
-rw-r--r-- | toolkit/source/controls/formattedcontrol.cxx | 1 | ||||
-rw-r--r-- | toolkit/source/controls/unocontrols.cxx | 2 | ||||
-rw-r--r-- | unotools/inc/unotools/confignode.hxx | 3 | ||||
-rw-r--r-- | unotools/source/config/confignode.cxx | 23 | ||||
-rw-r--r-- | vcl/inc/vcl/edit.hxx | 1 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 21 |
10 files changed, 65 insertions, 98 deletions
diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx index fe6cbaa9d767..14b3b8f9169d 100644 --- a/comphelper/source/property/property.cxx +++ b/comphelper/source/property/property.cxx @@ -38,15 +38,11 @@ #include <osl/diagnose.h> #if OSL_DEBUG_LEVEL > 0 - #ifndef _RTL_STRBUF_HXX_ #include <rtl/strbuf.hxx> - #endif - #ifndef _CPPUHELPER_EXC_HLP_HXX_ #include <cppuhelper/exc_hlp.hxx> - #endif - #ifndef _OSL_THREAD_H_ #include <osl/thread.h> - #endif + #include <com/sun/star/lang/XServiceInfo.hpp> + #include <typeinfo.h> #endif #include <com/sun/star/beans/PropertyAttribute.hpp> #include <com/sun/star/lang/IllegalArgumentException.hpp> @@ -71,6 +67,8 @@ namespace comphelper using ::com::sun::star::uno::cpp_queryInterface; using ::com::sun::star::uno::cpp_acquire; using ::com::sun::star::uno::cpp_release; + using ::com::sun::star::lang::XServiceInfo; + using ::com::sun::star::uno::UNO_QUERY; /** === end UNO using === **/ namespace PropertyAttribute = ::com::sun::star::beans::PropertyAttribute; @@ -110,7 +108,18 @@ void copyProperties(const Reference<XPropertySet>& _rxSource, ::rtl::OStringBuffer aBuffer; aBuffer.append( "::comphelper::copyProperties: could not copy property '" ); aBuffer.append( ::rtl::OString( pSourceProps->Name.getStr(), pSourceProps->Name.getLength(), RTL_TEXTENCODING_ASCII_US ) ); - aBuffer.append( "' to the destination set.\n" ); + aBuffer.append( "' to the destination set (a '" ); + + Reference< XServiceInfo > xSI( _rxDest, UNO_QUERY ); + if ( xSI.is() ) + { + aBuffer.append( ::rtl::OUStringToOString( xSI->getImplementationName(), osl_getThreadTextEncoding() ) ); + } + else + { + aBuffer.append( typeid( *_rxDest.get() ).name() ); + } + aBuffer.append( "' implementation).\n" ); Any aException( ::cppu::getCaughtException() ); aBuffer.append( "Caught an exception of type '" ); diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index d820dce097ed..f00cf45be0e6 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -78,6 +78,9 @@ WinBits FileControl::ImplInitStyle( WinBits nStyle ) maButton.SetStyle( (maButton.GetStyle()|WB_NOTABSTOP)&(~WB_TABSTOP) ); } + const WinBits nAlignmentStyle = ( WB_TOP | WB_VCENTER | WB_BOTTOM ); + maEdit.SetStyle( ( maEdit.GetStyle() & ~nAlignmentStyle ) | ( nStyle & nAlignmentStyle ) ); + if ( !(nStyle & WB_NOGROUP) ) nStyle |= WB_GROUP; diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index a1ff1ad2ac3e..9c7c3eec33d1 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -549,86 +549,6 @@ void VCLXMultiLineEdit::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) } // ---------------------------------------------------- -// class VCLXFileDialog -// ---------------------------------------------------- -/* -VCLXFileDialog::VCLXFileDialog() -{ -} - -VCLXFileDialog::~VCLXFileDialog() -{ -} - -::com::sun::star::uno::Any VCLXFileDialog::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) -{ - ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, - SAL_STATIC_CAST( ::com::sun::star::awt::XXX*, this ) ); - return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType )); -} - -// ::com::sun::star::lang::XTypeProvider -IMPL_XTYPEPROVIDER_START( VCLXFileDialog ) - getCppuType( ( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XXX>* ) NULL ) -IMPL_XTYPEPROVIDER_END - -void VCLXFileDialog::setPath( const ::rtl::OUString& rPath ) -{ - ::vos::OGuard aGuard( GetMutex() ); - - FileDialog* pDlg = (FileDialog*)GetWindow(); - if ( pDlg ) - pDlg->SetPath( ::rtl::OUStringToOString( rPath, CHARSET_SYSTEM ) ); -} - -::rtl::OUString VCLXFileDialog::getPath() -{ - ::vos::OGuard aGuard( GetMutex() ); - - ::rtl::OUString aPath; - FileDialog* pDlg = (FileDialog*)GetWindow(); - if ( pDlg ) - aPath = StringToOUString( pDlg->GetPath(), CHARSET_SYSTEM ); - return aPath; -} - -void VCLXFileDialog::setFilters( const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rFilterNames, const ::com::sun::star::uno::Sequence< ::rtl::OUString>& rMasks ) -{ - ::vos::OGuard aGuard( GetMutex() ); - - FileDialog* pDlg = (FileDialog*)GetWindow(); - if ( pDlg ) - { - sal_uInt32 nFlts = rFilterNames.getLength(); - for ( sal_uInt32 n = 0; n < nFlts; n++ ) - pDlg->AddFilter( - ::rtl::OUStringToOString( rFilterNames.getConstArray()[n], CHARSET_SYSTEM ), - ::rtl::OUStringToOString( rMasks.getConstArray()[n], CHARSET_SYSTEM ) ); - } -} - -void VCLXFileDialog::setCurrentFilter( const ::rtl::OUString& rFilterName ) -{ - ::vos::OGuard aGuard( GetMutex() ); - - FileDialog* pDlg = (FileDialog*)GetWindow(); - if ( pDlg ) - pDlg->SetCurFilter( ::rtl::OUStringToOString( rFilterName, CHARSET_SYSTEM ) ); -} - -::rtl::OUString VCLXFileDialog::getCurrentFilter() -{ - ::vos::OGuard aGuard( GetMutex() ); - - ::rtl::OUString aFilter; - FileDialog* pDlg = (FileDialog*)GetWindow(); - if ( pDlg ) - aFilter = StringToOUString( pDlg->GetCurFilter(), CHARSET_SYSTEM ); - return aFilter; -} -*/ - -// ---------------------------------------------------- // class VCLXFileControl // ---------------------------------------------------- VCLXFileControl::VCLXFileControl() : maTextListeners( *this ) diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 7757d170256a..e41de1e8bd25 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -3390,6 +3390,7 @@ void VCLXEdit::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_PAINTTRANSPARENT, BASEPROPERTY_AUTOHSCROLL, BASEPROPERTY_AUTOVSCROLL, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, 0); @@ -4283,6 +4284,7 @@ void VCLXDateField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_ENFORCE_FORMAT, BASEPROPERTY_TEXT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, @@ -4624,6 +4626,7 @@ void VCLXTimeField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_ENFORCE_FORMAT, BASEPROPERTY_TEXT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, @@ -4927,6 +4930,7 @@ void VCLXNumericField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_VALUE_DOUBLE, BASEPROPERTY_ENFORCE_FORMAT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, @@ -5521,6 +5525,7 @@ void VCLXCurrencyField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_VALUE_DOUBLE, BASEPROPERTY_ENFORCE_FORMAT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, @@ -5868,6 +5873,7 @@ void VCLXPatternField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_TABSTOP, BASEPROPERTY_TEXT, BASEPROPERTY_HIDEINACTIVESELECTION, + BASEPROPERTY_VERTICALALIGN, BASEPROPERTY_WRITING_MODE, BASEPROPERTY_CONTEXT_WRITING_MODE, BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR, diff --git a/toolkit/source/controls/formattedcontrol.cxx b/toolkit/source/controls/formattedcontrol.cxx index 6171067f1185..5ac7a0237479 100644 --- a/toolkit/source/controls/formattedcontrol.cxx +++ b/toolkit/source/controls/formattedcontrol.cxx @@ -160,6 +160,7 @@ namespace toolkit ImplRegisterProperty( BASEPROPERTY_TEXTCOLOR ); ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION ); ImplRegisterProperty( BASEPROPERTY_ENFORCE_FORMAT ); + ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN ); ImplRegisterProperty( BASEPROPERTY_WRITING_MODE ); ImplRegisterProperty( BASEPROPERTY_CONTEXT_WRITING_MODE ); ImplRegisterProperty( BASEPROPERTY_MOUSE_WHEEL_BEHAVIOUR ); diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx index 3abacef7b67f..9e508c884f59 100644 --- a/toolkit/source/controls/unocontrols.cxx +++ b/toolkit/source/controls/unocontrols.cxx @@ -476,6 +476,7 @@ void UnoEditControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) t // ---------------------------------------------------- UnoControlFileControlModel::UnoControlFileControlModel() { + ImplRegisterProperty( BASEPROPERTY_ALIGN ); ImplRegisterProperty( BASEPROPERTY_BACKGROUNDCOLOR ); ImplRegisterProperty( BASEPROPERTY_BORDER ); ImplRegisterProperty( BASEPROPERTY_BORDERCOLOR ); @@ -489,6 +490,7 @@ UnoControlFileControlModel::UnoControlFileControlModel() ImplRegisterProperty( BASEPROPERTY_READONLY ); ImplRegisterProperty( BASEPROPERTY_TABSTOP ); ImplRegisterProperty( BASEPROPERTY_TEXT ); + ImplRegisterProperty( BASEPROPERTY_VERTICALALIGN ); ImplRegisterProperty( BASEPROPERTY_WRITING_MODE ); ImplRegisterProperty( BASEPROPERTY_CONTEXT_WRITING_MODE ); ImplRegisterProperty( BASEPROPERTY_HIDEINACTIVESELECTION ); diff --git a/unotools/inc/unotools/confignode.hxx b/unotools/inc/unotools/confignode.hxx index 580274004e1a..2e305030fa2b 100644 --- a/unotools/inc/unotools/confignode.hxx +++ b/unotools/inc/unotools/confignode.hxx @@ -88,6 +88,9 @@ namespace utl /// dtor ~OConfigurationNode() {} + /// returns the local name of the node + ::rtl::OUString getLocalName() const; + /** open a sub node @param _rPath access path of the to-be-opened sub node. May be a hierarchical path. */ diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index 4b1b9fe272db..56d258461e95 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -41,6 +41,7 @@ #include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/util/XStringEscape.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/container/XNamed.hpp> #include <comphelper/extract.hxx> #include <rtl/string.hxx> #if OSL_DEBUG_LEVEL > 0 @@ -139,6 +140,22 @@ namespace utl } //------------------------------------------------------------------------ + ::rtl::OUString OConfigurationNode::getLocalName() const + { + ::rtl::OUString sLocalName; + try + { + Reference< XNamed > xNamed( m_xDirectAccess, UNO_QUERY_THROW ); + sLocalName = xNamed->getName(); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return sLocalName; + } + + //------------------------------------------------------------------------ ::rtl::OUString OConfigurationNode::normalizeName(const ::rtl::OUString& _rName, NAMEORIGIN _eOrigin) const { ::rtl::OUString sName(_rName); @@ -155,13 +172,9 @@ namespace utl else sName = xEscaper->unescapeString(sName); } - catch(IllegalArgumentException&) - { - OSL_ENSURE(sal_False, "OConfigurationNode::normalizeName: illegal argument (caught an exception saying so)!"); - } catch(Exception&) { - OSL_ENSURE(sal_False, "OConfigurationNode::normalizeName: caught an exception!"); + DBG_UNHANDLED_EXCEPTION(); } } } diff --git a/vcl/inc/vcl/edit.hxx b/vcl/inc/vcl/edit.hxx index fb99bd028631..ad6a4ee017d9 100644 --- a/vcl/inc/vcl/edit.hxx +++ b/vcl/inc/vcl/edit.hxx @@ -120,6 +120,7 @@ private: SAL_DLLPRIVATE void ImplCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard ); SAL_DLLPRIVATE void ImplPaste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard ); SAL_DLLPRIVATE long ImplGetExtraOffset() const; + SAL_DLLPRIVATE long ImplGetTextYPosition() const; SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > ImplGetInputSequenceChecker() const; SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > ImplGetBreakIterator() const; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index b654e034470f..0632dcdd3f41 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -492,6 +492,17 @@ void Edit::ImplInvalidateOrRepaint( xub_StrLen nStart, xub_StrLen nEnd ) // ----------------------------------------------------------------------- +long Edit::ImplGetTextYPosition() const +{ + if ( GetStyle() & WB_TOP ) + return ImplGetExtraOffset(); + else if ( GetStyle() & WB_BOTTOM ) + return GetOutputSizePixel().Height() - GetTextHeight() - ImplGetExtraOffset(); + return ( GetOutputSizePixel().Height() - GetTextHeight() ) / 2; +} + +// ----------------------------------------------------------------------- + void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout ) { if ( !IsReallyVisible() ) @@ -516,10 +527,8 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout ) GetCaretPositions( aText, pDX, nStart, nEnd ); } - // center vertically - long nH = GetOutputSize().Height(); long nTH = GetTextHeight(); - Point aPos( mnXOffset, (nH-nTH)/2 ); + Point aPos( mnXOffset, ImplGetTextYPosition() ); if( bLayout ) { @@ -1193,7 +1202,7 @@ void Edit::ImplShowCursor( BOOL bOnlyIfVisible ) long nCursorPosX = nTextPos + mnXOffset + ImplGetExtraOffset(); // Cursor muss im sichtbaren Bereich landen: - Size aOutSize = GetOutputSizePixel(); + const Size aOutSize = GetOutputSizePixel(); if ( (nCursorPosX < 0) || (nCursorPosX >= aOutSize.Width()) ) { long nOldXOffset = mnXOffset; @@ -1227,8 +1236,8 @@ void Edit::ImplShowCursor( BOOL bOnlyIfVisible ) ImplInvalidateOrRepaint(); } - long nTextHeight = GetTextHeight(); - long nCursorPosY = (aOutSize.Height()-nTextHeight) / 2; + const long nTextHeight = GetTextHeight(); + const long nCursorPosY = ImplGetTextYPosition(); pCursor->SetPos( Point( nCursorPosX, nCursorPosY ) ); pCursor->SetSize( Size( nCursorWidth, nTextHeight ) ); pCursor->Show(); |