diff options
author | Kurt Zenker <kz@openoffice.org> | 2010-01-15 15:13:13 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2010-01-15 15:13:13 +0100 |
commit | 93833bda424688b0c2f4313dac7b39c87633ed81 (patch) | |
tree | 0f4552c76953c114e4b9bedc3fb0a248f9657b6e | |
parent | 87b0ea36b52c37802c69666c2a3df7adf5f03e6c (diff) | |
parent | effbb4ce63a590f21f1ccccab4a1c0640c7be5a0 (diff) |
CWS-TOOLING: integrate CWS fwk120
-rw-r--r-- | framework/source/layoutmanager/layoutmanager.cxx | 1 | ||||
-rw-r--r-- | framework/source/services/backingwindow.cxx | 36 | ||||
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 3 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshap4.cxx | 4 | ||||
-rw-r--r-- | svx/source/unodraw/unoshape.cxx | 8 |
7 files changed, 54 insertions, 6 deletions
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 4d5f3c4b00..e3a5a5b977 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -245,6 +245,7 @@ bool LayoutManager::UIElement::operator< ( const LayoutManager::UIElement& aUIEl LayoutManager::UIElement& LayoutManager::UIElement::operator= ( const LayoutManager::UIElement& rUIElement ) { + if (this == &rUIElement) { return *this; } m_aType = rUIElement.m_aType; m_aName = rUIElement.m_aName; m_aUIName = rUIElement.m_aUIName; diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index 1c4324ef03..0a465e8e26 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -49,6 +49,7 @@ #include "comphelper/processfactory.hxx" #include "comphelper/sequenceashashmap.hxx" +#include "comphelper/configurationhelper.hxx" #include "rtl/strbuf.hxx" #include "rtl/ustrbuf.hxx" @@ -744,6 +745,41 @@ IMPL_LINK( BackingWindow, ToolboxHdl, void*, EMPTYARG ) //throws css::container::NoSuchElementException, css::lang::WrappedTargetException Any value( xNameAccess->getByName(rtl::OUString::createFromAscii(pNode)) ); sURL = value.get<rtl::OUString> (); + + // extend the URLs with Office locale argument + INetURLObject aURLObj( sURL ); + + rtl::OUString sParam = aURLObj.GetParam(); + rtl::OUStringBuffer aURLBuf( sParam ); + if ( sParam.getLength() > 0 ) + aURLBuf.appendAscii( "&" ); + aURLBuf.appendAscii( "lang=" ); + + // read locale from configuration + ::rtl::OUString sLocale; + ::rtl::OUString sPackage = ::rtl::OUString::createFromAscii("org.openoffice.Setup"); + ::rtl::OUString sRelPath = ::rtl::OUString::createFromAscii("L10N"); + ::rtl::OUString sKey = ::rtl::OUString::createFromAscii("ooLocale"); + + try + { + ::comphelper::ConfigurationHelper::readDirectKey(comphelper::getProcessServiceFactory(), + sPackage, + sRelPath, + sKey, + ::comphelper::ConfigurationHelper::E_READONLY) >>= sLocale; + } + catch(const com::sun::star::uno::RuntimeException& exRun) + { throw exRun; } + catch(const com::sun::star::uno::Exception&) + { sLocale = ::rtl::OUString::createFromAscii("en-US"); } + + aURLBuf.append(sLocale); + + sParam = aURLBuf.makeStringAndClear(); + + aURLObj.SetParam( sParam ); + sURL = aURLObj.GetMainURL( INetURLObject::NO_DECODE ); Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute( comphelper::getProcessServiceFactory()->createInstance( diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index cad9014c0a..850878c42f 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -801,7 +801,9 @@ IMPL_LINK( FileDialogHelper_Impl, TimeOutHdl_Impl, Timer*, EMPTYARG ) aData << aBmp; - Sequence < sal_Int8 > aBuffer( (sal_Int8*) aData.GetData(), aData.GetSize() ); + const Sequence < sal_Int8 > aBuffer( + static_cast< const sal_Int8* >(aData.GetData()), + aData.GetEndOfData() ); aAny <<= aBuffer; } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index dd8a8e2175..b90d70671a 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1749,7 +1749,8 @@ void SdrTextObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b // break up matrix basegfx::B2DTuple aScale; basegfx::B2DTuple aTranslate; - double fRotate, fShearX; + double fRotate(0.0); + double fShearX(0.0); rMatrix.decompose(aScale, aTranslate, fRotate, fShearX); // #i75086# Old DrawingLayer (GeoStat and geometry) does not support holding negative scalings diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 6a81a453aa..24939e20db 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -1820,7 +1820,9 @@ bool SvxGraphicObject::getPropertyValueImpl( const ::rtl::OUString& rName, const SvMemoryStream aDestStrm( 65535, 65535 ); ConvertGDIMetaFileToWMF( rGraphic.GetGDIMetaFile(), aDestStrm, NULL, sal_False ); - uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize()); + const uno::Sequence<sal_Int8> aSeq( + static_cast< const sal_Int8* >(aDestStrm.GetData()), + aDestStrm.GetEndOfData()); rValue <<= aSeq; } break; diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx index 96c2caec15..977a11442e 100644 --- a/svx/source/unodraw/unoshap4.cxx +++ b/svx/source/unodraw/unoshap4.cxx @@ -315,7 +315,9 @@ bool SvxOle2Shape::getPropertyValueImpl( const ::rtl::OUString& rName, const Sfx } SvMemoryStream aDestStrm( 65535, 65535 ); ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False ); - uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize()); + const uno::Sequence<sal_Int8> aSeq( + static_cast< const sal_Int8* >(aDestStrm.GetData()), + aDestStrm.GetEndOfData()); rValue <<= aSeq; } } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 3cebabe9de..3a33807362 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -681,7 +681,9 @@ uno::Any SvxShape::GetBitmap( sal_Bool bMetaFile /* = sal_False */ ) const throw { SvMemoryStream aDestStrm( 65535, 65535 ); ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False ); - uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize()); + const uno::Sequence<sal_Int8> aSeq( + static_cast< const sal_Int8* >(aDestStrm.GetData()), + aDestStrm.GetEndOfData()); aAny.setValue( &aSeq, ::getCppuType((const uno::Sequence< sal_Int8 >*)0) ); } else @@ -3122,7 +3124,9 @@ bool SvxShape::getPropertyValueImpl( const ::rtl::OUString&, const SfxItemProper } SvMemoryStream aDestStrm( 65535, 65535 ); ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, sal_False ); - uno::Sequence<sal_Int8> aSeq((sal_Int8*)aDestStrm.GetData(), aDestStrm.GetSize()); + const uno::Sequence<sal_Int8> aSeq( + static_cast< const sal_Int8* >(aDestStrm.GetData()), + aDestStrm.GetEndOfData()); rValue <<= aSeq; } } |