[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/progressmonitor.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit ce3569746922ec0888e436683846631e69bfb19e Author: Stephan Bergmann AuthorDate: Thu Oct 19 10:30:01 2023 +0200 Commit: Stephan Bergmann CommitDate: Thu Oct 19 13:00:38 2023 +0200 Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: UnoControls Change-Id: Ib8b380be99ae23f314f226be6c81bc62a08c13b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158141 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index a22bbd620060..7df767760323 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -39,9 +39,9 @@ using namespace ::com::sun::star::awt; using ::std::vector; -constexpr OUStringLiteral FIXEDTEXT_SERVICENAME = u"com.sun.star.awt.UnoControlFixedText"; -constexpr OUStringLiteral FIXEDTEXT_MODELNAME = u"com.sun.star.awt.UnoControlFixedTextModel"; -constexpr OUStringLiteral CONTROLNAME_TEXT = u"Text"; // identifier the control in container +constexpr OUString FIXEDTEXT_SERVICENAME = u"com.sun.star.awt.UnoControlFixedText"_ustr; +constexpr OUString FIXEDTEXT_MODELNAME = u"com.sun.star.awt.UnoControlFixedTextModel"_ustr; +constexpr OUString CONTROLNAME_TEXT = u"Text"_ustr; // identifier the control in container constexpr OUStringLiteral CONTROLNAME_PROGRESSBAR = u"ProgressBar"; constexpr OUStringLiteral BUTTON_SERVICENAME = u"com.sun.star.awt.UnoControlButton"; constexpr OUStringLiteral CONTROLNAME_BUTTON = u"Button";
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/base/basecontrol.cxx |1 UnoControls/source/controls/framecontrol.cxx| 46 +--- UnoControls/source/controls/statusindicator.cxx |2 + UnoControls/source/inc/framecontrol.hxx |2 - 4 files changed, 22 insertions(+), 29 deletions(-) New commits: commit 9cef1d069a21cb821b1ef880da0358aa2a959a40 Author: Noel Grandin AuthorDate: Tue Sep 12 13:32:21 2023 +0200 Commit: Noel Grandin CommitDate: Tue Sep 12 14:57:24 2023 +0200 loplugin:unodispose in UnoControls Change-Id: Id3cc80804b982cec04e288d0709c5d402e69860d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156841 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx index d926323bd268..146239f177a8 100644 --- a/UnoControls/source/base/basecontrol.cxx +++ b/UnoControls/source/base/basecontrol.cxx @@ -171,6 +171,7 @@ void SAL_CALL BaseControl::dispose() { // to all other paint, focus, etc. m_xMultiplexer->disposeAndClear(); +m_xMultiplexer.clear(); } // set the service manager to disposed diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 87dd4a07f6f9..f58c77a3b76a 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -175,7 +175,25 @@ Reference< XControlModel > SAL_CALL FrameControl::getModel() void SAL_CALL FrameControl::dispose() { -impl_deleteFrame(); +Reference< XFrame2 > xOldFrame; +{ +// do not dispose the frame in this guarded section (deadlock?) +MutexGuard aGuard( m_aMutex ); +xOldFrame = std::move(m_xFrame); +} + +// notify the listeners +sal_Int32 nFrameId = PropertyHandle::Frame; +Reference< XFrame2 > xNullFrame; +Any aNewFrame( , cppu::UnoType::get()); +Any aOldFrame( , cppu::UnoType::get()); +fire( , , , 1, false ); + +// dispose the frame +if( xOldFrame.is() ) +xOldFrame->dispose(); + +m_aConnectionPointContainer.clear(); BaseControl::dispose(); } @@ -402,32 +420,6 @@ void FrameControl::impl_createFrame(const Reference< XWindowPeer >& xPee } } -// private method - -void FrameControl::impl_deleteFrame() -{ -Reference< XFrame2 > xOldFrame; -Reference< XFrame2 > xNullFrame; - -{ -// do not dispose the frame in this guarded section (deadlock?) -MutexGuard aGuard( m_aMutex ); -xOldFrame = m_xFrame; -m_xFrame.clear(); -} - -// notify the listeners -sal_Int32 nFrameId = PropertyHandle::Frame; -Any aNewFrame( , cppu::UnoType::get()); -Any aOldFrame( , cppu::UnoType::get()); -fire( , , , 1, false ); - -// dispose the frame -if( xOldFrame.is() ) -xOldFrame->dispose(); -} - - } // namespace unocontrols extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index 448b193d9a61..d35b5f99b191 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -288,6 +288,8 @@ void SAL_CALL StatusIndicator::dispose () // when other hold a reference at this object !!! xTextControl->dispose(); m_xProgressBar->dispose(); +m_xProgressBar.clear(); +m_xText.clear(); BaseContainerControl::dispose(); } diff --git a/UnoControls/source/inc/framecontrol.hxx b/UnoControls/source/inc/framecontrol.hxx index a1a2afc07be4..514e7cd79994 100644 --- a/UnoControls/source/inc/framecontrol.hxx +++ b/UnoControls/source/inc/framecontrol.hxx @@ -155,8 +155,6 @@ private: const OUString& sURL, const css::uno::Sequence< css::beans::PropertyValue >&seqArguments); -void impl_deleteFrame(); - css::uno::Reference< css::frame::XFrame2 > m_xFrame; OUStringm_sComponentURL; css::uno::Sequence< css::beans::PropertyValue > m_seqLoaderArguments;
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/base/basecontainercontrol.cxx |2 +- UnoControls/source/controls/framecontrol.cxx |2 +- UnoControls/source/controls/statusindicator.cxx |4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 5c1c768e128d9356cbe17adb96ef6290ec3bb1ad Author: Mike Kaganski AuthorDate: Sun Apr 23 20:15:24 2023 +0300 Commit: Mike Kaganski CommitDate: Sat May 27 15:20:51 2023 +0200 Use getXWeak in UnoControls Change-Id: I4e1deaffb3c6926bf57715cb10fc38bf59f791a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150880 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx index 7a6bd508e5b8..bf638a9c56a4 100644 --- a/UnoControls/source/base/basecontainercontrol.cxx +++ b/UnoControls/source/base/basecontainercontrol.cxx @@ -185,7 +185,7 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re maControlInfoList.emplace_back( aNewControl ); // initialize new control -aNewControl.xControl->setContext ( static_cast(this) ); +aNewControl.xControl->setContext (getXWeak()); aNewControl.xControl->addEventListener ( static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) ) ); // when container has a peer... diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 54a0f36f6d05..87dd4a07f6f9 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -252,7 +252,7 @@ sal_Bool FrameControl::convertFastPropertyValue( Any&rConvertedVa if ( !bReturn ) { -throw IllegalArgumentException("unknown handle " + OUString::number(nHandle), static_cast(this), 1); +throw IllegalArgumentException("unknown handle " + OUString::number(nHandle), getXWeak(), 1); } return bReturn; diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index ac4b1c86b7b2..448b193d9a61 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -139,7 +139,7 @@ void SAL_CALL StatusIndicator::start( const OUString& sText, sal_Int32 nRange ) m_xText->setText( sText ); m_xProgressBar->setRange( 0, nRange ); // force repaint ... fixedtext has changed ! -impl_recalcLayout ( WindowEvent(static_cast< OWeakObject* >(this),0,0,impl_getWidth(),impl_getHeight(),0,0,0,0) ); +impl_recalcLayout ( WindowEvent(getXWeak(),0,0,impl_getWidth(),impl_getHeight(),0,0,0,0) ); } // XStatusIndicator @@ -311,7 +311,7 @@ void SAL_CALL StatusIndicator::setPosSize ( ) { // calc new layout for controls -impl_recalcLayout ( WindowEvent(static_cast< OWeakObject* >(this),0,0,nWidth,nHeight,0,0,0,0) ); +impl_recalcLayout ( WindowEvent(getXWeak(),0,0,nWidth,nHeight,0,0,0,0) ); // clear background (!) // [Children were repainted in "recalcLayout" by setPosSize() automatically!] getPeer()->invalidate(2);
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/progressmonitor.cxx | 36 ++-- 1 file changed, 15 insertions(+), 21 deletions(-) New commits: commit 1296ded169adaa93d943eeb0273bf16835f7eb35 Author: Noel Grandin AuthorDate: Thu Jul 22 13:09:20 2021 +0200 Commit: Noel Grandin CommitDate: Thu Jul 22 18:50:49 2021 +0200 fix the mutex locking in impl_searchTopic you cannot take a pointer to something inside a guard and then use that data outside the guard. So remove the broken locking here, and make sure the call sites hold the lock. Change-Id: I37cc363ff937243d7965844e8bcda0018085c656 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119370 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index e8dca471b816..fa7ab1aa7098 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -192,6 +192,9 @@ void SAL_CALL ProgressMonitor::addText( sal_Bool bbeforeProgress ) { +// Ready for multithreading +MutexGuard aGuard ( m_aMutex ); + // Safe impossible cases // Check valid call of this method. DBG_ASSERT ( impl_debug_checkParameter ( rTopic, rText ), "ProgressMonitor::addText()\nCall without valid parameters!\n"); @@ -210,9 +213,6 @@ void SAL_CALL ProgressMonitor::addText( aTextItem.sTopic = rTopic; aTextItem.sText= rText; -// Ready for multithreading -MutexGuard aGuard ( m_aMutex ); - // ... and insert it in right list. if ( bbeforeProgress ) { @@ -235,15 +235,15 @@ void SAL_CALL ProgressMonitor::removeText ( const OUString& rTopic, sal_Bool bbe // Check valid call of this method. DBG_ASSERT ( impl_debug_checkParameter ( rTopic ), "ProgressMonitor::removeText()\nCall without valid parameters!" ); +// Ready for multithreading +MutexGuard aGuard ( m_aMutex ); + // Search the topic ... IMPL_TextlistItem* pSearchItem = impl_searchTopic ( rTopic, bbeforeProgress ); if ( pSearchItem == nullptr ) return; -// Ready for multithreading -MutexGuard aGuard ( m_aMutex ); - // ... delete item from right list ... if ( bbeforeProgress ) { @@ -278,14 +278,14 @@ void SAL_CALL ProgressMonitor::updateText ( // Check valid call of this method. DBG_ASSERT ( impl_debug_checkParameter ( rTopic, rText ), "ProgressMonitor::updateText()\nCall without valid parameters!\n" ); +// Ready for multithreading +MutexGuard aGuard ( m_aMutex ); + // Search topic ... IMPL_TextlistItem* pSearchItem = impl_searchTopic ( rTopic, bbeforeProgress ); if ( pSearchItem != nullptr ) { -// Ready for multithreading -MutexGuard aGuard ( m_aMutex ); - // ... update text ... pSearchItem->sText = rText; @@ -791,20 +791,14 @@ IMPL_TextlistItem* ProgressMonitor::impl_searchTopic ( std::u16string_view rTopi // Get right textlist for following operations. ::std::vector< IMPL_TextlistItem >* pTextList; -// Ready for multithreading +if (bbeforeProgress) { -MutexGuard aGuard(m_aMutex); - -if (bbeforeProgress) -{ -pTextList = _Top; -} -else -{ -pTextList = _Bottom; -} +pTextList = _Top; +} +else +{ +pTextList = _Bottom; } -// Switch off guard. // Search the topic in textlist. size_t nPosition= 0; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/progressmonitor.cxx | 44 +++- UnoControls/source/inc/progressmonitor.hxx |4 +- 2 files changed, 23 insertions(+), 25 deletions(-) New commits: commit d1de326b0b2a1208969e36f19010fdd8ee2a4fb7 Author: Noel Grandin AuthorDate: Thu Jul 22 13:05:56 2021 +0200 Commit: Noel Grandin CommitDate: Thu Jul 22 14:06:02 2021 +0200 no need to use unique_ptr here for such a small object Change-Id: Idbcad7469b3871c05226e90b8d46223fe746cce2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119369 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index bf384dfb7243..e8dca471b816 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -204,11 +204,11 @@ void SAL_CALL ProgressMonitor::addText( } // Else ... take memory for new item ... -std::unique_ptr pTextItem(new IMPL_TextlistItem); +IMPL_TextlistItem aTextItem; // Set values ... -pTextItem->sTopic = rTopic; -pTextItem->sText= rText; +aTextItem.sTopic = rTopic; +aTextItem.sText= rText; // Ready for multithreading MutexGuard aGuard ( m_aMutex ); @@ -216,11 +216,11 @@ void SAL_CALL ProgressMonitor::addText( // ... and insert it in right list. if ( bbeforeProgress ) { -maTextlist_Top.push_back( std::move(pTextItem) ); +maTextlist_Top.push_back( aTextItem ); } else { -maTextlist_Bottom.push_back( std::move(pTextItem) ); +maTextlist_Bottom.push_back( aTextItem ); } // ... update window @@ -248,22 +248,20 @@ void SAL_CALL ProgressMonitor::removeText ( const OUString& rTopic, sal_Bool bbe if ( bbeforeProgress ) { auto itr = std::find_if( maTextlist_Top.begin(), maTextlist_Top.end(), -[&] (std::unique_ptr const ) -{ return p.get() == pSearchItem; } ); +[&] (IMPL_TextlistItem const ) +{ return == pSearchItem; } ); if (itr != maTextlist_Top.end()) maTextlist_Top.erase(itr); } else { auto itr = std::find_if( maTextlist_Bottom.begin(), maTextlist_Bottom.end(), -[&] (std::unique_ptr const ) -{ return p.get() == pSearchItem; } ); +[&] (IMPL_TextlistItem const ) +{ return == pSearchItem; } ); if (itr != maTextlist_Bottom.end()) maTextlist_Bottom.erase(itr); } -delete pSearchItem; - // ... and update window. impl_rebuildFixedText (); impl_recalcLayout (); @@ -720,9 +718,9 @@ void ProgressMonitor::impl_rebuildFixedText () // Collect all topics from list and format text. // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! -for (auto const & pSearchItem : maTextlist_Top) +for (auto const & rSearchItem : maTextlist_Top) { -aCollectString.append(pSearchItem->sTopic + "\n"); +aCollectString.append(rSearchItem.sTopic + "\n"); } m_xTopic_Top->setText ( aCollectString.makeStringAndClear() ); @@ -735,9 +733,9 @@ void ProgressMonitor::impl_rebuildFixedText () // Collect all topics from list and format text. // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! -for (auto const & pSearchItem : maTextlist_Top) +for (auto const & rSearchItem : maTextlist_Top) { -aCollectString.append(pSearchItem->sText + "\n"); +aCollectString.append(rSearchItem.sText + "\n"); } m_xText_Top->setText ( aCollectString.makeStringAndClear() ); @@ -752,9 +750,9 @@ void ProgressMonitor::impl_rebuildFixedText () // Collect all topics from list and format text. // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! -for (auto const & pSearchItem : maTextlist_Bottom) +for (auto const & rSearchItem : maTextlist_Bottom) { -aCollectString.append(pSearchItem->sTopic + "\n"); +aCollectString.append(rSearchItem.sTopic + "\n"); } m_xTopic_Bottom->setText ( aCollectString.makeStringAndClear() ); @@ -768,9 +766,9 @@ void ProgressMonitor::impl_rebuildFixedText () // Collect all topics from list and format text. // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! -for (auto const & pSearchItem : maTextlist_Bottom) +for (auto const & rSearchItem : maTextlist_Bottom) { -aCollectString.append(pSearchItem->sText + "\n"); +
[Libreoffice-commits] core.git: UnoControls/source unoidl/source unotools/source unoxml/qa unoxml/source
UnoControls/source/controls/progressmonitor.cxx |4 ++-- UnoControls/source/controls/statusindicator.cxx |4 ++-- unoidl/source/sourceprovider-parser.y |2 +- unoidl/source/unoidl-write.cxx | 22 +++--- unotools/source/config/confignode.cxx |2 +- unotools/source/misc/closeveto.cxx |4 ++-- unotools/source/ucbhelper/ucblockbytes.cxx |2 +- unoxml/qa/unit/domtest.cxx | 24 unoxml/source/dom/attributesmap.cxx | 12 ++-- unoxml/source/dom/childlist.cxx |3 +-- unoxml/source/dom/document.cxx |6 +++--- unoxml/source/dom/documentbuilder.cxx |8 ++-- unoxml/source/dom/element.cxx |4 ++-- unoxml/source/dom/elementlist.cxx |4 +--- unoxml/source/dom/node.cxx | 24 +++- unoxml/source/events/eventdispatcher.cxx|2 +- unoxml/source/rdf/librdf_repository.cxx |7 +++ unoxml/source/xpath/nodelist.cxx|3 +-- 18 files changed, 55 insertions(+), 82 deletions(-) New commits: commit 9bd827270646be509060ddb92be4eae20b277b91 Author: Noel AuthorDate: Tue Feb 16 15:47:57 2021 +0200 Commit: Noel Grandin CommitDate: Tue Feb 16 20:17:39 2021 +0100 loplugin:referencecasting in UnoControls..unoxml Change-Id: I42f216b6115be693a4e57d70f6cbbf11b62ec185 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110998 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index 9902758f8536..05296e35915b 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -87,7 +87,7 @@ ProgressMonitor::ProgressMonitor( const css::uno::Reference< XComponentContext > addControl ( CONTROLNAME_TEXT, xRef_Topic_Bottom); addControl ( CONTROLNAME_TEXT, xRef_Text_Bottom ); addControl ( CONTROLNAME_BUTTON, xRef_Button); -addControl ( CONTROLNAME_PROGRESSBAR, m_xProgressBar.get() ); +addControl ( CONTROLNAME_PROGRESSBAR, m_xProgressBar ); // FixedText make it automatically visible by himself ... but not the progressbar !!! // it must be set explicitly @@ -494,7 +494,7 @@ void SAL_CALL ProgressMonitor::dispose () removeControl ( xRef_Topic_Bottom ); removeControl ( xRef_Text_Bottom); removeControl ( xRef_Button ); -removeControl ( m_xProgressBar.get() ); +removeControl ( m_xProgressBar ); // don't use "...->clear ()" or "... = XFixedText ()" // when other hold a reference at this object !!! diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index 3ce92b94ceed..f41088caca3d 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -59,7 +59,7 @@ StatusIndicator::StatusIndicator( const css::uno::Reference< XComponentContext > xTextControl->setModel( css::uno::Reference< XControlModel >( rxContext->getServiceManager()->createInstanceWithContext( FIXEDTEXT_MODELNAME, rxContext ), UNO_QUERY ) ); // ... and add controls to basecontainercontrol! addControl( CONTROLNAME_TEXT, xTextControl); -addControl( CONTROLNAME_PROGRESSBAR, m_xProgressBar.get() ); +addControl( CONTROLNAME_PROGRESSBAR, m_xProgressBar ); // FixedText make it automatically visible by himself ... but not the progressbar !!! // it must be set explicitly m_xProgressBar->setVisible( true ); @@ -305,7 +305,7 @@ void SAL_CALL StatusIndicator::dispose () css::uno::Reference< XControl > xTextControl ( m_xText , UNO_QUERY ); removeControl( xTextControl ); -removeControl( m_xProgressBar.get() ); +removeControl( m_xProgressBar ); // don't use "...->clear ()" or "... = XFixedText ()" // when other hold a reference at this object !!! diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y index 9d1dd5ae49d0..326d0dd7a8c9 100644 --- a/unoidl/source/sourceprovider-parser.y +++ b/unoidl/source/sourceprovider-parser.y @@ -1560,7 +1560,7 @@ interfaceDefn: YYERROR; } data->entities[data->currentName] = unoidl::detail::SourceProviderEntity( - pad.get()); + pad); } '{' interfaceMembers '}' ';' { diff --git a/unoidl/source/unoidl-write.cxx b/unoidl/source/unoidl-write.cxx index 1afca0e218b0..8ffcaa040d7d 100644 --- a/unoidl/source/unoidl-write.cxx +++ b/unoidl/source/unoidl-write.cxx @@ -467,7 +467,7 @@ sal_uInt64 writeMap( bool ann = !ent2->getAnnotations().empty() || hasNotEmptyAnnotations(ent2->getMembers());
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/base/basecontainercontrol.cxx | 104 +++--- UnoControls/source/base/basecontrol.cxx | 86 +- UnoControls/source/base/multiplexer.cxx | 36 +++ UnoControls/source/controls/progressbar.cxx | 102 +++--- UnoControls/source/controls/progressmonitor.cxx | 106 +++ UnoControls/source/controls/statusindicator.cxx | 58 ++-- 6 files changed, 246 insertions(+), 246 deletions(-) New commits: commit 33abb535a753b710e439b66ccc67e826f49f6275 Author: Noel Grandin AuthorDate: Sun Aug 2 20:09:18 2020 +0200 Commit: Noel Grandin CommitDate: Sun Aug 2 22:45:48 2020 +0200 loplugin:flatten in UnoControls Change-Id: I0702283083297fc956eb8bd5132a1144286e1fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99968 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx index dda72799d550..2f21979cc644 100644 --- a/UnoControls/source/base/basecontainercontrol.cxx +++ b/UnoControls/source/base/basecontainercontrol.cxx @@ -114,18 +114,18 @@ Any SAL_CALL BaseContainerControl::queryAggregation( const Type& aType ) void SAL_CALL BaseContainerControl::createPeer( const Reference< XToolkit >& xToolkit, const Reference< XWindowPeer >& xParent ) { -if ( !getPeer().is() ) -{ -// create own peer -BaseControl::createPeer( xToolkit, xParent ); +if ( getPeer().is() ) +return; -// create peers at all children -Sequence< Reference< XControl > > seqControlList = getControls(); +// create own peer +BaseControl::createPeer( xToolkit, xParent ); -for ( auto& rxControl : seqControlList ) -{ -rxControl->createPeer( xToolkit, getPeer() ); -} +// create peers at all children +Sequence< Reference< XControl > > seqControlList = getControls(); + +for ( auto& rxControl : seqControlList ) +{ +rxControl->createPeer( xToolkit, getPeer() ); } } @@ -221,22 +221,22 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re // Send message to all listener OInterfaceContainerHelper* pInterfaceContainer = m_aListeners.getContainer( cppu::UnoType::get()); -if (pInterfaceContainer) -{ -// Build event -ContainerEvent aEvent; +if (!pInterfaceContainer) +return; -aEvent.Source = *this; -aEvent.Element <<= rControl; +// Build event +ContainerEvent aEvent; -// Get all listener -OInterfaceIteratorHelperaIterator (*pInterfaceContainer); +aEvent.Source = *this; +aEvent.Element <<= rControl; -// Send event -while ( aIterator.hasMoreElements() ) -{ - static_cast(aIterator.next())->elementInserted (aEvent); -} +// Get all listener +OInterfaceIteratorHelperaIterator (*pInterfaceContainer); + +// Send event +while ( aIterator.hasMoreElements() ) +{ +static_cast(aIterator.next())->elementInserted (aEvent); } } @@ -244,46 +244,46 @@ void SAL_CALL BaseContainerControl::addControl ( const OUString& rName, const Re void SAL_CALL BaseContainerControl::removeControl ( const Reference< XControl > & rControl ) { -if ( rControl.is() ) -{ -// Ready for multithreading -MutexGuard aGuard (m_aMutex); +if ( !rControl.is() ) +return; + +// Ready for multithreading +MutexGuard aGuard (m_aMutex); -size_t nControls = maControlInfoList.size(); +size_t nControls = maControlInfoList.size(); -for ( size_t n = 0; n < nControls; n++ ) +for ( size_t n = 0; n < nControls; n++ ) +{ +// Search for right control +IMPL_ControlInfo* pControl = maControlInfoList[ n ].get(); +if ( rControl == pControl->xControl ) { -// Search for right control -IMPL_ControlInfo* pControl = maControlInfoList[ n ].get(); -if ( rControl == pControl->xControl ) -{ -//.is it found ... remove listener from control -pControl->xControl->removeEventListener (static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) )); -pControl->xControl->setContext ( Reference< XInterface > () ); +//.is it found ... remove listener from control +pControl->xControl->removeEventListener (static_cast< XEventListener* >( static_cast< XWindowListener* >( this ) )); +pControl->xControl->setContext ( Reference< XInterface > () ); -// ... free memory -maControlInfoList.erase(maControlInfoList.begin() + n); +// ... free memory +
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/OConnectionPointHelper.cxx | 12 1 file changed, 4 insertions(+), 8 deletions(-) New commits: commit d8fe52d759ba033bd661893f12d17576d24276db Author: nienzu AuthorDate: Wed Feb 19 14:49:30 2020 +0800 Commit: Michael Stahl CommitDate: Wed Feb 19 12:31:30 2020 +0100 tdf#42982 add detail exception reason for UnoControls Change-Id: Ia62a0015d68fe819113322e27b93054d38d98aea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88996 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx index a7f18ea2973b..f2c99421d3c6 100644 --- a/UnoControls/source/controls/OConnectionPointHelper.cxx +++ b/UnoControls/source/controls/OConnectionPointHelper.cxx @@ -105,8 +105,7 @@ Type SAL_CALL OConnectionPointHelper::getConnectionType() // Set default return value, if method failed. if ( !impl_LockContainer() ) { -// Container not exist! It's a runtime error. -throw RuntimeException(); +throw RuntimeException("Container does not exist!"); } // If container reference valid, return right type of supported interfaces of THIS connectionpoint. @@ -149,8 +148,7 @@ void SAL_CALL OConnectionPointHelper::advise( const Reference< XInterface >& xLi // Operation is permitted only, if reference to container is valid! if ( !impl_LockContainer() ) { -// Container not exist! It's a runtime error. -throw RuntimeException(); +throw RuntimeException("Container does not exist!"); } // Forward it to OConnectionPointHelperContainer! m_pContainerImplementation->advise( m_aInterfaceType, xListener ); @@ -167,8 +165,7 @@ void SAL_CALL OConnectionPointHelper::unadvise( const Reference< XInterface >& x // Operation is permitted only, if reference to container is valid! if ( !impl_LockContainer() ) { -// Container not exist! It's a runtime error. -throw RuntimeException(); +throw RuntimeException("Container does not exist!"); } // Forward it to OConnectionPointHelperContainer! @@ -186,8 +183,7 @@ Sequence< Reference< XInterface > > SAL_CALL OConnectionPointHelper::getConnecti // Operation is permitted only, if reference to container is valid! if ( !impl_LockContainer() ) { -// Container not exist! It's a runtime error. -throw RuntimeException(); +throw RuntimeException("Container does not exist!"); } // Set default return value, if method failed. Sequence< Reference< XInterface > > seqReturnConnections; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/progressmonitor.cxx |9 + UnoControls/source/controls/statusindicator.cxx |5 + UnoControls/source/inc/progressmonitor.hxx |8 UnoControls/source/inc/statusindicator.hxx |4 4 files changed, 14 insertions(+), 12 deletions(-) New commits: commit 8e2e03b1c36375735c4fcfa44ba762d0cbc4ef29 Author: Noel Grandin AuthorDate: Mon Sep 30 09:48:30 2019 +0200 Commit: Noel Grandin CommitDate: Mon Sep 30 13:12:43 2019 +0200 loplugin:duplicate-defines in UnoControls these are only used by internal code, so move inside the relevant .cxx file Change-Id: If7cdf17a49ff3089ad2100961092dd2747523a8d Reviewed-on: https://gerrit.libreoffice.org/79830 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index f973bc89c072..76633befd14d 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -39,6 +39,15 @@ using namespace ::com::sun::star::awt; using ::std::vector; using ::std::find; +#define FIXEDTEXT_SERVICENAME "com.sun.star.awt.UnoControlFixedText" +#define FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel" +#define CONTROLNAME_TEXT"Text" // identifier the control in container +#define CONTROLNAME_PROGRESSBAR "ProgressBar" +#define BUTTON_SERVICENAME "com.sun.star.awt.UnoControlButton" +#define CONTROLNAME_BUTTON "Button" +#define BUTTON_MODELNAME "com.sun.star.awt.UnoControlButtonModel" +#define DEFAULT_BUTTONLABEL "Abbrechen" + namespace unocontrols { ProgressMonitor::ProgressMonitor( const css::uno::Reference< XComponentContext >& rxContext ) diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index 7ac0cd9a4b40..033c787d01c2 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -34,6 +34,11 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::task; +#define FIXEDTEXT_SERVICENAME "com.sun.star.awt.UnoControlFixedText" +#define FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel" +#define CONTROLNAME_TEXT"Text" // identifier the control in container +#define CONTROLNAME_PROGRESSBAR "ProgressBar" // -||- + namespace unocontrols { // construct/destruct diff --git a/UnoControls/source/inc/progressmonitor.hxx b/UnoControls/source/inc/progressmonitor.hxx index 38ad0adcc3ae..339b6e6cb6cc 100644 --- a/UnoControls/source/inc/progressmonitor.hxx +++ b/UnoControls/source/inc/progressmonitor.hxx @@ -38,14 +38,6 @@ namespace unocontrols { class ProgressBar; #define PROGRESSMONITOR_FREEBORDER 10 // border around and between the controls -#define FIXEDTEXT_SERVICENAME "com.sun.star.awt.UnoControlFixedText" -#define BUTTON_SERVICENAME "com.sun.star.awt.UnoControlButton" -#define FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel" -#define BUTTON_MODELNAME "com.sun.star.awt.UnoControlButtonModel" -#define CONTROLNAME_TEXT"Text" // identifier the control in container -#define CONTROLNAME_BUTTON "Button" // -||- -#define CONTROLNAME_PROGRESSBAR "ProgressBar" // -||- -#define DEFAULT_BUTTONLABEL "Abbrechen" #define PROGRESSMONITOR_DEFAULT_TOPIC "" #define PROGRESSMONITOR_DEFAULT_TEXT"" #define PROGRESSMONITOR_LINECOLOR_BRIGHTsal_Int32(Color( 0x00, 0xFF, 0xFF, 0xFF )) // white diff --git a/UnoControls/source/inc/statusindicator.hxx b/UnoControls/source/inc/statusindicator.hxx index 884034c1747b..daff3e169b47 100644 --- a/UnoControls/source/inc/statusindicator.hxx +++ b/UnoControls/source/inc/statusindicator.hxx @@ -37,10 +37,6 @@ namespace unocontrols { class ProgressBar; #define STATUSINDICATOR_FREEBORDER 5 // border around and between the controls -#define FIXEDTEXT_SERVICENAME "com.sun.star.awt.UnoControlFixedText" -#define FIXEDTEXT_MODELNAME "com.sun.star.awt.UnoControlFixedTextModel" -#define
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/framecontrol.cxx|7 +++ UnoControls/source/controls/progressbar.cxx |4 ++-- UnoControls/source/controls/progressmonitor.cxx |4 ++-- UnoControls/source/controls/statusindicator.cxx |4 ++-- UnoControls/source/inc/framecontrol.hxx |4 ++-- UnoControls/source/inc/progressbar.hxx |4 ++-- UnoControls/source/inc/progressmonitor.hxx |4 ++-- UnoControls/source/inc/statusindicator.hxx |4 ++-- 8 files changed, 17 insertions(+), 18 deletions(-) New commits: commit 0bb521f4f9a5af955c704339ffbe02475c8e48cc Author: Noel Grandin AuthorDate: Sat Aug 24 14:38:42 2019 +0200 Commit: Noel Grandin CommitDate: Sat Aug 24 16:12:11 2019 +0200 loplugin:returnconstval in UnoControls Change-Id: I6e855ee6dc2075334e92803d87e660f389b54d53 Reviewed-on: https://gerrit.libreoffice.org/78055 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 29545629b508..a954c112d6f1 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -250,15 +250,14 @@ void SAL_CALL FrameControl::unadvise( const Type& aTyp // impl but public method to register service -const Sequence< OUString > FrameControl::impl_getStaticSupportedServiceNames() +Sequence< OUString > FrameControl::impl_getStaticSupportedServiceNames() { -Sequence seqServiceNames { "com.sun.star.frame.FrameControl" }; -return seqServiceNames; +return { "com.sun.star.frame.FrameControl" }; } // impl but public method to register service -const OUString FrameControl::impl_getStaticImplementationName() +OUString FrameControl::impl_getStaticImplementationName() { return "stardiv.UnoControls.FrameControl"; } diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx index 79fd29a6c5a1..37ac9e379195 100644 --- a/UnoControls/source/controls/progressbar.cxx +++ b/UnoControls/source/controls/progressbar.cxx @@ -285,14 +285,14 @@ Reference< XControlModel > SAL_CALL ProgressBar::getModel() // impl but public method to register service -const Sequence< OUString > ProgressBar::impl_getStaticSupportedServiceNames() +Sequence< OUString > ProgressBar::impl_getStaticSupportedServiceNames() { return css::uno::Sequence(); } // impl but public method to register service -const OUString ProgressBar::impl_getStaticImplementationName() +OUString ProgressBar::impl_getStaticImplementationName() { return "stardiv.UnoControls.ProgressBar"; } diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index c510cca4e18d..f973bc89c072 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -522,13 +522,13 @@ void SAL_CALL ProgressMonitor::setPosSize ( sal_Int32 nX, sal_Int32 nY, sal_Int3 } // impl but public method to register service -const Sequence< OUString > ProgressMonitor::impl_getStaticSupportedServiceNames() +Sequence< OUString > ProgressMonitor::impl_getStaticSupportedServiceNames() { return css::uno::Sequence(); } // impl but public method to register service -const OUString ProgressMonitor::impl_getStaticImplementationName() +OUString ProgressMonitor::impl_getStaticImplementationName() { return "stardiv.UnoControls.ProgressMonitor"; } diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index c1867742f0b5..7ac0cd9a4b40 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -340,14 +340,14 @@ void SAL_CALL StatusIndicator::setPosSize ( // impl but public method to register service -const Sequence< OUString > StatusIndicator::impl_getStaticSupportedServiceNames() +Sequence< OUString > StatusIndicator::impl_getStaticSupportedServiceNames() { return css::uno::Sequence(); } // impl but public method to register service -const OUString StatusIndicator::impl_getStaticImplementationName() +OUString StatusIndicator::impl_getStaticImplementationName() { return "stardiv.UnoControls.StatusIndicator"; } diff --git a/UnoControls/source/inc/framecontrol.hxx b/UnoControls/source/inc/framecontrol.hxx index c76bc75163db..2ed78f7bddfe 100644 --- a/UnoControls/source/inc/framecontrol.hxx +++ b/UnoControls/source/inc/framecontrol.hxx @@ -127,9 +127,9 @@ public: // impl but public methods to register service! -static const css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames(); +static css::uno::Sequence< OUString > impl_getStaticSupportedServiceNames(); -static const OUString impl_getStaticImplementationName(); +static OUString impl_getStaticImplementationName(); protected:
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/base/basecontainercontrol.cxx |5 ++--- UnoControls/source/base/multiplexer.cxx | 12 2 files changed, 6 insertions(+), 11 deletions(-) New commits: commit a11572dc27b5fea1935b63208c779a20eb56 Author: Arkadiy Illarionov AuthorDate: Wed May 8 23:47:55 2019 +0300 Commit: Noel Grandin CommitDate: Thu May 9 08:48:32 2019 +0200 Simplify Sequence iterations in UnoControls Use range-based loops Change-Id: I4d3be75bb83c74267b9dec6f1dcdc105c292be9d Reviewed-on: https://gerrit.libreoffice.org/72011 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx index 91efd22a28f7..3c6469def44a 100644 --- a/UnoControls/source/base/basecontainercontrol.cxx +++ b/UnoControls/source/base/basecontainercontrol.cxx @@ -117,11 +117,10 @@ void SAL_CALL BaseContainerControl::createPeer( const Reference< XToolkit >& // create peers at all children Sequence< Reference< XControl > > seqControlList = getControls(); -sal_uInt32 nControls = seqControlList.getLength(); -for ( sal_uInt32 n=0; ncreatePeer( xToolkit, getPeer() ); +rxControl->createPeer( xToolkit, getPeer() ); } } } diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx index e1353add0d80..d7008c652083 100644 --- a/UnoControls/source/base/multiplexer.cxx +++ b/UnoControls/source/base/multiplexer.cxx @@ -156,22 +156,18 @@ void OMRCListenerMultiplexerHelper::setPeer( const Reference< XWindow >& xPeer ) { // get all types from the listener added to the peer Sequence< Type >aContainedTypes = m_aListenerHolder.getContainedTypes(); -const Type* pArray = aContainedTypes.getConstArray(); -sal_Int32 nCount = aContainedTypes.getLength(); // loop over all listener types and remove the listeners from the peer -for( sal_Int32 i=0; iaContainedTypes = m_aListenerHolder.getContainedTypes(); -const Type* pArray = aContainedTypes.getConstArray(); -sal_Int32 nCount = aContainedTypes.getLength(); // loop over all listener types and add the listeners to the peer -for( sal_Int32 i = 0; i < nCount; i++ ) -impl_adviseToPeer( m_xPeer, pArray[i] ); +for( const auto& rContainedType : aContainedTypes ) +impl_adviseToPeer( m_xPeer, rContainedType ); } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/base/basecontainercontrol.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0317835baf1f9531365131203decc6eb44b273e4 Author: Andrea Gelmini AuthorDate: Thu Apr 4 19:21:39 2019 + Commit: Julien Nabet CommitDate: Fri Apr 5 09:56:29 2019 +0200 Fix typo Change-Id: I49ffb2fff63a8818c4e84a26923fca1484bf1e36 Reviewed-on: https://gerrit.libreoffice.org/70284 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx index ffd67a3388b0..91efd22a28f7 100644 --- a/UnoControls/source/base/basecontainercontrol.cxx +++ b/UnoControls/source/base/basecontainercontrol.cxx @@ -55,7 +55,7 @@ Any SAL_CALL BaseContainerControl::queryInterface( const Type& rType ) Reference< XInterface > xDel = BaseControl::impl_getDelegator(); if ( xDel.is() ) { -// If a delegator exist, forward question to his queryInterface. +// If a delegator exists, forward question to its queryInterface. // Delegator will ask its own queryAggregation! aReturn = xDel->queryInterface( rType ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/base/basecontainercontrol.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit fd33e13d758ec71389ba114360e4828a88ac4181 Author: Andrea Gelmini AuthorDate: Tue Apr 2 23:35:48 2019 +0200 Commit: Julien Nabet CommitDate: Wed Apr 3 08:52:02 2019 +0200 Fix typo Change-Id: I42090a462b15fbc537b0fdb5eaf66f60a213e5ff Reviewed-on: https://gerrit.libreoffice.org/70103 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx index 40bb1dc98166..ffd67a3388b0 100644 --- a/UnoControls/source/base/basecontainercontrol.cxx +++ b/UnoControls/source/base/basecontainercontrol.cxx @@ -55,13 +55,13 @@ Any SAL_CALL BaseContainerControl::queryInterface( const Type& rType ) Reference< XInterface > xDel = BaseControl::impl_getDelegator(); if ( xDel.is() ) { -// If an delegator exist, forward question to his queryInterface. -// Delegator will ask his own queryAggregation! +// If a delegator exist, forward question to his queryInterface. +// Delegator will ask its own queryAggregation! aReturn = xDel->queryInterface( rType ); } else { -// If an delegator unknown, forward question to own queryAggregation. +// If a delegator is unknown, forward question to own queryAggregation. aReturn = queryAggregation( rType ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/statusindicator.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit d1496ca658650d4e19baa05f72445ab69ca96860 Author: Andrea Gelmini AuthorDate: Tue Apr 2 23:36:18 2019 +0200 Commit: Julien Nabet CommitDate: Wed Apr 3 07:51:12 2019 +0200 Fix typo Change-Id: I7831896b8898f0cb20589fbd241b97fcc21db366 Reviewed-on: https://gerrit.libreoffice.org/70108 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx index 4cdf100299ce..c1c9d3597beb 100644 --- a/UnoControls/source/controls/statusindicator.cxx +++ b/UnoControls/source/controls/statusindicator.cxx @@ -76,13 +76,13 @@ Any SAL_CALL StatusIndicator::queryInterface( const Type& rType ) css::uno::Reference< XInterface > xDel = BaseContainerControl::impl_getDelegator(); if ( xDel.is() ) { -// If an delegator exist, forward question to his queryInterface. -// Delegator will ask his own queryAggregation! +// If a delegator exists, forward question to its queryInterface. +// Delegator will ask its own queryAggregation! aReturn = xDel->queryInterface( rType ); } else { -// If an delegator unknown, forward question to own queryAggregation. +// If a delegator is unknown, forward question to own queryAggregation. aReturn = queryAggregation( rType ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/progressmonitor.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 94ac464dd5bbe942e7fc2bb359a4d368fa298bdc Author: Andrea Gelmini AuthorDate: Tue Apr 2 23:36:56 2019 +0200 Commit: Julien Nabet CommitDate: Wed Apr 3 07:49:47 2019 +0200 Fix typo Change-Id: I546735f427a47d9ada1589e1861d0cf696788b05 Reviewed-on: https://gerrit.libreoffice.org/70107 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index c7da6f15ab17..7e439beb5e60 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -111,13 +111,13 @@ Any SAL_CALL ProgressMonitor::queryInterface( const Type& rType ) css::uno::Reference< XInterface > xDel = BaseContainerControl::impl_getDelegator(); if ( xDel.is() ) { -// If an delegator exist, forward question to his queryInterface. -// Delegator will ask his own queryAggregation! +// If a delegator exists, forward question to its queryInterface. +// Delegator will ask its own queryAggregation! aReturn = xDel->queryInterface( rType ); } else { -// If an delegator unknown, forward question to own queryAggregation. +// If a delegator is unknown, forward question to own queryAggregation. aReturn = queryAggregation( rType ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/base/basecontrol.cxx | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) New commits: commit 78f2aa9f5e13ec4cfbb9992e3ce45fcaace83023 Author: Andrea Gelmini AuthorDate: Tue Apr 2 23:31:44 2019 +0200 Commit: Julien Nabet CommitDate: Wed Apr 3 07:49:02 2019 +0200 Fix typo Change-Id: I0e8f761768c7faf3da1d11d6fe02ee24e1180cf2 Reviewed-on: https://gerrit.libreoffice.org/70104 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx index e2ce368be91d..06adc4ae4ddd 100644 --- a/UnoControls/source/base/basecontrol.cxx +++ b/UnoControls/source/base/basecontrol.cxx @@ -74,13 +74,13 @@ Any SAL_CALL BaseControl::queryInterface( const Type& rType ) Any aReturn; if ( m_xDelegator.is() ) { -// If an delegator exist, forward question to his queryInterface. -// Delegator will ask his own queryAggregation! +// If a delegator exists, forward question to its queryInterface. +// Delegator will ask its own queryAggregation! aReturn = m_xDelegator->queryInterface( rType ); } else { -// If an delegator unknown, forward question to own queryAggregation. +// If a delegator is unknown, forward question to own queryAggregation. aReturn = queryAggregation( rType ); } @@ -566,7 +566,7 @@ void SAL_CALL BaseControl::draw(sal_Int32 nX , // Ready for multithreading MutexGuard aGuard( m_aMutex ); -// - paint to an view +// - paint to a view // - use the method "paint()" // - see also "windowPaint()" impl_paint( nX, nY, m_xGraphicsView ); @@ -576,7 +576,7 @@ void SAL_CALL BaseControl::draw(sal_Int32 nX , sal_Bool SAL_CALL BaseControl::setGraphics( const Reference< XGraphics >& xDevice ) { -// - set the graphics for an view +// - set the graphics for a view // - in this class exist 2 graphics-member ... one for peer[_xGraphicsPeer] and one for view[_xGraphicsView] // - they are used by "windowPaint() and draw()", forwarded to "paint ()" bool bReturn = false; @@ -699,7 +699,7 @@ void SAL_CALL BaseControl::windowHidden( const EventObject& /*aEvent*/ ) WindowDescriptor BaseControl::impl_getWindowDescriptor( const Reference< XWindowPeer >& xParentPeer ) { -// - used from "createPeer()" to set the values of an css::awt::WindowDescriptor !!! +// - used from "createPeer()" to set the values of a css::awt::WindowDescriptor !!! // - if you will change the descriptor-values, you must override this virtual function // - the caller must release the memory for this dynamical descriptor !!! ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/progressbar.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 11c40f5b75a328541b5b4994534cb575553943dd Author: Andrea Gelmini AuthorDate: Tue Apr 2 23:38:12 2019 +0200 Commit: Julien Nabet CommitDate: Wed Apr 3 07:47:44 2019 +0200 Fix typo Change-Id: I907b28c98133162a31835ebaeae6244dc8735752 Reviewed-on: https://gerrit.libreoffice.org/70106 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx index c4937e1f1d66..0d3b03d695af 100644 --- a/UnoControls/source/controls/progressbar.cxx +++ b/UnoControls/source/controls/progressbar.cxx @@ -67,13 +67,13 @@ Any SAL_CALL ProgressBar::queryInterface( const Type& rType ) Reference< XInterface > xDel = BaseControl::impl_getDelegator(); if ( xDel.is() ) { -// If an delegator exist, forward question to his queryInterface. -// Delegator will ask his own queryAggregation! +// If a delegator exists, forward question to its queryInterface. +// Delegator will ask its own queryAggregation! aReturn = xDel->queryInterface( rType ); } else { -// If an delegator unknown, forward question to own queryAggregation. +// If a delegator is unknown, forward question to own queryAggregation. aReturn = queryAggregation( rType ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/framecontrol.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 4852ca0f867a624b975e00be8878aa338dfbe971 Author: Andrea Gelmini AuthorDate: Tue Apr 2 23:37:42 2019 +0200 Commit: Julien Nabet CommitDate: Wed Apr 3 07:07:13 2019 +0200 Fix typo Change-Id: I794be89bed433e813feaecffce9464d087ddde61 Reviewed-on: https://gerrit.libreoffice.org/70105 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index 14b115d5accd..5c0bcc29e584 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -74,13 +74,13 @@ Any SAL_CALL FrameControl::queryInterface( const Type& rType ) Reference< XInterface > xDel = BaseControl::impl_getDelegator(); if ( xDel.is() ) { -// If an delegator exist, forward question to his queryInterface. -// Delegator will ask his own queryAggregation! +// If a delegator exists, forward question to its queryInterface. +// Delegator will ask its own queryAggregation! aReturn = xDel->queryInterface( rType ); } else { -// If an delegator unknown, forward question to own queryAggregation. +// If a delegator is unknown, forward question to own queryAggregation. aReturn = queryAggregation( rType ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/framecontrol.cxx | 57 +-- UnoControls/source/inc/framecontrol.hxx | 12 - 2 files changed, 29 insertions(+), 40 deletions(-) New commits: commit 2347dcf3ba47aa784868ddfc855f34a5344b4de0 Author: Jochen NitschkeDate: Thu Jun 8 21:56:09 2017 +0200 UnoControls: inline defines or convert to enum and remove needless local statics Change-Id: Iaa2d7776d439a824e521d0bb7ef51a9f8e44c009 Reviewed-on: https://gerrit.libreoffice.org/38595 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index e9fe0371840e..ef8c028d47f8 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -44,6 +44,13 @@ using namespace ::com::sun::star::util; namespace unocontrols{ +enum PropertyHandle // values represent index in PropertyArray +{ // for FrameControl +Componenturl= 0, +Frame = 1, +Loaderarguments = 2 +}; + // construct/destruct FrameControl::FrameControl( const Reference< XComponentContext >& rxContext) @@ -245,7 +252,7 @@ void SAL_CALL FrameControl::unadvise( const Type& aTyp const Sequence< OUString > FrameControl::impl_getStaticSupportedServiceNames() { -Sequence seqServiceNames { SERVICENAME_FRAMECONTROL }; +Sequence seqServiceNames { "com.sun.star.frame.FrameControl" }; return seqServiceNames; } @@ -253,7 +260,7 @@ const Sequence< OUString > FrameControl::impl_getStaticSupportedServiceNames() const OUString FrameControl::impl_getStaticImplementationName() { -return OUString(IMPLEMENTATIONNAME_FRAMECONTROL); +return OUString("stardiv.UnoControls.FrameControl"); } // OPropertySetHelper @@ -266,12 +273,12 @@ sal_Bool FrameControl::convertFastPropertyValue( Any&rConvertedVa bool bReturn = false; switch (nHandle) { -case PROPERTYHANDLE_COMPONENTURL: rConvertedValue = rValue; +case PropertyHandle::Componenturl: rConvertedValue = rValue; rOldValue <<= m_sComponentURL; bReturn = true; break; -case PROPERTYHANDLE_LOADERARGUMENTS : rConvertedValue = rValue; +case PropertyHandle::Loaderarguments : rConvertedValue = rValue; rOldValue <<= m_seqLoaderArguments; bReturn = true; break; @@ -294,14 +301,14 @@ void FrameControl::setFastPropertyValue_NoBroadcast( sal_Int32 nHan MutexGuard aGuard (m_aMutex); switch (nHandle) { -case PROPERTYHANDLE_COMPONENTURL: rValue >>= m_sComponentURL; +case PropertyHandle::Componenturl: rValue >>= m_sComponentURL; if (getPeer().is()) { impl_createFrame ( getPeer(), m_sComponentURL, m_seqLoaderArguments ); } break; -case PROPERTYHANDLE_LOADERARGUMENTS : rValue >>= m_seqLoaderArguments; +case PropertyHandle::Loaderarguments : rValue >>= m_seqLoaderArguments; break; default : OSL_ENSURE ( nHandle == -1, "This is an invalid property handle." ); @@ -317,13 +324,13 @@ void FrameControl::getFastPropertyValue(Any& rRet, switch (nHandle) { -case PROPERTYHANDLE_COMPONENTURL: rRet <<= m_sComponentURL; +case PropertyHandle::Componenturl: rRet <<= m_sComponentURL; break; -case PROPERTYHANDLE_LOADERARGUMENTS : rRet <<= m_seqLoaderArguments; +case PropertyHandle::Loaderarguments : rRet <<= m_seqLoaderArguments; break; -case PROPERTYHANDLE_FRAME : rRet <<= m_xFrame; +case PropertyHandle::Frame : rRet <<= m_xFrame; break; default : OSL_ENSURE ( nHandle == -1, "This is an invalid property handle." ); @@ -335,7 +342,17 @@ void
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/base/basecontainercontrol.cxx | 28 + UnoControls/source/base/basecontrol.cxx | 39 +++-- UnoControls/source/controls/framecontrol.cxx | 68 --- UnoControls/source/controls/progressbar.cxx | 28 + UnoControls/source/controls/progressmonitor.cxx | 30 ++ UnoControls/source/controls/statusindicator.cxx | 28 + 6 files changed, 44 insertions(+), 177 deletions(-) New commits: commit e78d128e3b7bf45990d1f7b27123ccd616665f93 Author: Jochen NitschkeDate: Thu Jun 8 21:29:23 2017 +0200 UnoControls: replace double checked locking patterns with thread safe local statics Change-Id: I6ba88ffc3b3489bfe4dce17c4297312dd9765f2e Reviewed-on: https://gerrit.libreoffice.org/38594 Reviewed-by: Noel Grandin Tested-by: Noel Grandin diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx index a6fb9b97447a..766b5fa75e6d 100644 --- a/UnoControls/source/base/basecontainercontrol.cxx +++ b/UnoControls/source/base/basecontainercontrol.cxx @@ -73,30 +73,12 @@ Any SAL_CALL BaseContainerControl::queryInterface( const Type& rType ) Sequence< Type > SAL_CALL BaseContainerControl::getTypes() { -// Optimize this method ! -// We initialize a static variable only one time. And we don't must use a mutex at every call! -// For the first call; pTypeCollection is NULL - for the second call pTypeCollection is different from NULL! -static OTypeCollection* pTypeCollection = nullptr; +static OTypeCollection ourTypeCollection( +cppu::UnoType::get(), +cppu::UnoType::get(), +BaseControl::getTypes() ); -if ( pTypeCollection == nullptr ) -{ -// Ready for multithreading; get global mutex for first call of this method only! see before -MutexGuard aGuard( Mutex::getGlobalMutex() ); - -// Control these pointer again ... it can be, that another instance will be faster then these! -if ( pTypeCollection == nullptr ) -{ -// Create a static typecollection ... -static OTypeCollection aTypeCollection ( cppu::UnoType::get(), - cppu::UnoType::get(), -BaseControl::getTypes() -); -// ... and set his address to static pointer! -pTypeCollection = -} -} - -return pTypeCollection->getTypes(); +return ourTypeCollection.getTypes(); } // XAggregation diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx index 81a79a4da107..f488113a273b 100644 --- a/UnoControls/source/base/basecontrol.cxx +++ b/UnoControls/source/base/basecontrol.cxx @@ -114,35 +114,16 @@ void SAL_CALL BaseControl::release() throw() Sequence< Type > SAL_CALL BaseControl::getTypes() { -// Optimize this method ! -// We initialize a static variable only one time. And we don't must use a mutex at every call! -// For the first call; pTypeCollection is NULL - for the second call pTypeCollection is different from NULL! -static OTypeCollection* pTypeCollection = nullptr; - -if ( pTypeCollection == nullptr ) -{ -// Ready for multithreading; get global mutex for first call of this method only! see before -MutexGuard aGuard( Mutex::getGlobalMutex() ); - -// Control these pointer again ... it can be, that another instance will be faster then these! -if ( pTypeCollection == nullptr ) -{ -// Create a static typecollection ... -static OTypeCollection aTypeCollection( cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - cppu::UnoType::get(), - OComponentHelper::getTypes() - ); - -// ... and set his address to static pointer! -pTypeCollection = -} -} - -return pTypeCollection->getTypes(); +static OTypeCollection ourTypeCollection( +cppu::UnoType::get(), +cppu::UnoType::get(), +cppu::UnoType::get(), +cppu::UnoType::get(), +cppu::UnoType::get(), +cppu::UnoType::get(), +OComponentHelper::getTypes() ); + +return ourTypeCollection.getTypes(); } //
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/progressmonitor.cxx | 12 1 file changed, 4 insertions(+), 8 deletions(-) New commits: commit bfe6c2dedbac4caa8a080a7a7b2d783ae5d5d813 Author: nadithDate: Thu Jul 14 23:35:45 2016 +0530 tdf#100726: Improve readability of OUString concatenation a bit Change-Id: I6c51b9004089721f199bc35b1e5c13df36847f02 Reviewed-on: https://gerrit.libreoffice.org/27227 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index 62446f5..635e0ea 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -743,8 +743,7 @@ void ProgressMonitor::impl_rebuildFixedText () // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for (IMPL_TextlistItem* pSearchItem : maTextlist_Top) { -aCollectString += pSearchItem->sTopic; -aCollectString += "\n"; +aCollectString += pSearchItem->sTopic + "\n"; } m_xTopic_Top->setText ( aCollectString ); @@ -759,8 +758,7 @@ void ProgressMonitor::impl_rebuildFixedText () // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for (IMPL_TextlistItem* pSearchItem : maTextlist_Top) { -aCollectString += pSearchItem->sText; -aCollectString += "\n"; +aCollectString += pSearchItem->sText + "\n"; } m_xText_Top->setText ( aCollectString ); @@ -777,8 +775,7 @@ void ProgressMonitor::impl_rebuildFixedText () // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for (IMPL_TextlistItem* pSearchItem : maTextlist_Bottom) { -aCollectString += pSearchItem->sTopic; -aCollectString += "\n"; +aCollectString += pSearchItem->sTopic + "\n"; } m_xTopic_Bottom->setText ( aCollectString ); @@ -793,8 +790,7 @@ void ProgressMonitor::impl_rebuildFixedText () // "\n" MUST BE at the end of line!!! => Else ... topic and his text are not in the same line!!! for (IMPL_TextlistItem* pSearchItem : maTextlist_Bottom) { -aCollectString += pSearchItem->sText; -aCollectString += "\n"; +aCollectString += pSearchItem->sText + "\n"; } m_xText_Bottom->setText ( aCollectString ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/progressmonitor.cxx |6 -- 1 file changed, 6 deletions(-) New commits: commit dc0b96639f54acc2bbc9583265aac27d4566c89f Author: Stephan Bergmann sberg...@redhat.com Date: Tue Jun 10 10:53:46 2014 +0200 -Werror,-Wtautological-undefined-compare Change-Id: If546680f4c16ccd733188a65d82129ec2358017b diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index 93be6b9..908687c 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -884,12 +884,8 @@ bool ProgressMonitor::impl_debug_checkParameter ( const OUString rText, bool /*bbeforeProgress*/ ) { -// Check rTopic -if ( rTopic== NULL) return false;// NULL-pointer for reference ???!!! if ( rTopic.isEmpty() ) return false;// -// Check rText -if ( rText == NULL) return false;// NULL-pointer for reference ???!!! if ( rText.isEmpty() ) return false;// // bbeforeProgress is valid in everyway! @@ -901,8 +897,6 @@ bool ProgressMonitor::impl_debug_checkParameter ( // removeText bool ProgressMonitor::impl_debug_checkParameter ( const OUString rTopic, bool /*bbeforeProgress*/ ) { -// Check rTopic -if ( rTopic== NULL) return false;// NULL-pointer for reference ???!!! if ( rTopic.isEmpty() ) return false;// // bbeforeProgress is valid in everyway! ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/base/registercontrols.cxx | 193 --- 1 file changed, 86 insertions(+), 107 deletions(-) New commits: commit 914a00a13c8f3045282e27c8717ae0fd21ad740f Author: Stephan Bergmann sberg...@redhat.com Date: Thu Dec 19 16:34:54 2013 +0100 Clean up macro madness Change-Id: I353a161fdc274a3da5ac965df12379c0d65681a4 diff --git a/UnoControls/source/base/registercontrols.cxx b/UnoControls/source/base/registercontrols.cxx index 94df3e7..e3ecfa4 100644 --- a/UnoControls/source/base/registercontrols.cxx +++ b/UnoControls/source/base/registercontrols.cxx @@ -17,126 +17,105 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include comphelper/processfactory.hxx -#include cppuhelper/factory.hxx +#include sal/config.h + #include com/sun/star/lang/XMultiServiceFactory.hpp #include com/sun/star/lang/XSingleServiceFactory.hpp -#include com/sun/star/registry/XRegistryKey.hpp -#include com/sun/star/container/XSet.hpp - -#include stdio.h - -//= -// Add new include line to use new services. -//= -#include framecontrol.hxx -#include progressbar.hxx -#include progressmonitor.hxx -#include statusindicator.hxx -//= - -//__ -// namespaces -//__ - -using namespace ::rtl ; -using namespace ::cppu ; -using namespace ::unocontrols ; -using namespace ::com::sun::star::uno ; -using namespace ::com::sun::star::container ; -using namespace ::com::sun::star::lang ; -using namespace ::com::sun::star::registry ; +#include comphelper/processfactory.hxx +#include cppuhelper/factory.hxx -//__ -// macros -//__ +#include framecontrol.hxx +#include progressbar.hxx +#include progressmonitor.hxx +#include statusindicator.hxx -//** -#define CREATEINSTANCE(CLASS) \ - \ -static Reference XInterface SAL_CALL CLASS##_createInstance ( const Reference XMultiServiceFactory rServiceManager ) throw ( Exception ) \ -{ \ -return Reference XInterface ( *(OWeakObject*)(new CLASS( comphelper::getComponentContext(rServiceManager) )) ); \ -} +namespace { -//** -#define CREATEFACTORY_SINGLE(CLASS) \ - \ -/* Create right factory ... */ \ -xFactory = Reference XSingleServiceFactory \ -( \ -cppu::createSingleFactory ( xServiceManager , \ - CLASS::impl_getStaticImplementationName () , \ -CLASS##_createInstance , \ - CLASS::impl_getStaticSupportedServiceNames () ) \ -) ; \ +css::uno::Referencecss::uno::XInterface SAL_CALL FrameControl_createInstance( +css::uno::Referencecss::lang::XMultiServiceFactory const +
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/inc/progressmonitor.hxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 669c282fea83c44d545fa8c1bfe03fa45568c35b Author: Caolán McNamara caol...@redhat.com Date: Tue Dec 17 20:28:11 2013 + embedded nulls in literals these used to be used with OUString::createFromAscii so a blank string is fine here Change-Id: I744d2be5471fad2675741f908e1ad78f0d5eefbc diff --git a/UnoControls/source/inc/progressmonitor.hxx b/UnoControls/source/inc/progressmonitor.hxx index 48bc2b9..759ea6d 100644 --- a/UnoControls/source/inc/progressmonitor.hxx +++ b/UnoControls/source/inc/progressmonitor.hxx @@ -75,8 +75,8 @@ namespace unocontrols{ #define CONTROLNAME_BUTTON Button // -||- #define CONTROLNAME_PROGRESSBAR ProgressBar // -||- #define DEFAULT_BUTTONLABEL Abbrechen -#define PROGRESSMONITOR_DEFAULT_TOPIC \0 -#define PROGRESSMONITOR_DEFAULT_TEXT\0 +#define PROGRESSMONITOR_DEFAULT_TOPIC +#define PROGRESSMONITOR_DEFAULT_TEXT #define PROGRESSMONITOR_BACKGROUNDCOLOR TRGB_COLORDATA( 0x00, 0xC0, 0xC0, 0xC0 )// lighgray #define PROGRESSMONITOR_LINECOLOR_BRIGHTTRGB_COLORDATA( 0x00, 0xFF, 0xFF, 0xFF )// white #define PROGRESSMONITOR_LINECOLOR_SHADOWTRGB_COLORDATA( 0x00, 0x00, 0x00, 0x00 )// black ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/inc/framecontrol.hxx | 70 1 file changed, 35 insertions(+), 35 deletions(-) New commits: commit 214a4ec9cef0a0c046af66f3249d623c8cbaf8a2 Author: Noel Grandin n...@peralex.com Date: Thu Jul 18 11:37:26 2013 +0200 fix windows build which I broke in 32eaa77 fdo#46808, Convert frame::FrameControl service to new style Change-Id: Ie7cd26714f2d6cb0e767439a2b1d4832cfc74a4a diff --git a/UnoControls/source/inc/framecontrol.hxx b/UnoControls/source/inc/framecontrol.hxx index d24490a..285a2a9 100644 --- a/UnoControls/source/inc/framecontrol.hxx +++ b/UnoControls/source/inc/framecontrol.hxx @@ -202,75 +202,75 @@ public: //__ // overrides to remove inheritance ambiguity //__ -virtual css::uno::Referencecss::awt::XWindowPeer getPeer() throw (css::uno::RuntimeException) +virtual css::uno::Referencecss::awt::XWindowPeer SAL_CALL getPeer() throw (css::uno::RuntimeException) { return BaseControl::getPeer(); } -virtual css::awt::Rectangle getPosSize() throw (css::uno::RuntimeException) +virtual css::awt::Rectangle SAL_CALL getPosSize() throw (css::uno::RuntimeException) { return BaseControl::getPosSize(); } -virtual void setPosSize(sal_Int32 p1, sal_Int32 p2, sal_Int32 p3, sal_Int32 p4, sal_Int16 p5) throw (css::uno::RuntimeException) +virtual void SAL_CALL setPosSize(sal_Int32 p1, sal_Int32 p2, sal_Int32 p3, sal_Int32 p4, sal_Int16 p5) throw (css::uno::RuntimeException) { return BaseControl::setPosSize(p1, p2, p3, p4, p5); } -virtual void addEventListener(const css::uno::Referencecss::lang::XEventListener p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL addEventListener(const css::uno::Referencecss::lang::XEventListener p1) throw (css::uno::RuntimeException) { return BaseControl::addEventListener(p1); } -virtual void removeEventListener(const css::uno::Referencecss::lang::XEventListener p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL removeEventListener(const css::uno::Referencecss::lang::XEventListener p1) throw (css::uno::RuntimeException) { return BaseControl::removeEventListener(p1); } -virtual void setVisible(sal_Bool p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL setVisible(sal_Bool p1) throw (css::uno::RuntimeException) { return BaseControl::setVisible(p1); } -virtual void setEnable(sal_Bool p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL setEnable(sal_Bool p1) throw (css::uno::RuntimeException) { return BaseControl::setEnable(p1); } -virtual void setFocus() throw (css::uno::RuntimeException) +virtual void SAL_CALL setFocus() throw (css::uno::RuntimeException) { return BaseControl::setFocus(); } -virtual void addWindowListener(const css::uno::Referencecss::awt::XWindowListener p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL addWindowListener(const css::uno::Referencecss::awt::XWindowListener p1) throw (css::uno::RuntimeException) { return BaseControl::addWindowListener(p1); } -virtual void removeWindowListener(const css::uno::Referencecss::awt::XWindowListener p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL removeWindowListener(const css::uno::Referencecss::awt::XWindowListener p1) throw (css::uno::RuntimeException) { return BaseControl::removeWindowListener(p1); } -virtual void addFocusListener(const css::uno::Referencecss::awt::XFocusListener p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL addFocusListener(const css::uno::Referencecss::awt::XFocusListener p1) throw (css::uno::RuntimeException) { return BaseControl::addFocusListener(p1); } -virtual void removeFocusListener(const css::uno::Referencecss::awt::XFocusListener p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL removeFocusListener(const css::uno::Referencecss::awt::XFocusListener p1) throw (css::uno::RuntimeException) { return BaseControl::removeFocusListener(p1); } -virtual void addKeyListener(const css::uno::Referencecss::awt::XKeyListener p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL addKeyListener(const css::uno::Referencecss::awt::XKeyListener p1) throw (css::uno::RuntimeException) { return BaseControl::addKeyListener(p1); } -virtual void removeKeyListener(const css::uno::Referencecss::awt::XKeyListener p1) throw (css::uno::RuntimeException) +virtual void SAL_CALL removeKeyListener(const css::uno::Referencecss::awt::XKeyListener p1) throw (css::uno::RuntimeException) { return BaseControl::removeKeyListener(p1); } -virtual void
[Libreoffice-commits] core.git: UnoControls/source
UnoControls/source/controls/framecontrol.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit a25778abd898fae829d3910798f32089e455984c Author: Noel Grandin n...@peralex.com Date: Thu Jul 18 13:07:40 2013 +0200 fix warning -Werror=unused-macros was firing on non-debug builds, fix by inlining the relevant warning message macro. Change-Id: If2fba2410bf985ec51faaa94c61b2e224fc65328 diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx index ae4556d..957a333 100644 --- a/UnoControls/source/controls/framecontrol.cxx +++ b/UnoControls/source/controls/framecontrol.cxx @@ -51,7 +51,6 @@ namespace unocontrols{ #define PROPERTYNAME_LOADERARGUMENTSLoaderArguments #define PROPERTYNAME_COMPONENTURL ComponentURL #define PROPERTYNAME_FRAME Frame -#define ERRORTEXT_VOSENSHUREThis is an invalid property handle. #define PROPERTY_COUNT 3 // you must count the propertys #define PROPERTYHANDLE_COMPONENTURL 0 // Id must be the index into the array #define PROPERTYHANDLE_FRAME1 @@ -370,7 +369,7 @@ void FrameControl::setFastPropertyValue_NoBroadcast( sal_Int32 nHan case PROPERTYHANDLE_LOADERARGUMENTS : rValue = m_seqLoaderArguments ; break ; -default : OSL_ENSURE ( nHandle == -1, ERRORTEXT_VOSENSHURE ) ; +default : OSL_ENSURE ( nHandle == -1, This is an invalid property handle. ) ; } } @@ -394,7 +393,7 @@ void FrameControl::getFastPropertyValue(Any rRet, case PROPERTYHANDLE_FRAME : rRet = m_xFrame ; break ; -default : OSL_ENSURE ( nHandle == -1, ERRORTEXT_VOSENSHURE ) ; +default : OSL_ENSURE ( nHandle == -1, This is an invalid property handle. ) ; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits