[Libreoffice-commits] .: framework/source
framework/source/fwi/helper/mischelper.cxx |4 ++-- framework/source/services/substitutepathvars.cxx |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 97760eb090ed7d5b9c05ac8ad02a27de1144ecc3 Author: Eike Rathke er...@redhat.com Date: Fri Nov 16 22:43:32 2012 +0100 use LanguageTag Change-Id: I1f0516cc17741e8f87655ad251930a9da7bdb205 diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx index 6292281..379ec36 100644 --- a/framework/source/fwi/helper/mischelper.cxx +++ b/framework/source/fwi/helper/mischelper.cxx @@ -26,7 +26,7 @@ #include tools/debug.hxx #include vcl/settings.hxx #include vcl/svapp.hxx -#include i18npool/mslangid.hxx +#include i18npool/languagetag.hxx #include svtools/langtab.hxx #include comphelper/processfactory.hxx #include helper/mischelper.hxx @@ -179,7 +179,7 @@ void FillLangItems( std::set OUString rLangItems, if ( xLangGuesser.is() !rGuessedTextLang.isEmpty()) { ::com::sun::star::lang::Locale aLocale(xLangGuesser-guessPrimaryLanguage( rGuessedTextLang, 0, rGuessedTextLang.getLength()) ); -LanguageType nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale ); +LanguageType nLang = LanguageTag( aLocale ).makeFallback().getLanguageType(); if (nLang != LANGUAGE_DONTKNOW nLang != LANGUAGE_NONE nLang != LANGUAGE_SYSTEM IsScriptTypeMatchingToLanguage( nScriptType, nLang )) rLangItems.insert( rLanguageTable.GetString( nLang )); diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index 7db7b97..08dd17f 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -34,7 +34,7 @@ #include osl/security.hxx #include osl/socket.hxx #include osl/process.h -#include i18npool/mslangid.hxx +#include i18npool/languagetag.hxx #include tools/urlobj.hxx #include tools/resmgr.hxx #include tools/wldcrd.hxx @@ -1193,7 +1193,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable // Detect the language type of the current office aPreDefPathVariables.m_eLanguageType = LANGUAGE_ENGLISH_US; rtl::OUString aLocaleStr( utl::ConfigManager::getLocale() ); -aPreDefPathVariables.m_eLanguageType = MsLangId::convertIsoStringToLanguage( aLocaleStr ); +aPreDefPathVariables.m_eLanguageType = LanguageTag( aLocaleStr ).getLanguageType(); // We used to have an else branch here with a LOG_ERROR, but that // always fired in some unit tests when this code was built with // debug=t, so it seems fairly pointless, especially as ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/dispatch/closedispatcher.cxx | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) New commits: commit 6f79b2e35be0778bfec3e1854483f2e9a68f68f3 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Tue Nov 6 14:46:04 2012 +0100 Revert if/else placement This reverts commit fd1e39cad891282e4343be4d5e80125d7954b347. I don't see how this cosmetic change can actually affect anything, but tinderbox #27 seems to claim one of the unittests fails because of this one single commits, so let's see. diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 95ecbff..7f9185e 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -319,21 +319,23 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) //by others. if ( ! xCloseFrame-getCreator().is()) bCloseFrame = sal_True; +else // b) The help window cant disagree with any request. //Because it doesnt implement a controller - it uses a window only. //Further t cant be the last open frame - if we do all other things //right inside this CloseDispatcher implementation. //= close it! -else if (aCheck1.m_bReferenceIsHelp) +if (aCheck1.m_bReferenceIsHelp) bCloseFrame = sal_True; +else // c) If we are already in backing mode, we have to terminate //the application, if this special frame is closed. //It doesnt matter, how many other frames (can be the help or hidden frames only) //are open then. //= terminate the application! -else if (aCheck1.m_bReferenceIsBacking) +if (aCheck1.m_bReferenceIsBacking) bTerminateApp = sal_True; else @@ -384,9 +386,10 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) sal_Bool bSuccess = sal_False; if (bCloseFrame) bSuccess = implts_closeFrame(); -else if (bEstablishBackingMode) -{ +else +if (bEstablishBackingMode) #if defined QUARTZ +{ // on mac close down, quickstarter keeps the process alive // however if someone has shut down the quickstarter // behave as any other platform @@ -408,11 +411,12 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) { } bSuccess = bQuickstarterRunning ? implts_terminateApplication() : implts_establishBackingMode(); +} #else bSuccess = implts_establishBackingMode(); #endif -} -else if (bTerminateApp) +else +if (bTerminateApp) bSuccess = implts_terminateApplication(); if ( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/dispatch/closedispatcher.cxx | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) New commits: commit fd1e39cad891282e4343be4d5e80125d7954b347 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Sat Nov 3 13:18:56 2012 +0100 if/else placement Change-Id: I1f1cd86b66123f9c14423de685263f295629e4b2 diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index 7f9185e..95ecbff 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -319,23 +319,21 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) //by others. if ( ! xCloseFrame-getCreator().is()) bCloseFrame = sal_True; -else // b) The help window cant disagree with any request. //Because it doesnt implement a controller - it uses a window only. //Further t cant be the last open frame - if we do all other things //right inside this CloseDispatcher implementation. //= close it! -if (aCheck1.m_bReferenceIsHelp) +else if (aCheck1.m_bReferenceIsHelp) bCloseFrame = sal_True; -else // c) If we are already in backing mode, we have to terminate //the application, if this special frame is closed. //It doesnt matter, how many other frames (can be the help or hidden frames only) //are open then. //= terminate the application! -if (aCheck1.m_bReferenceIsBacking) +else if (aCheck1.m_bReferenceIsBacking) bTerminateApp = sal_True; else @@ -386,10 +384,9 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) sal_Bool bSuccess = sal_False; if (bCloseFrame) bSuccess = implts_closeFrame(); -else -if (bEstablishBackingMode) -#if defined QUARTZ +else if (bEstablishBackingMode) { +#if defined QUARTZ // on mac close down, quickstarter keeps the process alive // however if someone has shut down the quickstarter // behave as any other platform @@ -411,12 +408,11 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback) { } bSuccess = bQuickstarterRunning ? implts_terminateApplication() : implts_establishBackingMode(); -} #else bSuccess = implts_establishBackingMode(); #endif -else -if (bTerminateApp) +} +else if (bTerminateApp) bSuccess = implts_terminateApplication(); if ( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source sw/source tools/source
framework/source/dispatch/dispatchprovider.cxx | 35 ++--- sw/source/core/bastyp/swcache.cxx | 16 +-- sw/source/core/graphic/ndgrf.cxx |2 - tools/source/inet/inetstrm.cxx |2 - 4 files changed, 24 insertions(+), 31 deletions(-) New commits: commit c348df5635c45fd446fa9a7e831581164e55be71 Author: Caolán McNamara caol...@redhat.com Date: Mon Oct 22 20:18:50 2012 +0100 loplugin: various warnings Change-Id: I605bffb518d804ee69edda5e7641e13e4c14ef01 diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx index f570dd2..1fb6019 100644 --- a/framework/source/dispatch/dispatchprovider.cxx +++ b/framework/source/dispatch/dispatchprovider.cxx @@ -246,12 +246,11 @@ css::uno::Reference css::frame::XDispatch DispatchProvider::implts_queryDeskt // Why is top here handled too? Because the desktop is the topest frame. Normaly it's superflous // to use this target - but we can handle it in the same manner then _self. //- -else -if ( -(sTargetFrameName==SPECIALTARGET_SELF) || -(sTargetFrameName==SPECIALTARGET_TOP ) || -(sTargetFrameName.isEmpty()) - ) +else if ( + (sTargetFrameName==SPECIALTARGET_SELF) || + (sTargetFrameName==SPECIALTARGET_TOP ) || + (sTargetFrameName.isEmpty()) +) { xDispatcher = implts_searchProtocolHandler(aURL); } @@ -274,10 +273,9 @@ css::uno::Reference css::frame::XDispatch DispatchProvider::implts_queryDeskt css::uno::Reference css::frame::XDispatchProvider xProvider( xFoundFrame, css::uno::UNO_QUERY ); xDispatcher = xProvider-queryDispatch(aURL,SPECIALTARGET_SELF,0); } -else // if it couldn't be found - but creation was allowed // use special dispatcher for creatio or froward it to the browser -if (nSearchFlags css::frame::FrameSearchFlag::CREATE) +else if (nSearchFlags css::frame::FrameSearchFlag::CREATE) xDispatcher = implts_getOrCreateDispatchHelper( E_CREATEDISPATCHER, xDesktop, sTargetFrameName, nSearchFlags ); } @@ -324,8 +322,7 @@ css::uno::Reference css::frame::XDispatch DispatchProvider::implts_queryFrame // I.II) _menubar // Special mode on frame or task to receive the local menu. Not supported by findFrame() //- -else -if (sTargetName==SPECIALTARGET_MENUBAR) +else if (sTargetName==SPECIALTARGET_MENUBAR) { xDispatcher = implts_getOrCreateDispatchHelper( E_MENUDISPATCHER, xFrame ); } @@ -335,8 +332,7 @@ css::uno::Reference css::frame::XDispatch DispatchProvider::implts_queryFrame // Special sub frame of a top frame only. Search or create it. ... OK it's currently a little bit HACKI. // Only the sfx (means the controller) can create it it. //- -else -if (sTargetName==SPECIALTARGET_BEAMER) +else if (sTargetName==SPECIALTARGET_BEAMER) { css::uno::Reference css::frame::XDispatchProvider xBeamer( xFrame-findFrame( SPECIALTARGET_BEAMER, css::frame::FrameSearchFlag::CHILDREN | css::frame::FrameSearchFlag::SELF ), css::uno::UNO_QUERY ); if (xBeamer.is()) @@ -357,8 +353,7 @@ css::uno::Reference css::frame::XDispatch DispatchProvider::implts_queryFrame // I.V) _parent // Our parent frame (if it exist) should handle this URL. //- -else -if (sTargetName==SPECIALTARGET_PARENT) +else if (sTargetName==SPECIALTARGET_PARENT) { css::uno::Reference css::frame::XDispatchProvider xParent( xFrame-getCreator(), css::uno::UNO_QUERY ); if (xParent.is()) @@ -371,8 +366,7 @@ css::uno::Reference css::frame::XDispatch DispatchProvider::implts_queryFrame // This request must be forwarded to any parent frame, till we reach a top frame. // If no parent exist, we can handle itself. //- -else -if (sTargetName==SPECIALTARGET_TOP) +else if (sTargetName==SPECIALTARGET_TOP) { if (xFrame-isTop()) { @@ -398,11 +392,10 @@ css::uno::Reference css::frame::XDispatch DispatchProvider::implts_queryFrame // protocol handler. If this failed too - we check for a loadable content and in case of true // we load it into the frame by returning specilized dispatch object.
[Libreoffice-commits] .: framework/source tools/source xmlsecurity/source
framework/source/helper/statusindicatorfactory.cxx |3 +-- tools/source/fsys/dirent.cxx |2 +- xmlsecurity/source/xmlsec/saxhelper.cxx|1 - 3 files changed, 2 insertions(+), 4 deletions(-) New commits: commit a7efb9b8dd0b7deee49975961ca49f6838648614 Author: Caolán McNamara caol...@redhat.com Date: Sun Oct 14 16:37:00 2012 +0100 loplugin: fix some indents and unused OUStrings Change-Id: I1d7256eea7a79453d3cdb85d1edcf824d58d775e diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx index c24aabf..d5ce604 100644 --- a/framework/source/helper/statusindicatorfactory.cxx +++ b/framework/source/helper/statusindicatorfactory.cxx @@ -452,8 +452,7 @@ void StatusIndicatorFactory::impl_createProgress() VCLStatusIndicator* pVCLProgress = new VCLStatusIndicator(xSMGR, xWindow); xProgress = css::uno::Reference css::task::XStatusIndicator (static_cast css::task::XStatusIndicator* (pVCLProgress), css::uno::UNO_QUERY); } -else -if (xFrame.is()) +else if (xFrame.is()) { // use frame layouted progress implementation css::uno::Reference css::beans::XPropertySet xPropSet(xFrame, css::uno::UNO_QUERY); diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index aef1299..6efde8a 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -872,7 +872,7 @@ String DirEntry::GetExtension( char cSep ) const const char *p0 = aName.getStr(); const char *p1 = p0 + aName.getLength() - 1; while ( p1 = p0 *p1 != cSep ) -p1--; +p1--; if ( p1 = p0 ) { diff --git a/xmlsecurity/source/xmlsec/saxhelper.cxx b/xmlsecurity/source/xmlsec/saxhelper.cxx index 3276d17..dbf1b37 100644 --- a/xmlsecurity/source/xmlsec/saxhelper.cxx +++ b/xmlsecurity/source/xmlsec/saxhelper.cxx @@ -62,7 +62,6 @@ const xmlChar** attrlist_to_nxmlstr( const cssu::Sequence cssxcsax::XMLAttribut xmlChar* attname = NULL ; xmlChar* attvalue = NULL ; const xmlChar** attrs = NULL ; -rtl::OUString oustr ; sal_Int32 nLength = aAttributes.getLength(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/services/frame.cxx | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) New commits: commit 5f12d6d42defc5ad3c286c23771be75595388d54 Author: Caolán McNamara caol...@redhat.com Date: Sat Oct 13 11:47:19 2012 +0100 loplugin: what is it with the weird-ass else placement in framework Change-Id: I81809a80242457147dba716daa92b83726f732ba diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index b4e8e12..e3bf76b 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -805,8 +805,7 @@ css::uno::Reference css::frame::XFrame SAL_CALL Frame::findFrame( const ::rtl // It doesn't matter if we have a valid parent or not. User ask for him and get it. // An empty result is a valid result too. //- -else -if ( sTargetFrameName==SPECIALTARGET_PARENT ) +else if ( sTargetFrameName==SPECIALTARGET_PARENT ) { xTarget = xParent; } @@ -816,13 +815,11 @@ css::uno::Reference css::frame::XFrame SAL_CALL Frame::findFrame( const ::rtl // If we are not the top frame in this hierarchy, we must forward request to our parent. // Otherwhise we must return ourself. //- -else -if ( sTargetFrameName==SPECIALTARGET_TOP ) +else if ( sTargetFrameName==SPECIALTARGET_TOP ) { if (bIsTopFrame) xTarget = this; -else -if (xParent.is()) // If we are not top - the parent MUST exist. But may it's better to check it again .-) +else if (xParent.is()) // If we are not top - the parent MUST exist. But may it's better to check it again .-) xTarget = xParent-findFrame(SPECIALTARGET_TOP,0); } @@ -830,8 +827,7 @@ css::uno::Reference css::frame::XFrame SAL_CALL Frame::findFrame( const ::rtl // I.IV) _self, // This mean this frame in every case. //- -else -if ( +else if ( ( sTargetFrameName==SPECIALTARGET_SELF ) || ( sTargetFrameName.isEmpty() ) ) @@ -845,8 +841,7 @@ css::uno::Reference css::frame::XFrame SAL_CALL Frame::findFrame( const ::rtl // or create it there if it not already exists. // Note: Such beamer exists for task(top) frames only! //- -else -if ( sTargetFrameName==SPECIALTARGET_BEAMER ) +else if ( sTargetFrameName==SPECIALTARGET_BEAMER ) { // We are a task = search or create the beamer if (bIsTopWindow) @@ -862,8 +857,7 @@ css::uno::Reference css::frame::XFrame SAL_CALL Frame::findFrame( const ::rtl } } // We arent a task = forward request to our parent or ignore it. -else -if (xParent.is()) +else if (xParent.is()) xTarget = xParent-findFrame(SPECIALTARGET_BEAMER,0); } @@ -1410,7 +1404,8 @@ sal_Bool SAL_CALL Frame::setComponent( const css::uno::Reference css::awt::X xDisposable-dispose(); } catch(const css::lang::DisposedException) -{} +{ +} } xOldComponentWindow = NULL; } @@ -1431,8 +1426,7 @@ sal_Bool SAL_CALL Frame::setComponent( const css::uno::Reference css::awt::X // notifies all interest listener, that current component was changed or a new one was loaded if (bIsConnected bWasConnected) implts_sendFrameActionEvent( css::frame::FrameAction_COMPONENT_REATTACHED ); -else -if (bIsConnected !bWasConnected) +else if (bIsConnected !bWasConnected) implts_sendFrameActionEvent( css::frame::FrameAction_COMPONENT_ATTACHED ); //_ @@ -3118,12 +3112,11 @@ void Frame::impl_checkMenuCloser() // Because it's set at the special member aAnalyzer.m_xBackingComponent ... :-) xNewCloserFrame = aAnalyzer.m_lOtherVisibleFrames[0]; } -else // - // b) // There is no other frame ... means no other document frame. The help module // will be handled seperatly and must(!) be ignored here ... excepting weself includes the help. -if ( +else if ( (aAnalyzer.m_lOtherVisibleFrames.getLength()==0) (!aAnalyzer.m_bReferenceIsHelp ) (!aAnalyzer.m_bReferenceIsHidden ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] .: framework/source
framework/source/jobs/job.cxx |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit 46a418af78d066db75999282ea255583e686380e Author: Caolán McNamara caol...@redhat.com Date: Fri Oct 12 16:41:38 2012 +0100 loplugin: bad else if placement Change-Id: I56e88a675adf37fdf52637ecbff6778a5215a16a diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx index 7d7b631..cc881a4 100644 --- a/framework/source/jobs/job.cxx +++ b/framework/source/jobs/job.cxx @@ -898,14 +898,12 @@ void SAL_CALL Job::disposing( const css::lang::EventObject aEvent ) throw(css:: m_xDesktop = css::uno::Reference css::frame::XDesktop (); m_bListenOnDesktop = sal_False; } -else -if (m_xFrame.is() aEvent.Source == m_xFrame) +else if (m_xFrame.is() aEvent.Source == m_xFrame) { m_xFrame = css::uno::Reference css::frame::XFrame (); m_bListenOnFrame = sal_False; } -else -if (m_xModel.is() aEvent.Source == m_xModel) +else if (m_xModel.is() aEvent.Source == m_xModel) { m_xModel = css::uno::Reference css::frame::XModel (); m_bListenOnModel = sal_False; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source sal/qa
framework/source/layoutmanager/toolbarlayoutmanager.cxx |4 --- sal/qa/osl/file/osl_old_test_file.cxx | 17 2 files changed, 21 deletions(-) New commits: commit 6f1bdda2d26dc26f91fd327c82bc7d4b9ee6ab92 Author: Caolán McNamara caol...@redhat.com Date: Thu Oct 11 15:01:47 2012 +0100 loplugin: more unused OUStrings and so forth Change-Id: I4f3a51e1fd3ddca9442022a7134306fbf32e13ae diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 3a490d4..179725a 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -783,9 +783,6 @@ bool ToolbarLayoutManager::dockAllToolbars() { std::vector ::rtl::OUString aToolBarNameVector; -::rtl::OUString aElementType; -::rtl::OUString aElementName; - ReadGuard aReadLock( m_aLock ); UIElementVector::iterator pIter; for ( pIter = m_aUIElements.begin(); pIter != m_aUIElements.end(); ++pIter ) @@ -981,7 +978,6 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() if (isPreviewFrame()) return; // no addon toolbars for preview frame! -UIElementVector aUIElementVector; uno::Sequence uno::Sequence beans::PropertyValue aAddonToolBarData; uno::Reference ui::XUIElementxUIElement; diff --git a/sal/qa/osl/file/osl_old_test_file.cxx b/sal/qa/osl/file/osl_old_test_file.cxx index 0d2379e..13c46b4 100644 --- a/sal/qa/osl/file/osl_old_test_file.cxx +++ b/sal/qa/osl/file/osl_old_test_file.cxx @@ -26,12 +26,6 @@ * / -// LLA: -// this file is converted to use with testshl2 -// original was placed in sal/test/textenc.cxx - -#include stdio.h - #include osl/file.h #include osl/process.h #include rtl/ustring.hxx @@ -119,20 +113,12 @@ void oldtestfile::test_file_001() OUString target; OUString rel = OUString::createFromAscii( aSource1[i] ); oslFileError e = osl_getAbsoluteFileURL( base1.pData, rel.pData , target.pData ); -//fprintf(stderr, %d : %s -- %s -- %s\n, i, aSource1[i], aSource1[i+1], OUStringToOString(target , RTL_TEXTENCODING_ASCII_US ).getStr() ); CPPUNIT_ASSERT_MESSAGE(failure #1, osl_File_E_None == e ); if( osl_File_E_None == e ) { CPPUNIT_ASSERT_MESSAGE(failure #1.1, target.equalsAscii( aSource1[i+1] ) ); } -OString o = OUStringToOString( target , RTL_TEXTENCODING_ASCII_US ); -OString obase = OUStringToOString( base1 , RTL_TEXTENCODING_ASCII_US ); -// fprintf( stderr, %d %s + %s = %s\n ,e, obase.getStr(), aSource1[i], o.pData-buffer ); } - -OUString err1( RTL_CONSTASCII_USTRINGPARAM( ../.. ) ); -OUString target; -// CPPUNIT_ASSERT_MESSAGE(failure #11, osl_File_E_None != osl_getAbsoluteFileURL( base1.pData , err1.pData , target.pData ) ); #endif } @@ -146,14 +132,11 @@ void oldtestfile::test_file_002() OUString target; OUString rel = OUString::createFromAscii( aSource2[i] ); oslFileError e = osl_getAbsoluteFileURL( base2.pData, rel.pData , target.pData ); -//fprintf(stderr, %d : %s -- %s -- %s\n, i, aSource2[i], aSource2[i+1], OUStringToOString(target , RTL_TEXTENCODING_ASCII_US ).getStr() ); CPPUNIT_ASSERT_MESSAGE(failure #2, osl_File_E_None == e ); if( osl_File_E_None == e ) { CPPUNIT_ASSERT_MESSAGE(failure #2.1, target.equalsAscii( aSource2[i+1] ) ); } -OString o = OUStringToOString( target , RTL_TEXTENCODING_ASCII_US ); -OString obase = OUStringToOString( base2 , RTL_TEXTENCODING_ASCII_US ); } #endif } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/uielement/langselectionmenucontroller.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 8113588c35ae494ccdcbb864a7f0f9e08697118a Author: jailletc36 christophe.jail...@wanadoo.fr Date: Sat Oct 6 22:23:29 2012 +0200 cppcheck: unreadVariable. aLangMap is a std::map that is written but never used, so drop it. Change-Id: I8f5184c58fbe812beab8580349535920645e062e Reviewed-on: https://gerrit.libreoffice.org/781 Reviewed-by: Markus Mohrhard markus.mohrh...@googlemail.com Tested-by: Markus Mohrhard markus.mohrh...@googlemail.com diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 1dc52ed..44605f0 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -251,7 +251,6 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference css::awt::XPopup sal_Int16 nItemId = 1; // in this control the item id is not important for executing the command const OUString sAsterix(*); // multiple languages in current selection const OUString sEmpty; // 'no language found' from language guessing -std::map sal_Int16, OUString aLangMap; std::set OUString ::const_iterator it; for (it = aLangItems.begin(); it != aLangItems.end(); ++it) { @@ -269,7 +268,6 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference css::awt::XPopup //make a sign for the current language pPopupMenu-CheckItem( nItemId, sal_True ); } -aLangMap[ nItemId ] = rStr; ++nItemId; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/lomenubar/FrameHelper.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit b8a671ac076c4137a30a822906fa3a0460c7c4f3 Author: Julien Nabet serval2...@yahoo.fr Date: Mon Sep 3 21:15:22 2012 +0200 Missing 1 include and 2 using Change-Id: I5100e40f9e2bb2f27f7cac490e7c9fa8c3814166 diff --git a/framework/source/lomenubar/FrameHelper.cxx b/framework/source/lomenubar/FrameHelper.cxx index 40631ce..b617404 100644 --- a/framework/source/lomenubar/FrameHelper.cxx +++ b/framework/source/lomenubar/FrameHelper.cxx @@ -64,6 +64,7 @@ #include com/sun/star/ui/XUIConfigurationManagerSupplier.hpp #include com/sun/star/ui/XAcceleratorConfiguration.hpp #include com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp +#include com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp #include rtl/process.h #include comphelper/componentcontext.hxx @@ -113,10 +114,12 @@ using com::sun::star::uno::Sequence; using com::sun::star::uno::XComponentContext; using com::sun::star::uno::XInterface; using com::sun::star::ui::XUIElement; +using com::sun::star::ui::UICommandDescription; using com::sun::star::ui::XUIConfigurationManager; using com::sun::star::ui::XUIConfigurationManagerSupplier; using com::sun::star::ui::XAcceleratorConfiguration; using com::sun::star::ui::XModuleUIConfigurationManagerSupplier; +using com::sun::star::ui::ModuleUIConfigurationManagerSupplier; using com::sun::star::util::URL; using com::sun::star::util::XURLTransformer; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/lomenubar/FrameHelper.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 043d6b6442c1f60838f9502a1e198a1e6a57a123 Author: Stephan Bergmann sberg...@redhat.com Date: Tue Aug 28 10:46:42 2012 +0200 Missing using com::sun::star::frame::DispatchHelper Change-Id: Ia4a830c342077bdc5b61daba1edccca2edb544c6 diff --git a/framework/source/lomenubar/FrameHelper.cxx b/framework/source/lomenubar/FrameHelper.cxx index cd40491..91ae62b 100644 --- a/framework/source/lomenubar/FrameHelper.cxx +++ b/framework/source/lomenubar/FrameHelper.cxx @@ -95,6 +95,7 @@ using com::sun::star::beans::XPropertySet; using com::sun::star::beans::PropertyValue; using com::sun::star::container::XNameAccess; using com::sun::star::container::NoSuchElementException; +using com::sun::star::frame::DispatchHelper; using com::sun::star::frame::XController; using com::sun::star::frame::XComponentLoader; using com::sun::star::frame::XDispatch; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/uielement/menubarmanager.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 18a39e216fa66d915e4426e87350ab4cc592 Author: Noel Power noel.po...@suse.com Date: Thu Aug 16 17:48:35 2012 +0100 remove menubar post processing of SID_PASTESPECIAL state to always enabled at least calc deals with paste-special correct, if other applications don't let's fix 'em up one by one Change-Id: I1beb04e227f2971ee8ef2ce9b7ebdabf566be086 diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index d3ea1b1..26b1233 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -506,8 +506,7 @@ throw ( RuntimeException ) //enable some slots hardly, because UNIX clipboard does not notify all changes // Can be removed if follow up task will be fixed directly within applications. // Note: PasteSpecial is handled specifically by calc -if ( pMenuItemHandler-aMenuItemURL == .uno:Paste || -( m_aModuleIdentifier != com.sun.star.sheet.SpreadsheetDocument pMenuItemHandler-aMenuItemURL == .uno:PasteSpecial ) +if ( pMenuItemHandler-aMenuItemURL == .uno:Paste || pMenuItemHandler-aMenuItemURL == .uno:PasteClipboard ) // special for draw/impress bEnabledItem = sal_True; #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/uielement/menubarmanager.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 7bfb229230a439c2edb3e8452fe0d3430f9931ce Author: Noel Power noel.po...@suse.com Date: Mon Aug 13 16:14:34 2012 +0100 sync cell context menu edit menu 'PasteSpecial' entries for calc fdo#46250 calc application specifically handles PasteSpecial so no need to set the state of the menu entry to enabled always ( for calc at least ) Change-Id: Iaf13dd825f0cbdcf9f455db07d727753fae90868 diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 2938528..d3ea1b1 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -505,7 +505,9 @@ throw ( RuntimeException ) #ifdef UNIX //enable some slots hardly, because UNIX clipboard does not notify all changes // Can be removed if follow up task will be fixed directly within applications. -if ( pMenuItemHandler-aMenuItemURL == .uno:Paste || pMenuItemHandler-aMenuItemURL == .uno:PasteSpecial +// Note: PasteSpecial is handled specifically by calc +if ( pMenuItemHandler-aMenuItemURL == .uno:Paste || +( m_aModuleIdentifier != com.sun.star.sheet.SpreadsheetDocument pMenuItemHandler-aMenuItemURL == .uno:PasteSpecial ) || pMenuItemHandler-aMenuItemURL == .uno:PasteClipboard ) // special for draw/impress bEnabledItem = sal_True; #endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/lomenubar/MenuItemInfo.cxx | 10 +- framework/source/lomenubar/MenuItemInfo.hxx | 10 +- 2 files changed, 10 insertions(+), 10 deletions(-) New commits: commit 6c4838c13cdc1a6b127e08f1a46883da1b45cfbf Author: Julien Nabet serval2...@yahoo.fr Date: Sun Jul 15 15:41:15 2012 +0200 These methods can be const Change-Id: Ia4aa8df3768923f7b5a31fb5158e4a744f4b9788 diff --git a/framework/source/lomenubar/MenuItemInfo.cxx b/framework/source/lomenubar/MenuItemInfo.cxx index 18c159d..904f82a 100644 --- a/framework/source/lomenubar/MenuItemInfo.cxx +++ b/framework/source/lomenubar/MenuItemInfo.cxx @@ -74,31 +74,31 @@ MenuItemInfo::setVisible (gboolean is_visible) //Getters gchar* -MenuItemInfo::getLabel () +MenuItemInfo::getLabel () const { return m_label; } gboolean -MenuItemInfo::getEnabled () +MenuItemInfo::getEnabled () const { return m_is_enabled; } gint -MenuItemInfo::getCheckState () +MenuItemInfo::getCheckState () const { return m_check_state; } const gchar* -MenuItemInfo::getCheckType () +MenuItemInfo::getCheckType () const { return m_check_type; } gboolean -MenuItemInfo::getVisible () +MenuItemInfo::getVisible () const { return m_is_visible; } diff --git a/framework/source/lomenubar/MenuItemInfo.hxx b/framework/source/lomenubar/MenuItemInfo.hxx index 72d411c..0171795 100644 --- a/framework/source/lomenubar/MenuItemInfo.hxx +++ b/framework/source/lomenubar/MenuItemInfo.hxx @@ -46,11 +46,11 @@ class MenuItemInfo { void setVisible (gboolean is_visible); //Getters -gchar* getLabel (); -gboolean getEnabled (); -gint getCheckState (); -const gchar* getCheckType (); -gboolean getVisible (); +gchar* getLabel () const; +gboolean getEnabled () const; +gint getCheckState () const; +const gchar* getCheckType () const; +gboolean getVisible () const; }; #endif // __MENU_ITEM_INFO_HXX__ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/services/backingcomp.cxx |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) New commits: commit 228a3f8b9f279e80917968d9780e822a1d684ada Author: Stephan Bergmann sberg...@redhat.com Date: Mon Jul 9 16:32:47 2012 +0200 Handle attachFrame on disposed object gracefully ...this can apparently happen during the complex.sfx2.DocumentEvetns JUnit test (which would otherwise sometimes fail with an uncaught RuntimeException). Change-Id: I4c96a3bc6bf08e92ec3ec82d76812a35226494fb diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index af64d81..451af43 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -468,9 +468,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference css::f static_cast ::cppu::OWeakObject* (this)); if (!m_xWindow.is()) -throw css::uno::RuntimeException( -::rtl::OUString(instance seams to be not or wrong initialized), -static_cast ::cppu::OWeakObject* (this)); +return; // disposed // safe the frame reference m_xFrame = xFrame; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/services/backingwindow.hxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 180a67252ef9076ad5ddcc69b5dd8e1bace67913 Author: Ivan Timofeev timofeev@gmail.com Date: Fri Jul 6 16:01:21 2012 +0400 update hardcoded borders according to the new Start Center images Change-Id: I23174caacf26c37b4d63b7374c3a2a4a8d4124c3 diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx index 96eb909..071b8e0 100644 --- a/framework/source/services/backingwindow.hxx +++ b/framework/source/services/backingwindow.hxx @@ -130,10 +130,10 @@ namespace framework static const int nItemId_Extensions = 1; static const int nItemId_Info = 3; static const int nItemId_TplRep = 4; -static const int nShadowTop = 32; -static const int nShadowLeft = 35; -static const int nShadowRight = 45; -static const int nShadowBottom = 50; +static const int nShadowTop = 37; +static const int nShadowLeft = 38; +static const int nShadowRight = 38; +static const int nShadowBottom = 38; void loadImage( const ResId i_rId, PushButton i_rButton ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/layoutmanager/toolbarlayoutmanager.cxx | 10 +- framework/source/uielement/toolbarmanager.cxx |2 +- 2 files changed, 10 insertions(+), 2 deletions(-) New commits: commit ca9967344682a0d3e25d7ebcc9df2c679cb082f8 Author: Ivan Timofeev timofeev@gmail.com Date: Wed Jun 6 11:09:44 2012 +0400 fdo#50651: update layout after toolbar destruction plus update confusing comments Change-Id: I9bdab918566548b576fd22389492216fc4aff7df diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 2fe8306..3f35aae 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -3938,7 +3938,7 @@ throw (uno::RuntimeException) // user closes a toolbar = // context sensitive toolbar: only destroy toolbar and store state. -// context sensitive toolbar: make it invisible, store state and destroy it. +// non context sensitive toolbar: make it invisible, store state and destroy it. if ( !pIter-m_bContextSensitive ) pIter-m_bVisible = sal_False; @@ -3954,6 +3954,14 @@ throw (uno::RuntimeException) { implts_writeWindowStateData( aUIElement ); destroyToolbar( aName ); + +ReadGuard aReadLock( m_aLock ); +bool bLayoutDirty = m_bLayoutDirty; +ILayoutNotifications* pParentLayouter( m_pParentLayouter ); +aWriteLock.unlock(); + +if ( bLayoutDirty pParentLayouter ) +pParentLayouter-requestLayout( ILayoutNotifications::HINT_TOOLBARSPACE_HAS_CHANGED ); } } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 63e24f7..475c99a 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -2152,7 +2152,7 @@ IMPL_STATIC_LINK_NOINSTANCE( ToolBarManager, ExecuteHdl_Impl, ExecuteInfo*, pExe ( pExecuteInfo-xLayoutManager.is() ) ( pExecuteInfo-xWindow.is() )) { -// Use docking window close to close the toolbar. The layout manager is +// Use docking window close to close the toolbar. The toolbar layout manager is // listener and will react correctly according to the context sensitive // flag of our toolbar. Window* pWin = VCLUnoHelper::GetWindow( pExecuteInfo-xWindow ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/jobs/jobdata.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0665c3e52b0b0053c3d622d3fa975d4234801bdd Author: Caolán McNamara caol...@redhat.com Date: Tue Jun 5 16:03:17 2012 +0100 extra trailing NUL char in string This began life as ::rtl::OUString::createFromAscii which stops at the first NULL terminator. So drop the \0 to get the same results Change-Id: I7d9abbff2a6e6131ef5e7208e05cfd13178418cb diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx index c1cbcf8..a6cf7c4 100644 --- a/framework/source/jobs/jobdata.cxx +++ b/framework/source/jobs/jobdata.cxx @@ -583,7 +583,7 @@ sal_Bool isEnabled( const ::rtl::OUString sAdminTime , we have to encode all '?' signs. Otherwhise e.g. ??- will be translated to ~ ... */ -static ::rtl::OUString PATTERN_ISO8601(\?\?\?\?-\?\?-\?\?*\0); +static ::rtl::OUString PATTERN_ISO8601(\?\?\?\?-\?\?-\?\?*); WildCard aISOPattern(PATTERN_ISO8601); sal_Bool bValidAdmin = aISOPattern.Matches(sAdminTime); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/layoutmanager/layoutmanager.cxx| 15 - framework/source/layoutmanager/toolbarlayoutmanager.cxx | 41 +--- framework/source/layoutmanager/toolbarlayoutmanager.hxx | 10 +++ 3 files changed, 47 insertions(+), 19 deletions(-) New commits: commit 7c5064d3bd57a0d5e57e188274d74d61a3ac9922 Author: Eike Rathke er...@redhat.com Date: Fri May 4 23:14:51 2012 +0200 resolved fdo#46160 query model only once whether it is a preview Query a frame's model only once whether it is a preview model, instead of doing it for each toolbar and menubar and statusbar and progressbar. Each call via SfxBaseModel::getArgs() results in SfxObjectShell::GetVisArea() that at least in Calc determines how far visible attributes extend, with several toolbars requested on each cell edit. getArgs() calls GetVisArea() still too many times when loading a document even if the caller doesn't evaluate the WinExtent property, this is an opportunity for further optimization. diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 993fb2f..46fef0d 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -1464,15 +1464,24 @@ throw (RuntimeException) if ( !xFrame.is() ) return; -Reference XModel xModel( impl_getModelFromFrame( xFrame ) ); - /* SAFE AREA --- */ WriteGuard aWriteLock( m_aLock ); bool bMustBeLayouted( false ); bool bNotify( false ); -if ( m_xContainerWindow.is() !implts_isPreviewModel( xModel ) ) // no UI elements on preview frames +bool bPreviewFrame; +if (m_pToolbarManager) +// Assumes that we created the ToolbarLayoutManager with our frame, if +// not then we're somewhat fouled up ... +bPreviewFrame = m_pToolbarManager-isPreviewFrame(); +else +{ +Reference XModel xModel( impl_getModelFromFrame( xFrame ) ); +bPreviewFrame = implts_isPreviewModel( xModel ); +} + +if ( m_xContainerWindow.is() !bPreviewFrame ) // no UI elements on preview frames { ::rtl::OUString aElementType; ::rtl::OUString aElementName; diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 449610d..1bcf3c3 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -66,6 +66,7 @@ ToolbarLayoutManager::ToolbarLayoutManager( m_xUIElementFactoryManager( xUIElementFactory ), m_pParentLayouter( pParentLayouter ), m_eDockOperation( DOCKOP_ON_COLROW ), +m_ePreviewDetection( PREVIEWFRAME_UNKNOWN ), m_bComponentAttached( false ), m_bMustLayout( false ), m_bLayoutDirty( false ), @@ -374,6 +375,7 @@ void ToolbarLayoutManager::reset() uno::Reference ui::XUIConfigurationManager xDocCfgMgr( m_xDocCfgMgr ); m_xModuleCfgMgr.clear(); m_xDocCfgMgr.clear(); +m_ePreviewDetection = PREVIEWFRAME_UNKNOWN; m_bComponentAttached = false; aWriteLock.unlock(); @@ -399,6 +401,21 @@ void ToolbarLayoutManager::attach( m_bComponentAttached = true; } +bool ToolbarLayoutManager::isPreviewFrame() +{ +ReadGuard aReadLock( m_aLock ); +if (m_ePreviewDetection == PREVIEWFRAME_UNKNOWN) +{ +uno::Reference frame::XFrame xFrame( m_xFrame ); + +uno::Reference frame::XModel xModel( impl_getModelFromFrame( xFrame )); + +WriteGuard aWriteLock( m_aLock ); +m_ePreviewDetection = (implts_isPreviewModel( xModel ) ? PREVIEWFRAME_YES : PREVIEWFRAME_NO); +} +return m_ePreviewDetection == PREVIEWFRAME_YES; +} + void ToolbarLayoutManager::createStaticToolbars() { resetDockingArea(); @@ -410,18 +427,13 @@ void ToolbarLayoutManager::createStaticToolbars() bool ToolbarLayoutManager::requestToolbar( const ::rtl::OUString rResourceURL ) { +if (isPreviewFrame()) +return false; // no toolbars for preview frame! + bool bNotify( false ); bool bMustCallCreate( false ); uno::Reference ui::XUIElement xUIElement; -ReadGuard aReadLock( m_aLock ); -uno::Reference frame::XFrame xFrame( m_xFrame ); -aReadLock.unlock(); - -uno::Reference frame::XModel xModel( impl_getModelFromFrame( xFrame )); -if ( implts_isPreviewModel( xModel )) -return false; // no toolbars for preview frame! - UIElement aRequestedToolbar = impl_findToolbar( rResourceURL ); if ( aRequestedToolbar.m_aName != rResourceURL ) { @@ -970,8 +982,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars() uno::Reference frame::XFrame xFrame( m_xFrame ); aWriteLock.unlock(); -uno::Reference frame::XModel xModel( impl_getModelFromFrame(
[Libreoffice-commits] .: framework/source
framework/source/classes/menumanager.cxx |9 + 1 file changed, 1 insertion(+), 8 deletions(-) New commits: commit ef9620df989cd1e3ab9cf2e289b035231cca4d39 Author: LuboÅ¡ LuÅák l.lu...@suse.cz Date: Wed Apr 4 17:59:46 2012 +0200 remove an assert from an attempt to silence clang's false warning http://llvm.org/bugs/show_bug.cgi?id=12459 It is not clear to me why the explicit cast was there in the first place, but removing it probably can't make the situation worse than aborting incorrectly. diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index 202b7eb..40f329c 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -146,14 +146,7 @@ MenuManager::MenuManager( m_xFrame= rFrame; m_bInitialized = sal_False; m_bIsBookmarkMenu = sal_False; -#ifdef LIBO_WERROR -// Wtf? Clang says: call to pure virtual member function -// 'acquire'; overrides of 'acquire' in subclasses are not -// available in the constructor of 'XInterface' -assert(!Call to pure virtual member function); -#else -SAL_STATIC_CAST( ::com::sun::star::uno::XInterface*, (OWeakObject*)this )-acquire(); -#endif +acquire(); const StyleSettings rSettings = Application::GetSettings().GetStyleSettings(); m_bShowMenuImages = rSettings.GetUseImagesInMenus(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/services/backingwindow.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 4e24d472f693c458b17d2ba1fb6c883aaf9c3b27 Author: Ivan Timofeev timofeev@gmail.com Date: Tue Apr 3 20:40:14 2012 +0400 fix the initial font size in the Start Center Recover the code that was for some reason removed in commit 78e8d5f0d62f910b8561a1c4fd7ebd8ae4cfb9f8. diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index d930f77..ca0e9e7 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -239,6 +239,9 @@ BackingWindow::BackingWindow( Window* i_pParent ) : maButtonImageSize.Width() += 12; maButtonImageSize.Height() += 12; +// set a slighly larger font than normal labels on the texts +maTextFont.SetSize( Size( 0, 11 ) ); +maTextFont.SetWeight( WEIGHT_NORMAL ); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/services/desktop.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b8550f6a66af279a34731a2d7921fb63550e463b Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Mon Mar 5 09:21:38 2012 +0100 add a space diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 3d164f0..8a03aa3 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -428,7 +428,7 @@ namespace bool SAL_CALL Desktop::terminateQuickstarterToo() throw( css::uno::RuntimeException ) { -QuickstartSuppressoraQuickstartSuppressor(this, m_xQuickLauncher); +QuickstartSuppressor aQuickstartSuppressor(this, m_xQuickLauncher); return terminate(); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/services/desktop.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f3d78616dfc0805ff31038e00148e115d409ef9a Author: Bjoern Michaelsen bjoern.michael...@canonical.com Date: Mon Mar 5 08:50:10 2012 +0100 lp#562027: actually give the quickstart suppressor a scope diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 6c63aea..3d164f0 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -428,7 +428,7 @@ namespace bool SAL_CALL Desktop::terminateQuickstarterToo() throw( css::uno::RuntimeException ) { -QuickstartSuppressor(this, m_xQuickLauncher); +QuickstartSuppressoraQuickstartSuppressor(this, m_xQuickLauncher); return terminate(); } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source l10ntools/source oox/source
framework/source/dispatch/closedispatcher.cxx |2 framework/source/fwe/helper/titlehelper.cxx |6 - framework/source/layoutmanager/layoutmanager.cxx| 83 ++-- framework/source/layoutmanager/toolbarlayoutmanager.cxx |3 l10ntools/source/tagtest.cxx| 10 - oox/source/drawingml/chart/objectformatter.cxx |2 oox/source/drawingml/textparagraphproperties.cxx| 18 +-- oox/source/dump/dumperbase.cxx |2 oox/source/dump/pptxdumper.cxx | 34 +++--- oox/source/dump/xlsbdumper.cxx | 34 +++--- oox/source/export/drawingml.cxx |4 oox/source/mathml/importutils.cxx | 15 +- 12 files changed, 123 insertions(+), 90 deletions(-) New commits: commit 96cb767123c9e8f5db197454b4da02c8f7583d2b Author: Takeshi Abe t...@fixedpoint.jp Date: Sun Feb 19 23:27:29 2012 +0900 Prefer equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) to equalsIgnoreAsciiCaseAscii(...) diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx index b595da7..2a8d20b 100644 --- a/framework/source/dispatch/closedispatcher.cxx +++ b/framework/source/dispatch/closedispatcher.cxx @@ -605,7 +605,7 @@ void CloseDispatcher::implts_notifyResultListener(const css::uno::Reference css css::uno::Reference css::frame::XFrame CloseDispatcher::static_impl_searchRightTargetFrame(const css::uno::Reference css::frame::XFrame xFrame , const ::rtl::OUString sTarget) { -if (sTarget.equalsIgnoreAsciiCaseAscii(_self)) +if (sTarget.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(_self))) return xFrame; OSL_ENSURE(sTarget.isEmpty(), CloseDispatch used for unexpected target. Magic things will happen now .-)); diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index 07ff57d..c963a2b 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -197,8 +197,8 @@ void SAL_CALL TitleHelper::titleChanged(const css::frame::TitleChangedEvent aEv void SAL_CALL TitleHelper::notifyEvent(const css::document::EventObject aEvent) throw (css::uno::RuntimeException) { -if ( ! aEvent.EventName.equalsIgnoreAsciiCaseAscii (OnSaveAsDone) - ! aEvent.EventName.equalsIgnoreAsciiCaseAscii (OnTitleChanged)) +if ( ! aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(OnSaveAsDone)) + ! aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(OnTitleChanged))) return; // SYNCHRONIZED - @@ -211,7 +211,7 @@ void SAL_CALL TitleHelper::notifyEvent(const css::document::EventObject aEvent) if ( aEvent.Source != xOwner || - (aEvent.EventName.equalsIgnoreAsciiCaseAscii (OnTitleChanged) !xOwner.is()) + (aEvent.EventName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(OnTitleChanged)) !xOwner.is()) ) { return; diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 0020a2e..e25d74b 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -490,11 +490,15 @@ uno::Reference ui::XUIElement LayoutManager::implts_findElement( const rtl::O ::rtl::OUString aElementName; parseResourceURL( aName, aElementType, aElementName ); -if ( aElementType.equalsIgnoreAsciiCaseAscii( menubar ) aElementName.equalsIgnoreAsciiCaseAscii( menubar )) +if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(menubar)) + aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(menubar)) ) return m_xMenuBar; -else if (( aElementType.equalsIgnoreAsciiCaseAscii( statusbar ) aElementName.equalsIgnoreAsciiCaseAscii( statusbar )) || ( m_aStatusBarElement.m_aName == aName )) +else if (( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(statusbar)) + aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(statusbar)) ) || + ( m_aStatusBarElement.m_aName == aName )) return m_aStatusBarElement.m_xUIElement; -else if ( aElementType.equalsIgnoreAsciiCaseAscii( progressbar ) aElementName.equalsIgnoreAsciiCaseAscii( progressbar )) +else if ( aElementType.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(progressbar)) + aElementName.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(progressbar)) ) return m_aProgressBarElement.m_xUIElement; return uno::Reference ui::XUIElement (); @@ -1494,7 +1498,8 @@ throw
[Libreoffice-commits] .: framework/source svx/source
framework/source/accelerators/globalacceleratorconfiguration.cxx |4 +-- framework/source/accelerators/moduleacceleratorconfiguration.cxx |4 +-- framework/source/accelerators/presethandler.cxx | 12 +- framework/source/services/autorecovery.cxx | 10 svx/source/unodraw/unoshcol.cxx |4 +-- 5 files changed, 17 insertions(+), 17 deletions(-) New commits: commit f58c49b39a7c6a8490033360f78768ee0a26f167 Author: Julien Nabet serval2...@yahoo.fr Date: Thu Feb 2 22:53:48 2012 +0100 Some cppcheck cleaning diff --git a/framework/source/accelerators/globalacceleratorconfiguration.cxx b/framework/source/accelerators/globalacceleratorconfiguration.cxx index 84da269..c5853f8 100644 --- a/framework/source/accelerators/globalacceleratorconfiguration.cxx +++ b/framework/source/accelerators/globalacceleratorconfiguration.cxx @@ -119,8 +119,8 @@ void GlobalAcceleratorConfiguration::impl_ts_fillCache() m_xCfgListener = new WeakChangesListener(this); xBroadcaster-addChangesListener(m_xCfgListener); } -catch(const css::uno::RuntimeException exRun) -{ throw exRun; } +catch(const css::uno::RuntimeException) +{ throw; } catch(const css::uno::Exception) {} } diff --git a/framework/source/accelerators/moduleacceleratorconfiguration.cxx b/framework/source/accelerators/moduleacceleratorconfiguration.cxx index 9c3fb8f..7100685 100644 --- a/framework/source/accelerators/moduleacceleratorconfiguration.cxx +++ b/framework/source/accelerators/moduleacceleratorconfiguration.cxx @@ -153,8 +153,8 @@ void ModuleAcceleratorConfiguration::impl_ts_fillCache() m_xCfgListener = new WeakChangesListener(this); xBroadcaster-addChangesListener(m_xCfgListener); } -catch(const css::uno::RuntimeException exRun) -{ throw exRun; } +catch(const css::uno::RuntimeException) +{ throw; } catch(const css::uno::Exception) {} } diff --git a/framework/source/accelerators/presethandler.cxx b/framework/source/accelerators/presethandler.cxx index d276b48..b68fdc4 100644 --- a/framework/source/accelerators/presethandler.cxx +++ b/framework/source/accelerators/presethandler.cxx @@ -501,8 +501,8 @@ void PresetHandler::connectToResource( PresetHandler::EConfigType xUser = m_lDocumentStorages.openPath(sRelPathUser , eUserMode ); xShare = xUser; } -catch(const css::uno::RuntimeException exRun) -{ throw exRun; } +catch(const css::uno::RuntimeException) +{ throw; } catch(const css::uno::Exception) { xShare.clear(); xUser.clear(); } } @@ -822,8 +822,8 @@ css::uno::Reference css::embed::XStorage PresetHandler::impl_openPathIgnoring else xPath = m_aSharedStorages-m_lStoragesUser.openPath(sPath, eMode); } -catch(const css::uno::RuntimeException exRun) -{ throw exRun; } +catch(const css::uno::RuntimeException) +{ throw; } catch(const css::uno::Exception) { xPath.clear(); } return xPath; @@ -921,8 +921,8 @@ css::uno::Reference css::embed::XStorage PresetHandler::impl_openLocalizedPat if (xFolder-isStorageElement(pNames[i])) lSubFolders.push_back(pNames[i]); } -catch(const css::uno::RuntimeException exRun) -{ throw exRun; } +catch(const css::uno::RuntimeException) +{ throw; } catch(const css::uno::Exception) {} } diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 6d2b6b6..cae935b 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1336,7 +1336,7 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo rIn nRetry = 0; } -catch(const css::uno::Exception ex) +catch(const css::uno::Exception) { // a) FULL DISC seams to be the problem behind = show error and retry it forever (e.g. retry=300) // b) unknown problem (may be locking problem) = reset RETRY value to more usefull value(!) (e.g. retry=3) @@ -1355,7 +1355,7 @@ void AutoRecovery::implts_flushConfigItem(const AutoRecovery::TDocumentInfo rIn nRetry = RETRY_STORE_ON_MIGHT_FULL_DISC_USEFULL; else if (nRetry = GIVE_UP_RETRY) -throw ex; // force stacktrace to know if there exist might other reasons, why an AutoSave can fail !!! +throw; // force stacktrace to know if there exist might other reasons, why an AutoSave can fail !!! --nRetry; } @@ -2374,7 +2374,7 @@ void
[Libreoffice-commits] .: framework/source
framework/source/services/backingwindow.cxx | 20 ++-- framework/source/services/backingwindow.hxx |2 +- 2 files changed, 11 insertions(+), 11 deletions(-) New commits: commit 1f628c7bf8361086be2044d0d6aa8bbf3f128162 Author: Tomcsik Bence tomcsikbe...@gmail.com Date: Sat Jan 14 00:14:45 2012 +0100 The Open... button's more room problem solved fdo#33794 By adding a int i_nExtraWidth parameter to the layoutButton function there will be enough space for the open button and its black triangle. diff --git a/framework/source/services/backingwindow.cxx b/framework/source/services/backingwindow.cxx index a28f80f..2db5879 100644 --- a/framework/source/services/backingwindow.cxx +++ b/framework/source/services/backingwindow.cxx @@ -572,33 +572,33 @@ void BackingWindow::initControls() } // layout the buttons -layoutButton( WRITER_URL, 0, aFileNewAppsAvailable, +layoutButton( WRITER_URL, 0, 0, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SWRITER, maWriterButton, aMnemns ); -layoutButton( DRAW_URL, 1, aFileNewAppsAvailable, +layoutButton( DRAW_URL, 1, 0, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SDRAW, maDrawButton, aMnemns ); nYPos += maButtonImageSize.Height() + 10; -layoutButton( CALC_URL, 0, aFileNewAppsAvailable, +layoutButton( CALC_URL, 0, 0, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SCALC, maCalcButton, aMnemns ); -layoutButton( BASE_URL, 1, aFileNewAppsAvailable, +layoutButton( BASE_URL, 1, 0, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SDATABASE, maDBButton, aMnemns ); nYPos += maButtonImageSize.Height() + 10; -layoutButton( IMPRESS_WIZARD_URL, 0, aFileNewAppsAvailable, +layoutButton( IMPRESS_WIZARD_URL, 0, 0, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SIMPRESS, maImpressButton, aMnemns ); -layoutButton( MATH_URL, 1, aFileNewAppsAvailable, +layoutButton( MATH_URL, 1, 0, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SMATH, maMathButton, aMnemns ); nYPos += 3*maButtonImageSize.Height() / 2; -layoutButton( NULL, 0, aFileNewAppsAvailable, +layoutButton( NULL, 0, 18, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SWRITER, maOpenButton, aMnemns, maOpenString ); -layoutButton( NULL, 1, aFileNewAppsAvailable, +layoutButton( NULL, 1, 0, aFileNewAppsAvailable, aModuleOptions, SvtModuleOptions::E_SWRITER, maTemplateButton, aMnemns, maTemplateString ); nYPos += 10; @@ -664,7 +664,7 @@ void BackingWindow::loadImage( const ResId i_rId, PushButton i_rButton ) } void BackingWindow::layoutButton( - const char* i_pURL, int nColumn, + const char* i_pURL, int nColumn, int i_nExtraWidth, const std::setrtl::OUString i_rURLS, SvtModuleOptions i_rOpt, SvtModuleOptions::EModule i_eMod, PushButton i_rBtn, @@ -690,7 +690,7 @@ void BackingWindow::layoutButton( long nTextWidth = i_rBtn.GetTextWidth( i_rBtn.GetText() ); -nTextWidth += maButtonImageSize.Width() + 8; // add some fuzz to be on the safe side +nTextWidth += maButtonImageSize.Width() + 8 + i_nExtraWidth; // add some fuzz to be on the safe side if( nColumn = 0 nColumn static_castint(SAL_N_ELEMENTS(mnColumnWidth)) ) { if( nTextWidth mnColumnWidth[nColumn] ) diff --git a/framework/source/services/backingwindow.hxx b/framework/source/services/backingwindow.hxx index 410862f..179a632 100644 --- a/framework/source/services/backingwindow.hxx +++ b/framework/source/services/backingwindow.hxx @@ -144,7 +144,7 @@ namespace framework void loadImage( const ResId i_rId, PushButton i_rButton ); -void layoutButton( const char* i_pURL, int nColumn, const std::setrtl::OUString i_rURLS, +void layoutButton( const char* i_pURL, int nColumn, int i_nExtraWidth, const std::setrtl::OUString i_rURLS, SvtModuleOptions i_rOpt, SvtModuleOptions::EModule i_eMod, PushButton i_rBtn, MnemonicGenerator i_rMnemonicGen, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/uielement/toolbarmanager.cxx |3 ++- framework/source/uielement/toolbarmerger.cxx |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) New commits: commit 4a71d128bba69f7b91fe46fad5731caac6ca6ba2 Author: David Tardon dtar...@redhat.com Date: Tue Jan 10 13:31:33 2012 +0100 workaround internal compiler error with gcc 4.7 diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 8d4f984..0104b65 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1379,7 +1379,8 @@ void ToolBarManager::FillToolbar( const Reference XIndexAccess rItemContaine { aCmdInfo.nId = nId; aCmdInfo.nWidth = nWidth; -m_aCommandMap.insert( CommandToInfoMap::value_type( aCommandURL, aCmdInfo )); +const CommandToInfoMap::value_type aValue( aCommandURL, aCmdInfo ); +m_aCommandMap.insert( aValue ); } else { diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx index 4b5da50..7e2a5f7 100644 --- a/framework/source/uielement/toolbarmerger.cxx +++ b/framework/source/uielement/toolbarmerger.cxx @@ -516,7 +516,8 @@ bool ToolBarMerger::MergeItems( { CommandInfo aCmdInfo; aCmdInfo.nId = rItemId; -rCommandMap.insert( CommandToInfoMap::value_type( rItem.aCommandURL, aCmdInfo )); +const CommandToInfoMap::value_type aValue( rItem.aCommandURL, aCmdInfo ); +rCommandMap.insert( aValue ); } else { ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source svx/source
framework/source/uielement/controlmenucontroller.cxx |4 ++-- svx/source/form/fmshimp.cxx | 12 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) New commits: commit 5f2355014375adb66dd8e986068abc8429e0ad0d Author: Matúš Kukan matus.ku...@gmail.com Date: Wed Jan 4 21:58:46 2012 +0100 make these variables static diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index a946858..1f5e64e 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -115,7 +115,7 @@ #define SID_FM_IMAGEBUTTON (SID_FMSLOTS_START + 12) #define SID_FM_FILECONTROL (SID_FMSLOTS_START + 13) -sal_Int16 nConvertSlots[] = +static sal_Int16 nConvertSlots[] = { SID_FM_CONVERTTO_EDIT, SID_FM_CONVERTTO_BUTTON, @@ -139,7 +139,7 @@ sal_Int16 nConvertSlots[] = SID_FM_CONVERTTO_SPINBUTTON }; -sal_Int16 nCreateSlots[] = +static sal_Int16 nCreateSlots[] = { SID_FM_EDIT, SID_FM_PUSHBUTTON, diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index e261c21..04751bb 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -117,7 +117,7 @@ #include vector // wird fuer Invalidate verwendet - mitpflegen -sal_uInt16 DatabaseSlotMap[] = +static sal_uInt16 DatabaseSlotMap[] = { SID_FM_RECORD_FIRST, SID_FM_RECORD_NEXT, @@ -145,7 +145,7 @@ sal_uInt16 DatabaseSlotMap[] = // wird fuer Invalidate verwendet - mitpflegen // aufsteigend sortieren !! -sal_Int16 DlgSlotMap[] =// slots des Controllers +static sal_Int16 DlgSlotMap[] =// slots des Controllers { SID_FM_CTL_PROPERTIES, SID_FM_PROPERTIES, @@ -161,7 +161,7 @@ sal_Int16 DlgSlotMap[] =// slots des Controllers 0 }; -sal_Int16 SelObjectSlotMap[] = // vom SelObject abhaengige Slots +static sal_Int16 SelObjectSlotMap[] = // vom SelObject abhaengige Slots { SID_FM_CONVERTTO_EDIT, SID_FM_CONVERTTO_BUTTON, @@ -192,7 +192,7 @@ sal_Int16 SelObjectSlotMap[] = // vom SelObject abhaengige Slots // die folgenden Arrays muessen kosistent sein, also einander entsprechende Eintraege an der selben relativen Position // innerhalb ihres jeweiligen Arrays stehen -sal_Int16 nConvertSlots[] = +static sal_Int16 nConvertSlots[] = { SID_FM_CONVERTTO_EDIT, SID_FM_CONVERTTO_BUTTON, @@ -216,7 +216,7 @@ sal_Int16 nConvertSlots[] = SID_FM_CONVERTTO_NAVIGATIONBAR }; -sal_Int16 nCreateSlots[] = +static sal_Int16 nCreateSlots[] = { SID_FM_EDIT, SID_FM_PUSHBUTTON, @@ -240,7 +240,7 @@ sal_Int16 nCreateSlots[] = SID_FM_NAVIGATIONBAR }; -sal_Int16 nObjectTypes[] = +static sal_Int16 nObjectTypes[] = { OBJ_FM_EDIT, OBJ_FM_BUTTON, ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/loadenv/loadenv.cxx | 36 +-- 1 file changed, 22 insertions(+), 14 deletions(-) New commits: commit 80cc772841dc3b03f0a629215858d0a44f5419a1 Author: Caolán McNamara caol...@redhat.com Date: Tue Dec 20 10:00:36 2011 + pretty up exception message for display in StarBasic dialogs diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index ef65152..090b6aa 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -193,24 +193,32 @@ css::uno::Reference css::lang::XComponent LoadEnv::loadComponentFromURL(const switch(ex.m_nID) { case LoadEnvException::ID_INVALID_MEDIADESCRIPTOR: -throw css::lang::IllegalArgumentException( - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(Optional list of arguments seem to be corrupted.)), -xLoader, -4); +throw css::lang::IllegalArgumentException( +::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(Optional list of arguments seem to be corrupted.)), +xLoader, +4); case LoadEnvException::ID_UNSUPPORTED_CONTENT: -throw css::lang::IllegalArgumentException( -(rtl::OUString( -RTL_CONSTASCII_USTRINGPARAM(Unsupported URL )) + - sURL + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(: \)) + - rtl::OStringToOUString( - ex.m_sMessage, RTL_TEXTENCODING_UTF8) + - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(\))), +{ +rtl::OUStringBuffer aMsg; +aMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM(Unsupported URL )). +append(sURL).append(''); + +if (!ex.m_sMessage.isEmpty()) +{ +aMsg.appendAscii(RTL_CONSTASCII_STRINGPARAM(: \)). +append(rtl::OStringToOUString( + ex.m_sMessage, RTL_TEXTENCODING_UTF8)). +appendAscii(RTL_CONSTASCII_STRINGPARAM(\)); +} + +throw css::lang::IllegalArgumentException(aMsg.makeStringAndClear(), xLoader, 1); +} -default: xComponent.clear(); -break; +default: +xComponent.clear(); +break; } } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/classes/fwlresid.cxx|2 +- framework/source/fwe/classes/fwkresid.cxx|2 +- framework/source/uielement/controlmenucontroller.cxx |4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit de30370096b82e4ea24c13b7c7e8f525e074fe60 Author: Andras Timar ati...@suse.com Date: Sun Dec 18 23:16:15 2011 +0100 Always load res of LibO UI locale, not system deflocale fdo#43475 diff --git a/framework/source/classes/fwlresid.cxx b/framework/source/classes/fwlresid.cxx index 768432e..b61bfd0 100644 --- a/framework/source/classes/fwlresid.cxx +++ b/framework/source/classes/fwlresid.cxx @@ -44,7 +44,7 @@ ResMgr* FwlResId::GetResManager() if ( !pResMgr ) { SolarMutexGuard aSolarGuard; -pResMgr = ResMgr::CreateResMgr(fwe); +pResMgr = ResMgr::CreateResMgr(fwe, Application::GetSettings().GetUILocale()); } return pResMgr; diff --git a/framework/source/fwe/classes/fwkresid.cxx b/framework/source/fwe/classes/fwkresid.cxx index cf1bcec..0c0a9d4 100644 --- a/framework/source/fwe/classes/fwkresid.cxx +++ b/framework/source/fwe/classes/fwkresid.cxx @@ -44,7 +44,7 @@ ResMgr* FwkResId::GetResManager() if ( !pResMgr ) { SolarMutexGuard aSolarGuard; -pResMgr = ResMgr::CreateResMgr(fwe); +pResMgr = ResMgr::CreateResMgr(fwe, Application::GetSettings().GetUILocale()); } return pResMgr; diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 7fd52d3..a946858 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -226,7 +226,7 @@ ControlMenuController::~ControlMenuController() // private function void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu ) { -ResMgr* pResMgr = ResMgr::CreateResMgr(svx); +ResMgr* pResMgr = ResMgr::CreateResMgr(svx, Application::GetSettings().GetUILocale()); ResId aResId( RID_SVXIMGLIST_FMEXPL, *pResMgr ); aResId.SetRT( RSC_IMAGELIST ); @@ -375,7 +375,7 @@ void ControlMenuController::impl_setPopupMenu() { if ( m_pResPopupMenu == 0 ) { -ResMgr* pResMgr = ResMgr::CreateResMgr(svx); +ResMgr* pResMgr = ResMgr::CreateResMgr(svx, Application::GetSettings().GetUILocale()); if ( pResMgr ) { ResId aResId( RID_FMSHELL_CONVERSIONMENU, *pResMgr ); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/lomenubar/FrameJob.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit 487968707f9ea36f3873a9349ebb87655f6abb3d Author: August Sodora aug...@gmail.com Date: Mon Nov 21 19:56:51 2011 -0500 cppcheck: C-style pointer casting diff --git a/framework/source/lomenubar/FrameJob.cxx b/framework/source/lomenubar/FrameJob.cxx index 06af939..fd9d5da 100644 --- a/framework/source/lomenubar/FrameJob.cxx +++ b/framework/source/lomenubar/FrameJob.cxx @@ -153,7 +153,7 @@ on_registrar_available (GDBusConnection * /*connection*/, GError *error = NULL; GDBusProxy *proxy; -FrameHelper *helper = (FrameHelper*)user_data; +FrameHelper *helper = static_castFrameHelper*(user_data); unsigned long xid = helper-getXID(); proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, @@ -207,7 +207,7 @@ on_registrar_unavailable (GDBusConnection * /*connection*/, //TODO: Unregister window? // Show menubar -FrameHelper *helper = (FrameHelper*)user_data; +FrameHelper *helper = static_castFrameHelper*(user_data); Reference XFrame xFrame = helper-getFrame (); Reference XPropertySet frameProps (xFrame, UNO_QUERY); Reference XLayoutManager xLayoutManager(frameProps-getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM(LayoutManager))), @@ -343,8 +343,9 @@ FrameJob::getRootMenuitem (Reference XMenu xMenu, gpointer helper) { DbusmenuMenuitem *root = dbusmenu_menuitem_new_with_id (0); -((FrameHelper*)helper)-setRootItem(root); -((FrameHelper*)helper)-rebuildMenu (xMenu, root); +FrameHelper* fHelper = static_castFrameHelper*(helper); +fHelper-setRootItem(root); +fHelper-rebuildMenu (xMenu, root); return root; } ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/loadenv/loadenv.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 718f032a3c9dc5071f86a6d69321dc23d6b56188 Author: Michael Stahl mst...@redhat.com Date: Mon Nov 14 20:35:32 2011 +0100 LoadEnv::impl_makeFrameWindowVisible: fix crash: do not insert Preview property if it does not exist already (dbaccess crashes after throwing uncaught exception because of this when creating new database; regression in 88285f84bdf54147ee5238e97d0d805fa1c127c1) diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 61c520d..e82823b 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1688,14 +1688,14 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference css::awt::X Window* pWindow = VCLUnoHelper::GetWindow(xWindow); if ( pWindow ) { -bool preview(false); -css::uno::Any a = m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_PREVIEW()]; -a = preview; +bool const preview( m_lMediaDescriptor.getUnpackedValueOrDefault( +::comphelper::MediaDescriptor::PROP_PREVIEW(), sal_False) ); bool bForceFrontAndFocus(false); if ( !preview ) { -a = ::comphelper::ConfigurationHelper::readDirectKey( +css::uno::Any const a = +::comphelper::ConfigurationHelper::readDirectKey( xSMGR, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(org.openoffice.Office.Common/View)), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NewDocumentHandling)), ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source
framework/source/loadenv/loadenv.cxx | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) New commits: commit 88285f84bdf54147ee5238e97d0d805fa1c127c1 Author: Lionel Elie Mamane lio...@mamane.lu Date: Sun Nov 13 15:26:41 2011 +0100 fdo#35091 do not honour ForceFocusAndToFront preference for preview diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 409ef40..2e100c1 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1,4 +1,4 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* -*- Mode: C++; eval:(c-set-style bsd); tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1688,14 +1688,21 @@ void LoadEnv::impl_makeFrameWindowVisible(const css::uno::Reference css::awt::X Window* pWindow = VCLUnoHelper::GetWindow(xWindow); if ( pWindow ) { +bool preview(false); +css::uno::Any a = m_lMediaDescriptor[::comphelper::MediaDescriptor::PROP_PREVIEW()]; +a = preview; + bool bForceFrontAndFocus(false); -css::uno::Any a = ::comphelper::ConfigurationHelper::readDirectKey( -xSMGR, - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(org.openoffice.Office.Common/View)), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NewDocumentHandling)), - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ForceFocusAndToFront)), -::comphelper::ConfigurationHelper::E_READONLY); -a = bForceFrontAndFocus; +if ( !preview ) +{ +a = ::comphelper::ConfigurationHelper::readDirectKey( + xSMGR, + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(org.openoffice.Office.Common/View)), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(NewDocumentHandling)), + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(ForceFocusAndToFront)), + ::comphelper::ConfigurationHelper::E_READONLY); +a = bForceFrontAndFocus; +} if( pWindow-IsVisible() (bForceFrontAndFocus || bForceToFront) ) pWindow-ToTop(); ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: framework/source scp2/source
framework/source/services/substitutepathvars.cxx |9 ++--- scp2/source/ooo/directory_ooo.scp|6 +++--- 2 files changed, 5 insertions(+), 10 deletions(-) New commits: commit d0a0513a9cbd25b2bcd933ec337f6366c86917cb Author: Stephan Bergmann sberg...@redhat.com Date: Tue Oct 18 18:49:34 2011 +0200 Undo basis/brand split: move program/{addin,filter,plugin} from basis to brand. And let $(prog), $(progpath), $(progurl) point to brand program/ instead of basis program/. diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx index e7648d2..d7e45ef 100644 --- a/framework/source/services/substitutepathvars.cxx +++ b/framework/source/services/substitutepathvars.cxx @@ -1186,12 +1186,6 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable ::utl::Bootstrap::PathStatus aState; ::rtl::OUString sVal ; -rtl::OUString basis(RTL_CONSTASCII_USTRINGPARAM($OOO_BASE_DIR)); -rtl::Bootstrap::expandMacros(basis); -if( basis.isEmpty() ) { -LOG_ERROR( SubstitutePathVariables::SetPredefinedPathVariables, Bootstrap code has no value for OOO_BASE_DIR!); -} - aState = utl::Bootstrap::locateUserData( sVal ); //There can be the valid case that there is no user installation. For example, unopkg sync //is currently (OOo3.4) run as part of the setup. Then no user installation is required. @@ -1215,7 +1209,8 @@ void SubstitutePathVariables::SetPredefinedPathVariables( PredefinedPathVariable // Detect the program directory // Set $(prog), $(progpath), $(progurl) -INetURLObject aProgObj( basis ); +INetURLObject aProgObj( +aPreDefPathVariables.m_FixedVar[PREDEFVAR_BRANDBASEURL] ); if ( !aProgObj.HasError() aProgObj.insertName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(program)) ) ) { aPreDefPathVariables.m_FixedVar[ PREDEFVAR_PROGPATH ] = aProgObj.GetMainURL(INetURLObject::NO_DECODE); diff --git a/scp2/source/ooo/directory_ooo.scp b/scp2/source/ooo/directory_ooo.scp index 726834a..836e79a 100644 --- a/scp2/source/ooo/directory_ooo.scp +++ b/scp2/source/ooo/directory_ooo.scp @@ -127,7 +127,7 @@ End Directory gid_Dir_Addin Styles = (CREATE); -ParentID = gid_Dir_Program; +ParentID = gid_Brand_Dir_Program; DosName = addin; End @@ -137,7 +137,7 @@ Directory gid_Dir_Addin_Source End Directory gid_Dir_Filter -ParentID = gid_Dir_Program; +ParentID = gid_Brand_Dir_Program; DosName = filter; End @@ -344,7 +344,7 @@ Directory gid_Dir_Work End Directory gid_Dir_Plugin -ParentID = gid_Dir_Program; +ParentID = gid_Brand_Dir_Program; DosName = plugin; Styles = (WORKSTATION, CREATE); End ___ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits