[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - basic/source comphelper/source dbaccess/source filter/source forms/source framework/source scripting/source sd/source svx/source ucb/source u
basic/source/basmgr/basicmanagerrepository.cxx|3 - basic/source/uno/dlgcont.cxx |2 basic/source/uno/namecont.cxx | 10 ++-- comphelper/source/processfactory/processfactory.cxx |4 - dbaccess/source/core/dataaccess/connection.cxx|2 filter/source/svg/svgexport.cxx |6 +- filter/source/svg/svgwriter.cxx | 10 ++-- forms/source/misc/InterfaceContainer.cxx |2 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx | 23 ++ framework/source/uiconfiguration/uiconfigurationmanager.cxx | 17 --- framework/source/uifactory/menubarfactory.cxx |2 framework/source/uifactory/uielementfactorymanager.cxx|2 scripting/source/dlgprov/dlgprov.cxx |4 - scripting/source/stringresource/stringresource.cxx|4 - sd/source/core/sdpage2.cxx|4 - sd/source/ui/view/ViewShellBase.cxx |2 svx/source/form/fmobj.cxx |2 svx/source/form/fmshimp.cxx |4 - svx/source/form/fmtools.cxx |2 svx/source/form/fmundo.cxx|4 - svx/source/form/fmvwimp.cxx |2 svx/source/form/formcontroller.cxx|6 +- svx/source/form/navigatortree.cxx |2 ucb/source/ucp/file/bc.cxx|2 ucb/source/ucp/file/filglob.cxx |8 +-- ucb/source/ucp/ftp/ftpcontent.cxx |2 unotools/source/config/configitem.cxx |2 xmloff/source/text/txtparai.cxx |2 28 files changed, 73 insertions(+), 62 deletions(-) New commits: commit b0c1ad45408de8d328ce4c6d707ec7ab3b62dbc6 Author: Noel Grandin n...@peralex.com Date: Wed Jun 25 08:43:20 2014 +0200 fixes for up-casting to ReferenceXInterface Fix regressions introduced with 6a043e9c0acff20e1618ca8ec15c21d5d0fd0d37 Use the new type-checking Reference constructor to reduce code noise Signed-off-by: Stephan Bergmann sberg...@redhat.com (cherry picked from commit 533c6cb6bad6ef0432e8eebbfd4daf90ef71f3b4) Conflicts: framework/source/uifactory/menubarfactory.cxx Change-Id: I85662856f21c810a7db497fe3b0e116f075b1687 Reviewed-on: https://gerrit.libreoffice.org/9921 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx index 4aece49..7228b8b 100644 --- a/basic/source/basmgr/basicmanagerrepository.cxx +++ b/basic/source/basmgr/basicmanagerrepository.cxx @@ -381,9 +381,10 @@ namespace basic // BasicManagerPointer ImplRepository::impl_getLocationForModel( const Reference XModel _rxDocumentModel ) { +Reference XInterface xNormalized( _rxDocumentModel, UNO_QUERY ); DBG_ASSERT( _rxDocumentModel.is(), ImplRepository::impl_getLocationForModel: invalid model! ); -BasicManagerPointer location = m_aStore[ _rxDocumentModel ]; +BasicManagerPointer location = m_aStore[ xNormalized ]; return location; } diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 1190f2d..c3ee643 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -240,7 +240,7 @@ void SfxDialogLibraryContainer::storeLibrariesToStorage( const uno::Reference e UNO_QUERY ); ::xmlscript::importDialogModel( xInput, xDialogModel, mxContext, mxOwnerDocument ); std::vector OUString vEmbeddedImageURLs; -GraphicObject::InspectForGraphicObjectImageURL( xDialogModel, vEmbeddedImageURLs ); +GraphicObject::InspectForGraphicObjectImageURL( ReferenceXInterface(xDialogModel, UNO_QUERY), vEmbeddedImageURLs ); if ( !vEmbeddedImageURLs.empty() ) { // Export the images to the storage diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 28efa64..dfdb2c9 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -297,7 +297,7 @@ void SAL_CALL NameContainer::addContainerListener( const Reference XContainerLi throw RuntimeException(addContainerListener
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - basic/source
basic/source/uno/namecont.cxx | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) New commits: commit adfd7805bc61ff4ec56f6570fc516ff3aad74a28 Author: Michael Stahl mst...@redhat.com Date: Wed May 21 19:43:46 2014 +0200 Revert fdo#67685 open xSourceLibrariesStor only when needed This reverts commit fc9080a0c60f263d00eb7fcda72b3c0a2ebb. This bug was apparently introduced by af34774d260a68fc02cd78ba90dd8d4afaf1a2a4, which will be reverted in the next commit. Change-Id: I81ccb5bf9cc7e29fbf1e66d02f38268ee1fd1d0c (cherry picked from commit 5ca4b9d51046b9b6a36b91c9abd0cc1e7c04b480) Reviewed-on: https://gerrit.libreoffice.org/9436 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 357f2e0..20e2bb3 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1871,6 +1871,21 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference embed::XSto DBG_UNHANDLED_EXCEPTION(); return; } + +// open the source storage which might be used to copy yet-unmodified libraries +try +{ +if ( mxStorage-hasByName( maLibrariesDir ) || bInplaceStorage ) +{ +xSourceLibrariesStor = mxStorage-openStorageElement( maLibrariesDir, + bInplaceStorage ? embed::ElementModes::READWRITE : embed::ElementModes::READ ); +} +} +catch( const uno::Exception ) +{ +DBG_UNHANDLED_EXCEPTION(); +return; +} } int iArray = 0; @@ -1999,21 +2014,6 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference embed::XSto // then we need to clean up the temporary storage we used for this if ( bInplaceStorage !sTempTargetStorName.isEmpty() ) { -// open the source storage which might be used to copy yet-unmodified libraries -try -{ -if ( mxStorage-hasByName( maLibrariesDir ) || bInplaceStorage ) -{ -xSourceLibrariesStor = mxStorage-openStorageElement( maLibrariesDir, - bInplaceStorage ? embed::ElementModes::READWRITE : embed::ElementModes::READ ); -} -} -catch( const uno::Exception ) -{ -DBG_UNHANDLED_EXCEPTION(); -return; -} - SAL_WARN_IF( !xSourceLibrariesStor.is(), basic, (SfxLibrariesContainer::storeLibraries_impl: unexpected: we should ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - basic/source sw/CppunitTest_sw_macros_test.mk sw/qa
basic/source/inc/namecont.hxx|4 ++ basic/source/inc/scriptcont.hxx |1 basic/source/uno/namecont.cxx| 17 +++--- basic/source/uno/scriptcont.cxx |6 +++ sw/CppunitTest_sw_macros_test.mk | 62 --- sw/qa/core/data/odt/fdo68983.odt |binary sw/qa/core/macros-test.cxx | 48 ++ 7 files changed, 103 insertions(+), 35 deletions(-) New commits: commit 9d2b0fd3424eaf8a685728aa7788e1148159714d Author: Michael Stahl mst...@redhat.com Date: Wed May 21 22:26:05 2014 +0200 fdo#68983: basic: if the library is not loaded fully, copy source storage Also fixes fdo#42899 and fdo#67685 in a different way; the previous fix for fdo#42899 caused the problem with password-protected libraries for which the password is not known: only the binary representation of the BAISC module was stored, not the source code; by simply copying from the source storage the problem can be avoided. It would be possible to ask for the password when storing, but that would not work when non-interactive (called via API). An alternative fix would be to pass in the SfxObjectShell::IsSetModifyEnabled() flag and actually reset the BASIC library's modify flag correctly, but that requires adding a parameter to XStorageBasedLibraryContainer::storeLibrariesToStorage(). (regression from af34774d260a68fc02cd78ba90dd8d4afaf1a2a4 ) (cherry picked from commit 5246fa262450f686674850c53df666422f441c86) Conflicts: basic/source/inc/namecont.hxx basic/source/inc/scriptcont.hxx basic/source/uno/namecont.cxx sw/CppunitTest_sw_macros_test.mk sw: use xsec_xmlsec.windows on WNT (cherry picked from commit 3e69b7bcd3e4a9cb1a29360c905e7fba96365999) Change-Id: I4701401f35171139fc2fe8d225d13d4e533091a0 Reviewed-on: https://gerrit.libreoffice.org/9437 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx index 0568a981..6a04d9d 100644 --- a/basic/source/inc/namecont.hxx +++ b/basic/source/inc/namecont.hxx @@ -582,7 +582,9 @@ private: sal_Bool mbReadOnlyLink; sal_Bool mbPreload; +protected: sal_Bool mbPasswordProtected; +private: sal_Bool mbPasswordVerified; bool mbDoc50Password; OUString maPassword; @@ -702,6 +704,8 @@ public: } protected: +virtual bool isLoadedStorable(); + virtual bool SAL_CALL isLibraryElementValid( ::com::sun::star::uno::Any aElement ) const = 0; }; diff --git a/basic/source/inc/scriptcont.hxx b/basic/source/inc/scriptcont.hxx index 357c663..d9abeb5 100644 --- a/basic/source/inc/scriptcont.hxx +++ b/basic/source/inc/scriptcont.hxx @@ -154,6 +154,7 @@ class SfxScriptLibrary : public SfxLibrary, public SfxScriptLibrary_BASE const ::com::sun::star::uno::Reference ::com::sun::star::task::XInteractionHandler xHandler ); virtual void storeResourcesToStorage( const ::com::sun::star::uno::Reference ::com::sun::star::embed::XStorage xStorage ); +virtual bool isLoadedStorable() SAL_OVERRIDE; public: SfxScriptLibrary diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 20e2bb3..28efa64 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1920,8 +1920,6 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference embed::XSto if( pImplLib-implIsModified() || bComplete ) { -// For the moment don't copy storage (as an optimisation ) -// but instead always write to storage from memory. // Testing pImplLib-implIsModified() is not reliable, // IMHO the value of pImplLib-implIsModified() should // reflect whether the library ( in-memory ) model @@ -1932,9 +1930,14 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference embed::XSto // temp storage when saving ( and later sets the root storage of the // library container ) and similar madness in dbaccess means some surgery // is required to make it possible to successfully use this optimisation -#if 0 +// It would be possible to do the implSetModified() call below only +// conditionally, but that would require an additional boolean to be +// passed in via the XStorageBasedDocument::storeLibrariesToStorage()... +// fdo#68983: If there's a password and the password is not known, only +// copying the storage works! // Can we simply copy the storage? -if( !mbOldInfoFormat !pImplLib-implIsModified() !mbOasis2OOoFormat xSourceLibrariesStor.is() ) +if (!mbOldInfoFormat !pImplLib-isLoadedStorable() +!mbOasis2OOoFormat xSourceLibrariesStor.is()) { try { @@ -1947,7 +1950,6 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference embed::XSto
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - basic/source
basic/source/sbx/sbxdec.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit d5af7aa995d5cea88649447d9828cca4b21b6596 Author: Thomas Arnhold tho...@arnhold.org Date: Tue May 13 05:22:47 2014 +0200 i#64348 basic: fix CDec() crash if string is empty Change-Id: I92e9472e14c00a6550081f0d58a352faa5b78b98 Reviewed-on: https://gerrit.libreoffice.org/9336 Tested-by: David Tardon dtar...@redhat.com Reviewed-by: David Tardon dtar...@redhat.com diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx index 276b788..25d7936 100644 --- a/basic/source/sbx/sbxdec.cxx +++ b/basic/source/sbx/sbxdec.cxx @@ -194,6 +194,8 @@ void SbxDecimal::setUInt( unsigned int val ) bool SbxDecimal::setString( OUString* pOUString ) { +assert(pOUString); + static LCID nLANGID = MAKELANGID( LANG_ENGLISH, SUBLANG_ENGLISH_US ); // Convert delimiter @@ -472,7 +474,9 @@ start: case SbxLPSTR: case SbxSTRING: case SbxBYREF | SbxSTRING: -pnDecRes-setString( p-pOUString ); break; +if( p-pOUString ) +pnDecRes-setString( p-pOUString ); +break; case SbxOBJECT: { SbxValue* pVal = PTR_CAST(SbxValue,p-pObj); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - basic/source
basic/source/comp/token.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 4ffa47d9c1dafac4712b7fcac9a7df25b3392386 Author: Markus Mohrhard markus.mohrh...@collabora.co.uk Date: Tue Feb 11 00:32:32 2014 +0100 fix crash when importing unsupported macro content, related fdo#59374 Change-Id: I960c8174454074fd9ddb27fb17244d782c4cb24c Reviewed-on: https://gerrit.libreoffice.org/8038 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx index bc0519d..51633c8 100644 --- a/basic/source/comp/token.cxx +++ b/basic/source/comp/token.cxx @@ -359,6 +359,12 @@ SbiToken SbiTokenizer::Next() { return eCurTok = FIXSTRING; } +else if( aSym.isEmpty() ) +{ +//something went wrong +bEof = bEos = true; +return eCurTok = EOLN; +} // Special cases of characters that are between Z and a. ICompare() // evaluates the position of these characters in different ways. else if( aSym[0] == '^' ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - basic/source
basic/source/runtime/methods.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 7713dfc9b50b88cf2548d49e65b099a6a81e9d65 Author: Julien Nabet serval2...@yahoo.fr Date: Sun Jan 19 21:56:40 2014 +0100 Resolves: fdo#73771 Non-standard behaviour for Function Mid Change-Id: I90be516235228574dc219447a0eef3a34f83bee2 Reviewed-on: https://gerrit.libreoffice.org/7539 Reviewed-by: Caolán McNamara caol...@redhat.com Tested-by: Caolán McNamara caol...@redhat.com (cherry picked from commit ff48f28f71609b0ab4e6b8bc79818f765e48fddd) diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 5351606..ac4b9c4 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -1302,7 +1302,8 @@ RTLFUNC(Mid) { nLen = aArgStr.getLength() - nStartPos; } -aResultStr = aArgStr.copy( nStartPos, nLen ); +if (nLen 0) +aResultStr = aArgStr.copy( nStartPos, nLen ); } rPar.Get(0)-PutString( aResultStr ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - basic/source
basic/source/runtime/methods1.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5bf6064e69f1903f0d7682965b59fb5a0acb0af2 Author: Andras Timar andras.ti...@collabora.com Date: Thu Jan 16 17:00:06 2014 +0100 Environment variables can contain 127 characters Change-Id: Iaeb690429d835ab2e6c13a8890a1b27b9405796a Reviewed-on: https://gerrit.libreoffice.org/7476 Reviewed-by: Fridrich Strba fridr...@documentfoundation.org Tested-by: Fridrich Strba fridr...@documentfoundation.org diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 78ac359..43384ae 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -1326,7 +1326,7 @@ RTLFUNC(Environ) const char* pEnvStr = getenv(aByteStr.getStr()); if ( pEnvStr ) { -aResult = OUString::createFromAscii( pEnvStr ); +aResult = OUString(pEnvStr, strlen(pEnvStr), osl_getThreadTextEncoding()); } rPar.Get(0)-PutString( aResult ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - basic/source include/vcl vcl/source
basic/source/runtime/methods.cxx |2 +- include/vcl/msgbox.hxx |2 ++ vcl/source/window/msgbox.cxx |8 3 files changed, 11 insertions(+), 1 deletion(-) New commits: commit ea616972c06dec25b1baeb6b7d674c71c7af52fc Author: Herbert Dürr h...@apache.org Date: Mon Dec 2 12:33:06 2013 + Resolves: #i74854# fix buttons in MsgBox with info icon Patch by: hanya.r...@gmail.com Found by: o...@catcons.co.uk Tested by: h...@apache.org (cherry picked from commit 02cc651a1b45cbfbdab0aca6b57bff7bdf9e4f2c) Conflicts: basic/source/runtime/methods.cxx vcl/inc/vcl/msgbox.hxx Change-Id: I1656263e189f1a6cfa58436741bfa74ae0e6fffa (cherry picked from commit 3a437baee23d45ab64d557fed75e2e1b14aa5541) diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 083152b..5351606 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -4631,7 +4631,7 @@ RTLFUNC(MsgBox) pBox = new WarningBox( pParent, nWinBits, aMsg ); break; case 64: -pBox = new InfoBox( pParent, aMsg ); +pBox = new InfoBox( pParent, nWinBits, aMsg ); break; default: pBox = new MessBox( pParent, nWinBits, aTitle, aMsg ); diff --git a/include/vcl/msgbox.hxx b/include/vcl/msgbox.hxx index 58f818b..b1387f0 100644 --- a/include/vcl/msgbox.hxx +++ b/include/vcl/msgbox.hxx @@ -86,6 +86,8 @@ private: public: InfoBox( Window* pParent, const OUString rMessage ); InfoBox( Window* pParent, const ResId rResId ); +InfoBox( Window* pParent, WinBits nStyle, +const OUString rMessage ); static ImageGetStandardImage(); }; diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 0e95ea8..82e216a 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -456,6 +456,14 @@ InfoBox::InfoBox( Window* pParent, const ResId rResId ) : // --- +InfoBox::InfoBox( Window* pParent, WinBits nStyle, const OUString rMessage ) : +MessBox( pParent, nStyle, OUString(), rMessage ) +{ +ImplInitInfoBoxData(); +} + +// --- + Image InfoBox::GetStandardImage() { ImplInitMsgBoxImageList(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits