[Libreoffice-commits] core.git: dtrans/source offapi/com
dtrans/source/win32/clipb/WinClipbImpl.cxx |2 +- offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl |6 ++ offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl |2 +- 3 files changed, 8 insertions(+), 2 deletions(-) New commits: commit e738683f98559af330a1cc36d8d0a1be11abb355 Author: Julien Nabet AuthorDate: Sat Sep 12 12:00:49 2020 +0200 Commit: Stephan Bergmann CommitDate: Thu Sep 17 15:20:27 2020 +0200 Add "Persistent", deprecate "Persistant" in RenderingCapabilities Change-Id: Ib86b715dcf3514d038519d0f495e3d98b9f01190 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102511 Reviewed-by: Stephan Bergmann Tested-by: Jenkins diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index 8d59be7ca430..e991a81cecd8 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx @@ -145,7 +145,7 @@ OUString CWinClipbImpl::getName( ) sal_Int8 CWinClipbImpl::getRenderingCapabilities( ) { -return ( Delayed | Persistant ); +return ( Delayed | Persistent ); } void CWinClipbImpl::flushClipboard( ) diff --git a/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl b/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl index 6b0cdc96c230..b254cbf5f39d 100644 --- a/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl +++ b/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl @@ -36,8 +36,14 @@ published constants RenderingCapabilities /** The implementation is able to store the data persistent in the system so that it does not get lost when the source application no longer exist. +@deprecated since 7.1, rather use "Persistent" const */ const byte Persistant = 2; + +/** The implementation is able to store the data persistent in the system +so that it does not get lost when the source application no longer exist. +*/ +const byte Persistent = 2; }; diff --git a/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl b/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl index 1cb96db1ece8..32f8bf39db4e 100644 --- a/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl +++ b/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl @@ -46,7 +46,7 @@ published interface XSystemClipboard /** Provides the ability to render the complete clipboard content. This interface is only available if the method com::sun::star::datatransfer::clipboard::XClipboardEx::getRenderingCapabilities() -returns Persistant +returns Persistent */ [optional] interface XFlushableClipboard; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source dtrans/test
dtrans/source/cnttype/mcnttfactory.hxx |5 + dtrans/source/cnttype/mcnttype.hxx |5 + dtrans/source/generic/clipboardmanager.hxx |5 + dtrans/source/generic/generic_clipboard.hxx|5 + dtrans/source/inc/DtObjFactory.hxx |5 + dtrans/source/inc/WinClip.hxx |5 + dtrans/source/win32/clipb/APNDataObject.hxx|5 + dtrans/source/win32/clipb/MtaOleClipb.hxx |5 + dtrans/source/win32/clipb/WinClipbImpl.hxx |5 + dtrans/source/win32/clipb/WinClipboard.hxx |5 + dtrans/source/win32/dnd/globals.hxx|5 + dtrans/source/win32/dnd/idroptarget.hxx|4 +--- dtrans/source/win32/dnd/source.hxx |5 + dtrans/source/win32/dnd/sourcecontext.hxx |5 + dtrans/source/win32/dnd/target.hxx |5 + dtrans/source/win32/dnd/targetdragcontext.hxx |5 + dtrans/source/win32/dnd/targetdropcontext.hxx |4 +--- dtrans/source/win32/dtobj/APNDataObject.hxx|5 + dtrans/source/win32/dtobj/DOTransferable.hxx |5 + dtrans/source/win32/dtobj/DTransHelper.hxx |5 + dtrans/source/win32/dtobj/DataFmtTransl.hxx|5 + dtrans/source/win32/dtobj/Fetc.hxx |5 + dtrans/source/win32/dtobj/FetcList.hxx |5 + dtrans/source/win32/dtobj/FmtFilter.hxx|5 + dtrans/source/win32/dtobj/MimeAttrib.hxx |5 + dtrans/source/win32/dtobj/TxtCnvtHlp.hxx |5 + dtrans/source/win32/dtobj/XNotifyingDataObject.hxx |5 + dtrans/source/win32/dtobj/XTDataObject.hxx |5 + dtrans/source/win32/ftransl/ftransl.hxx|5 + dtrans/source/win32/misc/ImplHelper.hxx|5 + dtrans/source/win32/workbench/XTDo.hxx |5 + dtrans/test/win32/dnd/atlwindow.hxx|5 + dtrans/test/win32/dnd/sourcelistener.hxx |5 + dtrans/test/win32/dnd/targetlistener.hxx |5 + dtrans/test/win32/dnd/transferable.hxx |5 + 35 files changed, 35 insertions(+), 138 deletions(-) New commits: commit 3dbc14db0aad072844b30e873c2d53978ea8e1c3 Author: George Bateman AuthorDate: Sun Sep 13 12:14:02 2020 + Commit: Julien Nabet CommitDate: Sun Sep 13 17:51:26 2020 +0200 tdf#124176 Use #pragma once in dtrans This commit was carried out by a Python script, source of which is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97. Change-Id: I8a16d58b4adec5aa0d35a2c50e088039fa6e5148 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102575 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/dtrans/source/cnttype/mcnttfactory.hxx b/dtrans/source/cnttype/mcnttfactory.hxx index 06d671c6bb1a..c9bd3518cdf3 100644 --- a/dtrans/source/cnttype/mcnttfactory.hxx +++ b/dtrans/source/cnttype/mcnttfactory.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_DTRANS_SOURCE_CNTTYPE_MCNTTFACTORY_HXX -#define INCLUDED_DTRANS_SOURCE_CNTTYPE_MCNTTFACTORY_HXX +#pragma once #include #include @@ -47,6 +46,4 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override; }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx index 6b2dd4c8e925..c4053066b733 100644 --- a/dtrans/source/cnttype/mcnttype.hxx +++ b/dtrans/source/cnttype/mcnttype.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_DTRANS_SOURCE_CNTTYPE_MCNTTYPE_HXX -#define INCLUDED_DTRANS_SOURCE_CNTTYPE_MCNTTYPE_HXX +#pragma once #include #include @@ -56,6 +55,4 @@ private: std::map< OUString, OUString > m_ParameterMap; }; -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/generic/clipboardmanager.hxx b/dtrans/source/generic/clipboardmanager.hxx index 2750b61246cb..56e69617dc5f 100644 --- a/dtrans/source/generic/clipboardmanager.hxx +++ b/dtrans/source/generic/clipboardmanager.hxx @@ -17,8 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#ifndef INCLUDED_DTRANS_SOURCE_GENERIC_CLIPBOARDMANAGER_HXX -#define INCLUDED_DTRANS_SOURCE_GENERIC_CLIPBOARDMANAGER_HXX +#pragma once #include @@ -88,6 +87,4 @@ namespace dtrans } -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dtrans/source/generic/generic_clipboard.hxx b/dtrans/source/generic/generic_clipboard.hxx index f23a0cc9a120..3c9126bcc535 100644 --- a/dtrans/source/generic/generic_clipboard.hxx +++ b/dtrans/source/generic/generic_clipboard.hxx @@ -17,8 +17,7 @@ *
[Libreoffice-commits] core.git: dtrans/source embedserv/source fpicker/source sal/osl shell/source
dtrans/source/win32/dtobj/DataFmtTransl.cxx | 14 ++-- dtrans/source/win32/ftransl/ftransl.cxx |2 - embedserv/source/embed/ed_ipersiststr.cxx| 28 - fpicker/source/win32/WinImplHelper.cxx |6 +-- sal/osl/w32/path_helper.cxx |4 +- shell/source/win32/simplemail/smplmailclient.cxx | 37 +++ 6 files changed, 35 insertions(+), 56 deletions(-) New commits: commit 13ae66c0eb0ab03ac4a43c52dd2359fbaa7f5867 Author: Stephan Bergmann AuthorDate: Fri Aug 21 09:39:16 2020 +0200 Commit: Stephan Bergmann CommitDate: Fri Aug 21 11:05:28 2020 +0200 loplugin:stringstatic (clang-cl) Change-Id: I024c7437e876459e22a6f541405b87ac13e7dc99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101135 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index b8513c6e75d4..f0a1601f8dfb 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -47,12 +47,6 @@ const Type CPPUTYPE_OUSTRING = cppu::UnoType::get(); const Type CPPUTYPE_SEQSALINT8 = cppu::UnoType>::get(); const sal_Int32 MAX_CLIPFORMAT_NAME = 256; -const OUString TEXT_PLAIN_CHARSET ("text/plain;charset="); -const OUString HPNAME_OEM_ANSI_TEXT ("OEM/ANSI Text"); - -const OUString HTML_FORMAT_NAME_WINDOWS ("HTML Format"); -const OUString HTML_FORMAT_NAME_SOFFICE ("HTML (HyperText Markup Language)"); - CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext ) { m_XDataFormatTranslator = DataFormatTranslator::create( rxContext ); @@ -111,10 +105,10 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& a if ( isOemOrAnsiTextFormat( aClipformat ) ) { -aFlavor.MimeType = TEXT_PLAIN_CHARSET; +aFlavor.MimeType = "text/plain;charset="; aFlavor.MimeType+= getTextCharsetFromLCID( lcid, aClipformat ); -aFlavor.HumanPresentableName = HPNAME_OEM_ANSI_TEXT; +aFlavor.HumanPresentableName = "OEM/ANSI Text"; aFlavor.DataType = CPPUTYPE_SEQSALINT8; } else if ( CF_INVALID != aClipformat ) @@ -222,13 +216,13 @@ bool CDataFormatTranslator::isTextFormat( CLIPFORMAT cf ) bool CDataFormatTranslator::isHTMLFormat( CLIPFORMAT cf ) { OUString clipFormatName = getClipboardFormatName( cf ); -return ( clipFormatName == HTML_FORMAT_NAME_WINDOWS ); +return ( clipFormatName == "HTML Format" ); } bool CDataFormatTranslator::isTextHtmlFormat( CLIPFORMAT cf ) { OUString clipFormatName = getClipboardFormatName( cf ); -return clipFormatName.equalsIgnoreAsciiCase( HTML_FORMAT_NAME_SOFFICE ); +return clipFormatName.equalsIgnoreAsciiCase( "HTML (HyperText Markup Language)" ); } OUString CDataFormatTranslator::getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat ) diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 991bc2d2c10f..0a40a5b75b72 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -34,7 +34,7 @@ #define CPPUTYPE_SEQSALINT8 cppu::UnoType>::get() #define CPPUTYPE_DEFAULT CPPUTYPE_SEQSALINT8 -const OUString Windows_FormatName ("windows_formatname"); +const char Windows_FormatName[] = "windows_formatname"; const css::uno::Type CppuType_ByteSequence = cppu::UnoType>::get(); const css::uno::Type CppuType_String = ::cppu::UnoType::get(); diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx index 905055cc9513..2302bc2380ce 100644 --- a/embedserv/source/embed/ed_ipersiststr.cxx +++ b/embedserv/source/embed/ed_ipersiststr.cxx @@ -56,8 +56,8 @@ const sal_Int32 nConstBufferSize = 32000; using namespace ::com::sun::star; -const OUString aOfficeEmbedStreamName( "package_stream" ); -const OUString aExtentStreamName( "properties_stream" ); +const wchar_t aOfficeEmbedStreamName[] = L"package_stream"; +const wchar_t aExtentStreamName[] = L"properties_stream"; static uno::Reference< io::XInputStream > createTempXInStreamFromIStream( uno::Reference< lang::XMultiServiceFactory > const & xFactory, @@ -430,7 +430,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP EmbedDocument_Impl::InitNew( IStorage *pStg ) if ( hr == S_OK ) { -hr = pStg->CreateStream( o3tl::toW(aOfficeEmbedStreamName.getStr()), +hr = pStg->CreateStream( aOfficeEmbedStreamName, STGM_CREATE | ( nStreamMode & 0x73 ), 0,
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/MtaOleClipb.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f2dd07d30ed12ce4ae25021b34a7d84fc1f71246 Author: Julien Nabet AuthorDate: Thu Jun 4 11:43:58 2020 +0200 Commit: Julien Nabet CommitDate: Thu Jun 4 13:19:21 2020 +0200 Remnant CoInitialize comment Change-Id: I33b328e4b2c85a6260d068ce5d9504dfdb201f89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95495 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 0e57b5ab1442..aaefc9170479 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -684,7 +684,7 @@ unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID // a boolean variable like m_bRun... while ( pInst->m_bRunClipboardNotifierThread ) { -// process window messages because of CoInitialize +// process window messages because of CoInitializeEx MSG Msg; while (PeekMessageW(, nullptr, 0, 0, PM_REMOVE)) DispatchMessageW(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/WinClipbImpl.cxx | 12 dtrans/source/win32/clipb/WinClipbImpl.hxx |1 + 2 files changed, 13 insertions(+) New commits: commit fda6ad1458fcd5087c3dde56300b9d0367af6db5 Author: Luboš Luňák AuthorDate: Fri May 29 18:15:30 2020 +0200 Commit: Luboš Luňák CommitDate: Mon Jun 1 12:41:00 2020 +0200 cache foreign content in win32 clipboard code (tdf#133267) The slowness in tdf#133267 on Windows is because the Calc operation repeatedly calls ScDocument::IsClipboardSource(), which calls ScModule::GetClipDoc(), which proceeds to fetch the clipboard content, which means fetching it from the system clipboard if it's not owned by LO. Other LO clipboard implementations such as gtk3 or qt5 already do caching, and it seems that it's easy to do for the win32 code. Change-Id: I4696cc7488d66803fd5dd2963d27900957decdec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95163 Tested-by: Jenkins Reviewed-by: Mike Kaganski Reviewed-by: Luboš Luňák diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index 003a266f84bc..8d59be7ca430 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx @@ -83,6 +83,10 @@ Reference< XTransferable > CWinClipbImpl::getContents( ) return m_pCurrentClipContent->m_XTransferable; } +// Content cached? +if (m_foreignContent.is()) +return m_foreignContent; + // release the mutex, so that the variable may be // changed by other threads } @@ -101,6 +105,9 @@ Reference< XTransferable > CWinClipbImpl::getContents( ) // remember pIDo destroys itself due to the smart pointer rClipContent = CDOTransferable::create( m_pWinClipboard->m_xContext, pIDo ); + +MutexGuard aGuard(m_ClipContentMutex); +m_foreignContent = rClipContent; } return rClipContent; @@ -117,6 +124,8 @@ void CWinClipbImpl::setContents( { MutexGuard aGuard(m_ClipContentMutex); +m_foreignContent.clear(); + m_pCurrentClipContent = new CXNotifyingDataObject(CDTransObjFactory::createDataObjFromTransferable( m_pWinClipboard->m_xContext, xTransferable), @@ -176,7 +185,10 @@ void WINAPI CWinClipbImpl::onClipboardContentChanged() // reassociation to instance through static member if ( nullptr != s_pCWinClipbImpl ) +{ +s_pCWinClipbImpl->m_foreignContent.clear(); s_pCWinClipbImpl->m_pWinClipboard->notifyAllClipboardListener( ); +} } void CWinClipbImpl::onReleaseDataObject( CXNotifyingDataObject* theCaller ) diff --git a/dtrans/source/win32/clipb/WinClipbImpl.hxx b/dtrans/source/win32/clipb/WinClipbImpl.hxx index 55a9d8d600bc..cd5878e6b794 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.hxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.hxx @@ -87,6 +87,7 @@ private: CMtaOleClipboardm_MtaOleClipboard; CWinClipboard* m_pWinClipboard; CXNotifyingDataObject* m_pCurrentClipContent; +com::sun::star::uno::Reference< com::sun::star::datatransfer::XTransferable > m_foreignContent; osl::Mutex m_ClipContentMutex; static osl::Mutex s_aMutex; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source extensions/test
dtrans/source/win32/clipb/MtaOleClipb.cxx |6 +++--- extensions/test/ole/cpptest/cpptest.cxx |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) New commits: commit c1aab4ca12f8e3b68240d064d82cf72ccb527648 Author: Julien Nabet AuthorDate: Fri May 29 09:01:07 2020 +0200 Commit: Julien Nabet CommitDate: Fri May 29 10:41:24 2020 +0200 Prefer CoInitializeEx instead of CoInitialize (2) As https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN advised. Moreover, it'll make concurrency model explicit Change-Id: I8eaa7c0ba4e0c5131b178596cf5310df92ff41ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95093 Tested-by: Julien Nabet Reviewed-by: Julien Nabet diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 70fce3bc64ad..0e57b5ab1442 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -200,10 +200,10 @@ public: { /* we only call CoUninitialize when -CoInitialize returned S_FALSE, what +CoInitializeEx returned S_FALSE, what means that com was already initialize for that thread so we keep the balance -if CoInitialize returned S_OK what means +if CoInitializeEx returned S_OK what means com was not yet initialized we better let com initialized or we may run into the realm of undefined behaviour @@ -678,7 +678,7 @@ unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID CMtaOleClipboard* pInst = static_cast< CMtaOleClipboard* >( pParam ); OSL_ASSERT( nullptr != pInst ); -CoInitialize( nullptr ); +CoInitializeEx( nullptr, COINIT_APARTMENTTHREADED ); // assuming we don't need a lock for // a boolean variable like m_bRun... diff --git a/extensions/test/ole/cpptest/cpptest.cxx b/extensions/test/ole/cpptest/cpptest.cxx index ec1592587ee2..f87a0663d192 100644 --- a/extensions/test/ole/cpptest/cpptest.cxx +++ b/extensions/test/ole/cpptest/cpptest.cxx @@ -35,7 +35,7 @@ int main(int /*argc*/, char** /*argv*/) HRESULT hr; if( FAILED( hr=CoInitializeEx(NULL, COINIT_APARTMENTTHREADED))) { -printf("CoInitialize failed \n"); +printf("CoInitializeEx failed \n"); return -1; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/MtaOleClipb.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 6b9912a0f53e4939dce4436fd31160e2fffc687e Author: Mike Kaganski AuthorDate: Sun May 24 11:56:41 2020 +0200 Commit: Mike Kaganski CommitDate: Sun May 24 13:03:59 2020 +0200 Use MsgWaitForMultipleObjects as suggested by API documentation WaitForMultipleObjects documentation [1] tells: If a thread creates any windows, it must process messages. Message broadcasts are sent to all windows in the system. A thread that uses a wait function with no time-out interval may cause the system to become deadlocked. Two examples of code that indirectly creates windows are DDE and the CoInitialize function. Therefore, if you have a thread that creates windows, use MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx, rather than WaitForMultipleObjects The code calls CoInitialize, so follow the documentation advise. [1] https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitformultipleobjects Change-Id: I458234a3c99936e30e5b84224644542e980726dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94678 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 2fdc2d7f9641..70fce3bc64ad 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -684,8 +684,14 @@ unsigned int WINAPI CMtaOleClipboard::clipboardChangedNotifierThreadProc( LPVOID // a boolean variable like m_bRun... while ( pInst->m_bRunClipboardNotifierThread ) { +// process window messages because of CoInitialize +MSG Msg; +while (PeekMessageW(, nullptr, 0, 0, PM_REMOVE)) +DispatchMessageW(); + // wait for clipboard changed or terminate event -WaitForMultipleObjects( 2, pInst->m_hClipboardChangedNotifierEvents, false, INFINITE ); +MsgWaitForMultipleObjects(2, pInst->m_hClipboardChangedNotifierEvents, false, INFINITE, + QS_ALLINPUT | QS_ALLPOSTMESSAGE); ClearableMutexGuard aGuard( pInst->m_ClipboardChangedEventCountMutex ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DOTransferable.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1e826a1e61347d9f8b40e169b63acb5a68786f59 Author: Stephan Bergmann AuthorDate: Mon Feb 3 16:27:18 2020 +0100 Commit: Stephan Bergmann CommitDate: Tue Feb 4 08:01:39 2020 +0100 loplugin:nullptr (clang-cl) Change-Id: I08dedd4f7af3eff1201d60704324997bf232bb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87888 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index c331b1d95b90..f90406462c81 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -100,7 +100,7 @@ void clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium, CDOTransferable:: aByteSequence.realloc(nMemSize); LARGE_INTEGER li; li.QuadPart = 0; -hr = pStream->Seek(li, STREAM_SEEK_SET, NULL); +hr = pStream->Seek(li, STREAM_SEEK_SET, nullptr); if (FAILED(hr)) { SAL_WARN("dtrans", "clipDataToByteStream: Seek() failed"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source extensions/source sal/osl shell/source tools/source vcl/win winaccessibility/source
dtrans/source/win32/dtobj/FmtFilter.cxx |4 +++- dtrans/source/win32/dtobj/XTDataObject.cxx|5 +++-- extensions/source/ole/unoobjw.cxx |5 +++-- sal/osl/w32/socket.cxx|3 ++- shell/source/win32/zipfile/zipfile.cxx|8 +--- tools/source/misc/pathutils.cxx |6 +++--- vcl/win/window/salmenu.cxx|3 ++- winaccessibility/source/service/AccObject.cxx |3 ++- 8 files changed, 23 insertions(+), 14 deletions(-) New commits: commit b66c5f77d150056b2de262dae66301fcd7dc38c1 Author: Stephan Bergmann AuthorDate: Mon Feb 3 16:21:55 2020 +0100 Commit: Stephan Bergmann CommitDate: Mon Feb 3 20:27:29 2020 +0100 loplugin:unsignedcompare (clang-cl) Change-Id: I69cc1b352221ca053ccd0c5b78e926480a8c9ccd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87884 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 74df67541140..e9c4b42f8b68 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -20,6 +20,8 @@ #include #include "FmtFilter.hxx" + +#include #include #include @@ -176,7 +178,7 @@ HENHMETAFILE OOMFPictToWinENHMFPict( Sequence< sal_Int8 > const & aOOMetaFilePic Sequence< sal_Int8 > WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB ) { -OSL_ENSURE(sal_uInt32(aWinDIB.getLength()) > sizeof(BITMAPINFOHEADER), "CF_DIBV5/CF_DIB too small (!)"); +OSL_ENSURE(o3tl::make_unsigned(aWinDIB.getLength()) > sizeof(BITMAPINFOHEADER), "CF_DIBV5/CF_DIB too small (!)"); Sequence< sal_Int8 > ooBmpStream; ooBmpStream.realloc(aWinDIB.getLength( ) + sizeof(BITMAPFILEHEADER)); diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index 6df5c9d384c1..01b1ce39fce4 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -19,6 +19,7 @@ #include #include +#include #include "XTDataObject.hxx" #include @@ -368,11 +369,11 @@ void CXTDataObject::renderAnyDataAndSetupStgMedium( #ifdef DBG_UTIL if(CF_DIBV5 == fetc.cfFormat) { -OSL_ENSURE(sal_uInt32(clipDataStream.getLength()) > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPV5HEADER)), "Wrong size on CF_DIBV5 data (!)"); +OSL_ENSURE(o3tl::make_unsigned(clipDataStream.getLength()) > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPV5HEADER)), "Wrong size on CF_DIBV5 data (!)"); } else // CF_DIB == fetc.cfFormat { -OSL_ENSURE(sal_uInt32(clipDataStream.getLength()) > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER)), "Wrong size on CF_DIB data (!)"); +OSL_ENSURE(o3tl::make_unsigned(clipDataStream.getLength()) > (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER)), "Wrong size on CF_DIB data (!)"); } #endif diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index 5a10e03dcbea..b09f0cb19ce6 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -92,6 +92,7 @@ #include #include #include +#include #include "comifaces.hxx" #include "jscriptclasses.hxx" @@ -807,7 +808,7 @@ HRESULT STDMETHODCALLTYPE CXTypeInfo::GetFuncDesc(UINT index, assert(xClass->getTypeClass() == TypeClass_INTERFACE && aMethods.getLength() > 0); -if (index > static_cast(aMethods.getLength() - 3 + 3 + 4)) +if (index > o3tl::make_unsigned(aMethods.getLength() - 3 + 3 + 4)) return E_INVALIDARG; *ppFuncDesc = new FUNCDESC; @@ -1904,7 +1905,7 @@ COM_DECLSPEC_NOTHROW STDMETHODIMP InterfaceOleWrapper::Invoke(DISPID dispidMembe if( bHandled) return ret; -if ((dispidMember > 0) && (static_cast(dispidMember) <= m_MemberInfos.size()) && m_xInvocation.is()) +if ((dispidMember > 0) && (o3tl::make_unsigned(dispidMember) <= m_MemberInfos.size()) && m_xInvocation.is()) { MemberInfo d = m_MemberInfos[dispidMember - 1]; DWORD flags = wFlags & d.flags; diff --git a/sal/osl/w32/socket.cxx b/sal/osl/w32/socket.cxx index b0173357c187..52f6738e8205 100644 --- a/sal/osl/w32/socket.cxx +++ b/sal/osl/w32/socket.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "sockimpl.hxx" @@ -641,7 +642,7 @@ oslSocketResult SAL_CALL osl_getLocalHostname (rtl_uString **strLocalHostname) (RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR | RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR | RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)) -&& sal_uInt32(u.getLength()) < SAL_N_ELEMENTS(LocalHostname)) +&& o3tl::make_unsigned(u.getLength()) < SAL_N_ELEMENTS(LocalHostname))
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DOTransferable.cxx | 47 ++- 1 file changed, 46 insertions(+), 1 deletion(-) New commits: commit 5d1a540963d1c5b952655414fc77367f67db968d Author: Miklos Vajna AuthorDate: Tue Jan 28 17:57:30 2020 +0100 Commit: Miklos Vajna CommitDate: Tue Jan 28 20:08:46 2020 +0100 dtrans win32: implement support for pasting when the handle type is stream Steps to reproduce the problem: select an image in Word on Windows, copy, paste into Writer -> nothing happens. A workaround is to use paste special, and select the metafile paste, not the bitmap one. The root cause was that clipboard contents on Windows can have different handle types and we only supported the memory and the metafile cases. An alternative fix would be to handle this at a higher level, e.g. TransferableDataHelper::GetBitmapEx() in vcl could fall back to EMF when the bitmap formats fail, but that would not work for other applications that only offer bitmap formats with a stream handle type. Change-Id: Iccaaf33df949ee73185acbd55b61d00a12d210ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87649 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index afa705abfc56..c331b1d95b90 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -20,6 +20,7 @@ #include #include #include +#include #include "DOTransferable.hxx" #include "../misc/ImplHelper.hxx" @@ -59,6 +60,7 @@ namespace void clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium, CDOTransferable::ByteSequence_t& aByteSequence ) { CStgTransferHelper memTransferHelper; +LPSTREAM pStream = nullptr; switch( stgmedium.tymed ) { @@ -75,7 +77,7 @@ void clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium, CDOTransferable:: break; case TYMED_ISTREAM: -//TODO: Has to be implemented +pStream = stgmedium.pstm; break; default: @@ -83,6 +85,41 @@ void clipDataToByteStream( CLIPFORMAT cf, STGMEDIUM stgmedium, CDOTransferable:: break; } +if (pStream) +{ +// We have a stream, read from it. +STATSTG aStat; +HRESULT hr = pStream->Stat(, STATFLAG_NONAME); +if (FAILED(hr)) +{ +SAL_WARN("dtrans", "clipDataToByteStream: Stat() failed"); +return; +} + +size_t nMemSize = aStat.cbSize.QuadPart; +aByteSequence.realloc(nMemSize); +LARGE_INTEGER li; +li.QuadPart = 0; +hr = pStream->Seek(li, STREAM_SEEK_SET, NULL); +if (FAILED(hr)) +{ +SAL_WARN("dtrans", "clipDataToByteStream: Seek() failed"); +} + +ULONG nRead = 0; +hr = pStream->Read(aByteSequence.getArray(), nMemSize, ); +if (FAILED(hr)) +{ +SAL_WARN("dtrans", "clipDataToByteStream: Read() failed"); +} +if (nRead < nMemSize) +{ +SAL_WARN("dtrans", "clipDataToByteStream: Read() was partial"); +} + +return; +} + int nMemSize = memTransferHelper.memSize( cf ); aByteSequence.realloc( nMemSize ); memTransferHelper.read( aByteSequence.getArray( ), nMemSize ); @@ -393,6 +430,14 @@ CDOTransferable::ByteSequence_t CDOTransferable::getClipboardData( CFormatEtc& a hr = m_rDataObject->GetData( aTempFormat, ); } +if (FAILED(hr) && aFormatEtc.getTymed() == TYMED_HGLOBAL) +{ +// Handle type is not memory, try stream. +CFormatEtc aTempFormat(aFormatEtc); +aTempFormat.setTymed(TYMED_ISTREAM); +hr = m_rDataObject->GetData(aTempFormat, ); +} + if ( FAILED( hr ) ) { OSL_ASSERT( (hr != E_INVALIDARG) && ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DOTransferable.cxx |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) New commits: commit 84be3e396cae16a975c7c7f5b892e6b615b73356 Author: Mike Kaganski AuthorDate: Tue Dec 31 22:05:59 2019 +0300 Commit: Mike Kaganski CommitDate: Tue Dec 31 21:01:12 2019 +0100 Fix a random crash on paste from clipboard on Windows Happened to me while debugging Draw; the problem was that for some reason in CDOTransferable::getTransferData clipDataStream was empty at the point of call to byteStreamToAny; thus in byteStreamToOUString, dereferencing negative index happened checking for terminating null, which asserted in Sequence::operator []. I couldn't find the reason of the empty data stream; and I couldn't repro this again, so just add the check to prevent the crash. Change-Id: Id9fde9829828482803f42d6fb106b7f674e5fce7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86050 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index 230a7fbfed8e..afa705abfc56 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -94,7 +94,9 @@ OUString byteStreamToOUString( CDOTransferable::ByteSequence_t& aByteStream ) sal_Int32 nMemSize = aByteStream.getLength( ); // if there is a trailing L"\0" subtract 1 from length -if ( 0 == aByteStream[ aByteStream.getLength( ) - 2 ] && +// for unknown reason, the sequence may sometimes arrive empty +if ( aByteStream.getLength( ) > 1 && + 0 == aByteStream[ aByteStream.getLength( ) - 2 ] && 0 == aByteStream[ aByteStream.getLength( ) - 1 ] ) nWChars = static_cast< sal_Int32 >( nMemSize / sizeof( sal_Unicode ) ) - 1; else @@ -110,6 +112,8 @@ Any byteStreamToAny( CDOTransferable::ByteSequence_t& aByteStream, const Type& a if ( aRequestedDataType == CPPUTYPE_OUSTRING ) { OUString str = byteStreamToOUString( aByteStream ); +if (str.isEmpty()) +throw RuntimeException(); aAny <<= str; } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dnd/target.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 5e366b44fbbacb2c6b193be5f3315f205d90880b Author: Andrea Gelmini AuthorDate: Sun Nov 10 23:42:38 2019 +0100 Commit: Julien Nabet CommitDate: Mon Nov 11 09:38:03 2019 +0100 Fix typo To complete https://gerrit.libreoffice.org/82392 Change-Id: Ieff164b11c66b55280b12940a080a186ce0fba8b Reviewed-on: https://gerrit.libreoffice.org/82408 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index 4ab0b0a22428..7592eb390962 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -112,7 +112,7 @@ void SAL_CALL DropTarget::initialize( const Sequence< Any >& aArguments ) // Additionally even if RegisterDragDrop is called from an STA thread we have // to ensure that it is called from the same thread that created the Window -// otherwise meesages sent during DND won't reach the windows message queue. +// otherwise messages sent during DND won't reach the windows message queue. // Calling AttachThreadInput first would resolve this problem but would block // the message queue of the calling thread. So if the current thread // (even if it's an STA thread) and the thread that created the window are not ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source framework/source include/connectivity include/svtools
dtrans/source/win32/clipb/MtaOleClipb.hxx |2 +- dtrans/source/win32/dtobj/TxtCnvtHlp.cxx |4 ++-- framework/source/loadenv/loadenv.cxx |4 ++-- include/connectivity/dbmetadata.hxx |2 +- include/svtools/ctrlbox.hxx |2 +- 5 files changed, 7 insertions(+), 7 deletions(-) New commits: commit fdf032c366c6c8ba854a2e922dd25ff390be66e1 Author: Andrea Gelmini AuthorDate: Fri Aug 16 21:40:41 2019 +0200 Commit: Julien Nabet CommitDate: Fri Aug 16 22:20:21 2019 +0200 Fix typos Change-Id: I488908096aac319daf30875aee1e46b914cc4759 Reviewed-on: https://gerrit.libreoffice.org/77608 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/dtrans/source/win32/clipb/MtaOleClipb.hxx b/dtrans/source/win32/clipb/MtaOleClipb.hxx index 58583ce6c7e5..bf71ac26e8f8 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.hxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.hxx @@ -56,7 +56,7 @@ public: private: unsigned int run( ); -// create a hidden window which serves as an request target; so we +// create a hidden window which serves as a request target; so we // guarantee synchronization void createMtaOleReqWnd( ); diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx index 91f26ed9f0c0..1ea9f4c9f549 100644 --- a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx +++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx @@ -76,7 +76,7 @@ int MultiByteToWideCharEx( UINT cp_src, // setup a global memory pointer CRawHGlobalPtr ptrHGlob( refDTransHelper ); -// do the conversion an return +// do the conversion and return return MultiByteToWideChar( cp_src, 0, lpMultiByteString, @@ -110,7 +110,7 @@ int WideCharToMultiByteEx( UINT cp_dest, // setup a global memory pointer CRawHGlobalPtr ptrHGlob( refDTransHelper ); -// do the conversion an return +// do the conversion and return return WideCharToMultiByte( cp_dest, 0, lpWideCharString, diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index ff19bdff0006..73180facd46a 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -1190,8 +1190,8 @@ css::uno::Reference< css::uno::XInterface > LoadEnv::impl_searchLoader() throw LoadEnvException(LoadEnvException::ID_INVALID_ENVIRONMENT); } -// Otherwise ... -// We need this type information to locate an registered frame loader +// Otherwise... +// We need this type information to locate a registered frame loader // Without such information we can't work! OUString sType = m_lMediaDescriptor.getUnpackedValueOrDefault(utl::MediaDescriptor::PROP_TYPENAME(), OUString()); if (sType.isEmpty()) diff --git a/include/connectivity/dbmetadata.hxx b/include/connectivity/dbmetadata.hxx index 21c8d63013c6..085b30b52875 100644 --- a/include/connectivity/dbmetadata.hxx +++ b/include/connectivity/dbmetadata.hxx @@ -66,7 +66,7 @@ namespace dbtools @throws css::sdbc::SQLException if obtaining the meta data from the connection throws an SQLException @throws css::uno::RuntimeException -if obtaining the meta data from the connection throws an RuntimeException +if obtaining the meta data from the connection throws a RuntimeException */ DatabaseMetaData( const css::uno::Reference< css::sdbc::XConnection >& _connection ); diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 06c97e2ccff3..56b7f55026e8 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -175,7 +175,7 @@ All sizes are in 1/10 typographic point (pt). The passed FontList must be retained until the next fill call. -Additionally it supports an relative mod, which allows entering +Additionally it supports a relative mod, which allows entering percentage values. This, eg., can be useful for template dialogs. This mode can only be enabled, but not disabled again. ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source odk/examples svx/source
dtrans/source/win32/clipb/WinClipboard.hxx |2 +- odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java |2 +- odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java |2 +- svx/source/form/fmscriptingenv.cxx |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) New commits: commit fdad46f310569cb57fb618345647167b6fdda198 Author: Andrea Gelmini AuthorDate: Sun Aug 11 12:24:30 2019 +0200 Commit: Julien Nabet CommitDate: Mon Aug 12 10:42:35 2019 +0200 Fix typo "an one" Change-Id: Ic12d139acfdb32aaf0089c60609feaa653fd686b Reviewed-on: https://gerrit.libreoffice.org/77259 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/dtrans/source/win32/clipb/WinClipboard.hxx b/dtrans/source/win32/clipb/WinClipboard.hxx index c0058593ed40..db3f1ab188ed 100644 --- a/dtrans/source/win32/clipb/WinClipboard.hxx +++ b/dtrans/source/win32/clipb/WinClipboard.hxx @@ -45,7 +45,7 @@ class CWinClipbImpl; // class instance // watch out: we are using only one static member variable and not a list // because we assume to be instantiated only once -// this will be assured by an OneInstanceFactory of the service and not +// this will be assured by a OneInstanceFactory of the service and not // by this class! // helper class, so that the mutex is constructed diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java index 4a6e9f9900b5..380f8da3cf5d 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/Interceptor.java @@ -143,7 +143,7 @@ public class Interceptor implements com.sun.star.frame.XFrameActionListener, /* - * In case we got an oneway listener callback - we had to use the office + * In case we got a oneway listener callback - we had to use the office * asynchronous then. This method is the callback from the started thread * (started inside the original oneway method). We found all parameters of * the original request packed inside a vector. Here we unpack it and diff --git a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java index a86ff31defc1..8da2103aaa61 100644 --- a/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java +++ b/odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/OnewayExecutor.java @@ -38,7 +38,7 @@ import java.util.ArrayList; // __ Implementation __ /** - * It's not allowed to call synchronous back inside an oneway interface call. + * It's not allowed to call synchronous back inside a oneway interface call. * (see IOnewayLink too). So we start a thread (implemented by this class), which * gets all necessary parameters from the original called object and * call it back later inside his run() method. So the execution of such oneway call diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 878639570bd9..bddfc8827b6f 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -183,7 +183,7 @@ namespace svxform bool FormScriptListener::impl_allowAsynchronousCall_nothrow( const OUString& _rListenerType, const OUString& _rMethodName ) { // This used to be implemented as: -// is (_rListenerType + "::" + _rMethodName) an oneway function? +// is (_rListenerType + "::" + _rMethodName) a oneway function? // since we got rid of the notion of oneway, this is the list // of oneway methods, autogenerated by postprocessing of // commitdiff 90eac3e69749a9227c4b6902b1f3cef1e338c6d1 ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/FmtFilter.hxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit 736f65e53b966774f2d72e6f2479fd335986f5a6 Author: Andrea Gelmini AuthorDate: Tue May 14 21:25:40 2019 + Commit: Andrea Gelmini CommitDate: Tue Jul 30 07:57:06 2019 +0200 Fix typo Change-Id: Ie1d5b87b4d02faac560bf64cb11a31082189e7a5 Reviewed-on: https://gerrit.libreoffice.org/72575 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/dtrans/source/win32/dtobj/FmtFilter.hxx b/dtrans/source/win32/dtobj/FmtFilter.hxx index 8906154d3aca..1c2325851208 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.hxx +++ b/dtrans/source/win32/dtobj/FmtFilter.hxx @@ -39,7 +39,7 @@ css::uno::Sequence< sal_Int8 > WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile /* input: -aByteStream - a sequence of bytes containing a openoffice metafile +aByteStream - a sequence of bytes containing a LibreOffice metafile picture with a leading METAFILEHEADER */ HMETAFILEPICT OOMFPictToWinMFPict( css::uno::Sequence< sal_Int8 > const & aOOMetaFilePict ); @@ -60,7 +60,7 @@ css::uno::Sequence< sal_Int8 > WinBITMAPToOOBMP( HBITMAP ); /* input: -aOOBmp - sequence of bytes containing a openoffice bitmap +aOOBmp - sequence of bytes containing a LibreOffice bitmap May contain CF_DIBV5 or CF_DIB, but removing the BITMAPFILEHEADER is always the same size */ @@ -77,7 +77,7 @@ css::uno::Sequence< sal_Int8 > TextHtmlToHTMLFormat( css::uno::Sequence< sal_Int /** Return a FileList in which Windows Shell Links (lnk) are resolved. -If for what ever reason a resolution is not possible leave the +If for whatever reason a resolution is not possible leave the original lnk file. */ css::uno::Sequence< sal_Int8 > CF_HDROPToFileList(HGLOBAL hGlobal); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/APNDataObject.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8617fb4fdf5a9ca6825712759db2fff82dc397f3 Author: Andrea Gelmini AuthorDate: Mon Jul 29 09:40:09 2019 +0200 Commit: Andrea Gelmini CommitDate: Mon Jul 29 16:27:00 2019 +0200 Fix typo Change-Id: Ia12484339eff532112e5de4b9c95d41a61d25574 Reviewed-on: https://gerrit.libreoffice.org/72572 Tested-by: Jenkins Reviewed-by: Andrea Gelmini diff --git a/dtrans/source/win32/dtobj/APNDataObject.hxx b/dtrans/source/win32/dtobj/APNDataObject.hxx index f7a712e84e5b..2c1d9718ec2f 100644 --- a/dtrans/source/win32/dtobj/APNDataObject.hxx +++ b/dtrans/source/win32/dtobj/APNDataObject.hxx @@ -23,7 +23,7 @@ #include /* -an APartment Neutral dataobject wrapper; this wrapper of a IDataObject +an APartment Neutral dataobject wrapper; this wrapper of an IDataObject pointer can be used from any apartment without RPC_E_WRONG_THREAD which normally occurs if an apartment tries to use an interface pointer of another apartment; we use containment to hold the original ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/FmtFilter.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 9b122d23e3e983bd8ea96460cc7910b19b7f7d5c Author: Andrea Gelmini AuthorDate: Tue May 14 21:25:41 2019 + Commit: Michael Meeks CommitDate: Fri Jul 19 18:15:41 2019 +0200 Fix typo Change-Id: Ifdb5ca9a9f7b6ee2c1549675da28af35c695e354 Reviewed-on: https://gerrit.libreoffice.org/72574 Tested-by: Jenkins Reviewed-by: Michael Meeks diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 0b60cb51c109..007d04ac08c5 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -48,7 +48,7 @@ struct METAFILEHEADER }; #pragma pack() -// convert a windows metafile picture to a openoffice metafile picture +// convert a windows metafile picture to a LibreOffice metafile picture Sequence< sal_Int8 > WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFilePict ) { @@ -118,7 +118,7 @@ Sequence< sal_Int8 > WinMFPictToOOMFPict( Sequence< sal_Int8 >& aMetaFilePict ) return mfpictStream; } -// convert a windows enhanced metafile to a openoffice metafile +// convert a windows enhanced metafile to a LibreOffice metafile Sequence< sal_Int8 > WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile ) { @@ -137,7 +137,7 @@ Sequence< sal_Int8 > WinENHMFPictToOOMFPict( HENHMETAFILE hEnhMetaFile ) return aRet; } -// convert a openoffice metafile picture to a windows metafile picture +// convert a LibreOffice metafile picture to a windows metafile picture HMETAFILEPICT OOMFPictToWinMFPict( Sequence< sal_Int8 > const & aOOMetaFilePict ) { @@ -159,7 +159,7 @@ HMETAFILEPICT OOMFPictToWinMFPict( Sequence< sal_Int8 > const & aOOMetaFilePict return hPict; } -// convert a openoffice metafile picture to a windows enhanced metafile picture +// convert a LibreOffice metafile picture to a windows enhanced metafile picture HENHMETAFILE OOMFPictToWinENHMFPict( Sequence< sal_Int8 > const & aOOMetaFilePict ) { @@ -168,7 +168,7 @@ HENHMETAFILE OOMFPictToWinENHMFPict( Sequence< sal_Int8 > const & aOOMetaFilePic return hEnhMtf; } -// convert a windows device independent bitmap into a openoffice bitmap +// convert a windows device independent bitmap into a LibreOffice bitmap Sequence< sal_Int8 > WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB ) { @@ -201,7 +201,7 @@ Sequence< sal_Int8 > WinDIBToOOBMP( const Sequence< sal_Int8 >& aWinDIB ) return ooBmpStream; } -// convert a openoffice bitmap into a windows device independent bitmap +// convert a LibreOffice bitmap into a windows device independent bitmap Sequence< sal_Int8 > OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp ) { @@ -387,7 +387,7 @@ css::uno::Sequence CF_HDROPToFileList(HGLOBAL hGlobal) return FileListToByteSequence(files); } -// convert a windows bitmap handle into a openoffice bitmap +// convert a windows bitmap handle into a LibreOffice bitmap Sequence< sal_Int8 > WinBITMAPToOOBMP( HBITMAP aHBMP ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/XTDataObject.hxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 6f3ded0ef16514ac651d07d9172c80aa6ef11569 Author: Andrea Gelmini AuthorDate: Tue May 14 21:25:37 2019 + Commit: Julien Nabet CommitDate: Tue May 21 09:24:18 2019 +0200 Fix typo Change-Id: If25ae724fcac4bf9475eca506194593a7a5fdeab Reviewed-on: https://gerrit.libreoffice.org/72628 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx index 4fdd1149e9c2..ca30bbea2434 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.hxx +++ b/dtrans/source/win32/dtobj/XTDataObject.hxx @@ -41,7 +41,7 @@ and decides if there is a format he can use if there is one, he requests the data in this format -- This class inherits from IDataObject an so can be placed on the +- This class inherits from IDataObject and so can be placed on the OleClipboard. The class wraps a transferable object which is the original DataSource - DataFlavors offered by this transferable will be translated into ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dnd/target.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit c3245cfd54f39afb424867ab483096d9de5e Author: Andrea Gelmini AuthorDate: Tue May 14 21:25:47 2019 + Commit: Julien Nabet CommitDate: Sun May 19 21:52:11 2019 +0200 Fix typo Change-Id: I6addc8273cbf46d047e2df4aa27dff11a8666bce Reviewed-on: https://gerrit.libreoffice.org/72569 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index 552e3700d3d3..eed51da71ed4 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -343,7 +343,7 @@ HRESULT DropTarget::DragEnter( IDataObject *pDataObj, fire_dragEnter( e); // Check if the action derived from grfKeyState (m_nCurrentDropAction) or the action set -// by the listener (m_nCurrentDropAction) is allowed by the source. Only a allowed action is set +// by the listener (m_nCurrentDropAction) is allowed by the source. Only an allowed action is set // in pdwEffect. The listener notification is asynchron, that is we cannot expect that the listener // has already reacted to the notification. // If there is more than one valid action which is the case when ALT or RIGHT MOUSE BUTTON is pressed @@ -391,7 +391,7 @@ HRESULT DropTarget::DragOver( DWORD grfKeyState, // The Event contains a XDropTargetDragContext implementation. fire_dragOver( e); // Check if the action derived from grfKeyState (m_nCurrentDropAction) or the action set -// by the listener (m_nCurrentDropAction) is allowed by the source. Only a allowed action is set +// by the listener (m_nCurrentDropAction) is allowed by the source. Only an allowed action is set // in pdwEffect. The listener notification is asynchron, that is we cannot expect that the listener // has already reacted to the notification. // If there is more than one valid action which is the case when ALT or RIGHT MOUSE BUTTON is pressed @@ -565,7 +565,7 @@ void DropTarget::fire_dropActionChanged( const DropTargetDragEvent& dtde ) // XDropTargetDropContext // Returning sal_False would cause the XDropTargetDropContext or ..DragContext implementation // to throw an InvalidDNDOperationException, meaning that a Drag is not currently performed. -// return sal_False results in throwing a InvalidDNDOperationException in the caller. +// return sal_False results in throwing an InvalidDNDOperationException in the caller. void DropTarget::_acceptDrop(sal_Int8 dropOperation, const Reference& context) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/XTDataObject.cxx | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) New commits: commit 6e7eb552d19675bb065754a3e1f0cdea137aedfb Author: Andrea Gelmini AuthorDate: Tue May 14 21:25:38 2019 + Commit: Julien Nabet CommitDate: Sun May 19 21:46:32 2019 +0200 Fix typo Change-Id: Ie0d2c0cde9c1fb58a63e8ef5331bdcb5126aaf28 Reviewed-on: https://gerrit.libreoffice.org/72577 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index d6291b526498..6df5c9d384c1 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -251,7 +251,7 @@ STDMETHODIMP CXTDataObject::GetData( FORMATETC * pFormatetc, STGMEDIUM * pmedium invalidateStgMedium( *pmedium ); validateFormatEtc( pFormatetc ); -// handle locale request, because locale is a artificial format for us +// handle locale request, because locale is an artificial format for us if ( CF_LOCALE == pFormatetc->cfFormat ) renderLocaleAndSetupStgMedium( *pFormatetc, *pmedium ); else if ( CF_UNICODETEXT == pFormatetc->cfFormat ) @@ -308,7 +308,7 @@ void CXTDataObject::renderUnicodeAndSetupStgMedium( Any aAny = m_XTransferable->getTransferData( aFlavor ); // unfortunately not all transferables fulfill the -// spec. an do throw an UnsupportedFlavorException +// spec. and do throw an UnsupportedFlavorException // so we must check the any if ( !aAny.hasValue( ) ) { @@ -340,7 +340,7 @@ void CXTDataObject::renderAnyDataAndSetupStgMedium( Any aAny = m_XTransferable->getTransferData( aFlavor ); // unfortunately not all transferables fulfill the -// spec. an do throw an UnsupportedFlavorException +// spec. and do throw an UnsupportedFlavorException // so we must check the any if ( !aAny.hasValue( ) ) { @@ -349,7 +349,7 @@ void CXTDataObject::renderAnyDataAndSetupStgMedium( } // unfortunately not all transferables fulfill the -// spec. an do throw an UnsupportedFlavorException +// spec. and do throw an UnsupportedFlavorException // so we must check the any if ( !aAny.hasValue( ) ) throw UnsupportedFlavorException( ); @@ -446,7 +446,7 @@ void CXTDataObject::renderSynthesizedUnicodeAndSetupStgMedium( FORMATETC const & Any aAny = m_XTransferable->getTransferData( m_FormatRegistrar.getRegisteredTextFlavor( ) ); // unfortunately not all transferables fulfill the -// spec. an do throw an UnsupportedFlavorException +// spec. and do throw an UnsupportedFlavorException // so we must check the any if ( !aAny.hasValue( ) ) { @@ -480,7 +480,7 @@ void CXTDataObject::renderSynthesizedTextAndSetupStgMedium( FORMATETC& fetc, STG Any aAny = m_XTransferable->getTransferData( aFlavor ); // unfortunately not all transferables fulfill the -// spec. an do throw an UnsupportedFlavorException +// spec. and do throw an UnsupportedFlavorException // so we must check the any if ( !aAny.hasValue( ) ) { @@ -515,7 +515,7 @@ void CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC& fetc, STG Any aAny = m_XTransferable->getTransferData( aFlavor ); // unfortunately not all transferables fulfill the -// spec. an do throw an UnsupportedFlavorException +// spec. and do throw an UnsupportedFlavorException // so we must check the any if ( !aAny.hasValue( ) ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/TxtCnvtHlp.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit c0b9c45b847e473c11e4282e8af5e46f4fe8c0cb Author: Andrea Gelmini AuthorDate: Tue May 14 21:25:39 2019 + Commit: Julien Nabet CommitDate: Sun May 19 21:46:49 2019 +0200 Fix typo Change-Id: Ifd8b571d2331e3b11b38ee40fd2bc39de5e8d64c Reviewed-on: https://gerrit.libreoffice.org/72576 Reviewed-by: Julien Nabet Tested-by: Julien Nabet diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx index b4fa6c012e60..91f26ed9f0c0 100644 --- a/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx +++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.cxx @@ -76,7 +76,7 @@ int MultiByteToWideCharEx( UINT cp_src, // setup a global memory pointer CRawHGlobalPtr ptrHGlob( refDTransHelper ); -// do the converssion an return +// do the conversion an return return MultiByteToWideChar( cp_src, 0, lpMultiByteString, @@ -110,7 +110,7 @@ int WideCharToMultiByteEx( UINT cp_dest, // setup a global memory pointer CRawHGlobalPtr ptrHGlob( refDTransHelper ); -// do the converssion an return +// do the conversion an return return WideCharToMultiByte( cp_dest, 0, lpWideCharString, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/cnttype/mctfentry.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ccf4d765fff75df56ca1b797415b71a43658478a Author: Andrea Gelmini AuthorDate: Tue May 14 21:25:52 2019 + Commit: Julien Nabet CommitDate: Sun May 19 18:29:18 2019 +0200 Fix typo Change-Id: I931e9aaf623a1b405054df4aebe1d2e1b591f212 Reviewed-on: https://gerrit.libreoffice.org/72537 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/dtrans/source/cnttype/mctfentry.cxx b/dtrans/source/cnttype/mctfentry.cxx index 878b1fbe942c..e102564c7a2f 100644 --- a/dtrans/source/cnttype/mctfentry.cxx +++ b/dtrans/source/cnttype/mctfentry.cxx @@ -34,7 +34,7 @@ using namespace ::com::sun::star::datatransfer; namespace { -// functions to create a new Clipboad instance; is needed by factory helper implementation +// functions to create a new Clipboard instance; is needed by factory helper implementation // @param rServiceManager - service manager, useful if the component needs other uno services // so we should give it to every UNO-Implementation component ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dnd/source.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 7773edb33dac2b8aa548dd6859514833872b61d8 Author: Andrea Gelmini AuthorDate: Tue May 14 21:25:48 2019 + Commit: Julien Nabet CommitDate: Sun May 19 18:15:30 2019 +0200 Fix typo Change-Id: I57ddee21cb31c06b47eaf30010fa7378401a2f17 Reviewed-on: https://gerrit.libreoffice.org/72541 Tested-by: Jenkins Reviewed-by: Julien Nabet diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx index 772eeb0ccb00..ac5f18382819 100644 --- a/dtrans/source/win32/dnd/source.cxx +++ b/dtrans/source/win32/dnd/source.cxx @@ -68,7 +68,7 @@ DragSource::~DragSource() Do we really need a separate thread for every Dnd operation or only if the source - thread is an MTA thread + thread is a MTA thread */ void DragSource::StartDragImpl( @@ -111,7 +111,7 @@ void DragSource::StartDragImpl( DWORD processId; m_threadIdWindow= GetWindowThreadProcessId( m_hAppWindow, ); -// hold the instance for the DnD thread, it's to late +// hold the instance for the DnD thread, it's too late // to acquire at the start of the thread procedure // the thread procedure is responsible for the release acquire(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/FmtFilter.cxx | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) New commits: commit 538f7d66b17bfde94e5270b9e2b2fb9850e0d65e Author: Mike Kaganski AuthorDate: Mon Apr 1 13:48:06 2019 +0100 Commit: Mike Kaganski CommitDate: Mon Apr 1 16:00:07 2019 +0200 IShellLinkA -> IShellLinkW Change-Id: If07d7e0d2a3a33f0bcc96352ea40ff83a2f483ed Reviewed-on: https://gerrit.libreoffice.org/70062 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index a38c6204ef25..0b60cb51c109 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -301,9 +301,9 @@ static std::wstring getShellLinkTarget(const std::wstring& aLnkFile) try { -sal::systools::COMReference pIShellLink; +sal::systools::COMReference pIShellLink; HRESULT hr = CoCreateInstance( -CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast()); +CLSID_ShellLink, nullptr, CLSCTX_INPROC_SERVER, IID_IShellLinkW, reinterpret_cast()); if (FAILED(hr)) return target; @@ -318,14 +318,12 @@ static std::wstring getShellLinkTarget(const std::wstring& aLnkFile) if (FAILED(hr)) return target; -char pathA[MAX_PATH]; -WIN32_FIND_DATA wfd; -hr = pIShellLink->GetPath(pathA, MAX_PATH, , SLGP_RAWPATH); +wchar_t pathW[MAX_PATH]; +WIN32_FIND_DATAW wfd; +hr = pIShellLink->GetPath(pathW, MAX_PATH, , SLGP_RAWPATH); if (FAILED(hr)) return target; -wchar_t pathW[MAX_PATH]; -MultiByteToWideChar(CP_ACP, 0, pathA, -1, pathW, MAX_PATH); target = pathW; } catch(sal::systools::ComError& ex) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/MtaOleClipb.cxx | 12 ++-- dtrans/source/win32/clipb/MtaOleClipb.hxx |6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) New commits: commit eb5e2dea18835df78872a8b0e3446e604f749645 Author: Damjan Jovanovic AuthorDate: Tue Feb 5 18:51:13 2019 + Commit: Caolán McNamara CommitDate: Sun Feb 10 21:59:28 2019 +0100 Win64 fixes for dtrans. Patch by: me (cherry picked from commit 7595a809d2a4aea9299633546ca95f709133dee8) Change-Id: I59a561aad16073fec1567e1873842a2b11dff4df Reviewed-on: https://gerrit.libreoffice.org/67594 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 2c579e38e741..8b1b07ec7ecd 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -458,12 +458,12 @@ bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncCli return bRet; } -LRESULT CMtaOleClipboard::onSetClipboard( IDataObject* pIDataObject ) +HRESULT CMtaOleClipboard::onSetClipboard( IDataObject* pIDataObject ) { -return static_cast( OleSetClipboard( pIDataObject ) ); +return OleSetClipboard( pIDataObject ); } -LRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream ) +HRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream ) { OSL_ASSERT(nullptr != ppStream); @@ -476,14 +476,14 @@ LRESULT CMtaOleClipboard::onGetClipboard( LPSTREAM* ppStream ) hr = MarshalIDataObjectInStream(pIDataObject.get(), ppStream); OSL_ENSURE(SUCCEEDED(hr), "marshalling cliboard data object failed"); } -return static_cast(hr); +return hr; } // flush the ole-clipboard -LRESULT CMtaOleClipboard::onFlushClipboard( ) +HRESULT CMtaOleClipboard::onFlushClipboard( ) { -return static_cast( OleFlushClipboard( ) ); +return OleFlushClipboard(); } // handle clipboard update event diff --git a/dtrans/source/win32/clipb/MtaOleClipb.hxx b/dtrans/source/win32/clipb/MtaOleClipb.hxx index f25019d0784c..58583ce6c7e5 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.hxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.hxx @@ -67,9 +67,9 @@ private: // message handler functions; remember these functions are called // from a different thread context! -static LRESULT onSetClipboard( IDataObject* pIDataObject ); -static LRESULT onGetClipboard( LPSTREAM* ppStream ); -static LRESULT onFlushClipboard( ); +static HRESULT onSetClipboard( IDataObject* pIDataObject ); +static HRESULT onGetClipboard( LPSTREAM* ppStream ); +static HRESULT onFlushClipboard( ); bool onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncClipViewerCallback ); // win32 clipboard listener support ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/MtaOleClipb.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit ab99c08defad5431bbd0b456e3854d749ec0173e Author: Mike Kaganski AuthorDate: Tue Feb 5 14:21:22 2019 +0300 Commit: Mike Kaganski CommitDate: Tue Feb 5 14:10:35 2019 +0100 Cleanup event properly; handle error from MsgWaitForMultipleObjects Commit 11a2809e369b2a6fcbb2d7f0db131a945557c6e2 follow-up Change-Id: Id70a95f46655ade3b867e0377ddd5bee13993187 Reviewed-on: https://gerrit.libreoffice.org/67402 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index ac3dc68083e1..2c579e38e741 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -108,6 +108,9 @@ namespace /* private */ break; } + +default: // WAIT_FAILED? +return false; } } } @@ -268,6 +271,10 @@ CMtaOleClipboard::~CMtaOleClipboard( ) m_bRunClipboardNotifierThread = false; SetEvent( m_hTerminateClipboardChangedNotifierEvent ); +// unblock whoever could still wait for event processing +if (m_hEvtWndDisposed) +SetEvent(m_hEvtWndDisposed); + sal_uInt32 dwResult = WaitForSingleObject( m_hClipboardChangedNotifierThread, MAX_WAIT_SHUTDOWN ); @@ -297,6 +304,9 @@ CMtaOleClipboard::~CMtaOleClipboard( ) if ( nullptr != m_hEvtThrdReady ) CloseHandle( m_hEvtThrdReady ); +if (m_hEvtWndDisposed) +CloseHandle(m_hEvtWndDisposed); + if ( m_MtaOleReqWndClassAtom ) UnregisterClassW( g_szWndClsName, nullptr ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/MtaOleClipb.cxx | 102 ++ dtrans/source/win32/clipb/MtaOleClipb.hxx |1 2 files changed, 90 insertions(+), 13 deletions(-) New commits: commit 11a2809e369b2a6fcbb2d7f0db131a945557c6e2 Author: Mike Kaganski AuthorDate: Mon Feb 4 23:12:42 2019 +0300 Commit: Mike Kaganski CommitDate: Tue Feb 5 10:09:16 2019 +0100 tdf#122435: reimplement fix for tdf#109085 This reverts commit 3d8c159841bcab7365b2bed3df71ed3c15188312, and instead, checks if the MtaOleReq window is not destroyed yet, in addition to the wait for the condition. This allows to avoid wait forever for condition which never gets signalled, and process the sent messages when waiting. The window's WM_DESTROY handler sets the event signalling that. The Win32Condition's wait() is changed to take the abort event, and return true if its own event fired, and false if abort event fired. Change-Id: I1861dd3dabb39329976a3ccf2a5392c9ddbf9613 Reviewed-on: https://gerrit.libreoffice.org/67383 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 02a5f309aa14..ac3dc68083e1 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -62,11 +62,72 @@ namespace /* private */ const sal_uInt32 MAX_WAITTIME = 1; // msec const sal_uInt32 MAX_WAIT_SHUTDOWN = 1; // msec -const bool MANUAL_RESET = true; -const bool INIT_NONSIGNALED = false; +const BOOL MANUAL_RESET = TRUE; +const BOOL INIT_NONSIGNALED = FALSE; + +/* Cannot use osl conditions because they are blocking +without waking up on messages sent by another thread +this leads to deadlocks because we are blocking the +communication between inter-thread marshalled COM +pointers. +COM Proxy-Stub communication uses SendMessages for +synchronization purposes. +*/ +class Win32Condition +{ +public: +Win32Condition() = default; + +~Win32Condition() { CloseHandle(m_hEvent); } + +// wait infinite for own event (or abort event) be signaled +// leave messages sent through +bool wait(HANDLE hEvtAbort) +{ +const HANDLE hWaitArray[2] = { m_hEvent, hEvtAbort }; +while (true) +{ +DWORD dwResult += MsgWaitForMultipleObjects(2, hWaitArray, FALSE, INFINITE, QS_SENDMESSAGE); + +switch (dwResult) +{ +case WAIT_OBJECT_0: // wait successful +return true; + +case WAIT_OBJECT_0 + 1: // wait aborted +return false; + +case WAIT_OBJECT_0 + 2: +{ +/* PeekMessage processes all messages in the SendMessage + queue that's what we want, messages from the PostMessage + queue stay untouched */ +MSG msg; +PeekMessageW(, nullptr, 0, 0, PM_NOREMOVE); + +break; +} +} +} +} + +// set the event +void set() { SetEvent(m_hEvent); } + +private: +HANDLE m_hEvent = CreateEventW(nullptr, MANUAL_RESET, INIT_NONSIGNALED, nullptr); + +// prevent copy/assignment +Win32Condition(const Win32Condition&) = delete; +Win32Condition& operator=(const Win32Condition&) = delete; +}; + +// we use one condition for every request struct MsgCtx { +Win32Condition aCondition; HRESULT hr; }; @@ -159,6 +220,8 @@ CMtaOleClipboard::CMtaOleClipboard( ) : m_uOleThreadId( 0 ), m_hEvtThrdReady( nullptr ), m_hwndMtaOleReqWnd( nullptr ), +// signals that the window is destroyed - to stop waiting any winproc result +m_hEvtWndDisposed(CreateEventW(nullptr, MANUAL_RESET, INIT_NONSIGNALED, nullptr)), m_MtaOleReqWndClassAtom( 0 ), m_pfncClipViewerCallback( nullptr ), m_bRunClipboardNotifierThread( true ), @@ -170,6 +233,7 @@ CMtaOleClipboard::CMtaOleClipboard( ) : m_hEvtThrdReady = CreateEventW( nullptr, MANUAL_RESET, INIT_NONSIGNALED, nullptr ); OSL_ASSERT( nullptr != m_hEvtThrdReady ); +SAL_WARN_IF(!m_hEvtWndDisposed, "dtrans", "CreateEventW failed: m_hEvtWndDisposed is nullptr"); s_theMtaOleClipboardInst = this; @@ -253,11 +317,10 @@ HRESULT CMtaOleClipboard::flushClipboard( ) MsgCtx aMsgCtx; -sendMessage( MSG_FLUSHCLIPBOARD, - static_cast< WPARAM >( 0 ), - reinterpret_cast< LPARAM >( ) ); +const bool bWaitSuccess =
[Libreoffice-commits] core.git: dtrans/source vcl/inc vcl/win
dtrans/source/win32/dtobj/FetcList.cxx |2 +- vcl/inc/win/winlayout.hxx |2 +- vcl/win/gdi/gdiimpl.cxx|2 +- vcl/win/gdi/winlayout.cxx |2 +- 4 files changed, 4 insertions(+), 4 deletions(-) New commits: commit 8f31bb9d3facfc34f42b89ef7b1e076ef158928e Author: Stephan Bergmann AuthorDate: Wed Jan 30 14:42:15 2019 +0100 Commit: Stephan Bergmann CommitDate: Wed Jan 30 17:44:03 2019 +0100 loplugin:redundantfcast (clang-cl) Change-Id: I814e7b61ebbef1a0bbd38a5e70beeb7f99a0cfa1 Reviewed-on: https://gerrit.libreoffice.org/67146 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx index 36bb5bd74eee..0a262b0677fb 100644 --- a/dtrans/source/win32/dtobj/FetcList.cxx +++ b/dtrans/source/win32/dtobj/FetcList.cxx @@ -48,7 +48,7 @@ CFormatEtcContainer::CFormatEtcContainer( ) void CFormatEtcContainer::addFormatEtc( const CFormatEtc& fetc ) { -m_FormatMap.push_back( CFormatEtc( fetc ) ); +m_FormatMap.push_back( fetc ); } void CFormatEtcContainer::removeFormatEtc( const CFormatEtc& fetc ) diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index 042e30e9f299..279c155b0a97 100644 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -127,7 +127,7 @@ public: void PutDrawElementInCache(const OpenGLGlyphDrawElement& rElement, int nGlyphIndex) { assert(!IsGlyphCached(nGlyphIndex)); -maOpenGLTextureCache[nGlyphIndex] = OpenGLGlyphDrawElement(rElement); +maOpenGLTextureCache[nGlyphIndex] = rElement; } OpenGLGlyphDrawElement& GetDrawElement(int nGlyphIndex) diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx index 1f654ebbee77..432d5add15a5 100644 --- a/vcl/win/gdi/gdiimpl.cxx +++ b/vcl/win/gdi/gdiimpl.cxx @@ -1088,7 +1088,7 @@ bool WinSalGraphicsImpl::setClipRegion( const vcl::Region& i_rClip ) { const basegfx::B2DRange aRangeS(aPolyPolygon.getB2DRange()); const basegfx::B2DRange aRangeT(aRangeS.getMinimum(), aRangeS.getMaximum() + basegfx::B2DTuple(1.0, 1.0)); -aExpand = basegfx::B2DHomMatrix(basegfx::utils::createSourceRangeTargetRangeTransform(aRangeS, aRangeT)); +aExpand = basegfx::utils::createSourceRangeTargetRangeTransform(aRangeS, aRangeT); } for(auto const& rPolygon : aPolyPolygon) diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 4ae496f2d5f4..24dbcb1b9815 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -115,7 +115,7 @@ bool WinFontInstance::CacheGlyphToAtlas(HDC hDC, HFONT hFont, int nGlyphIndex, S // take anti-aliasing into consideration. Let's hope that leaving // "extra" space between glyphs will help. std::vector aGlyphAdv(1); // offsets between glyphs -std::vector aGlyphOffset(1, DWRITE_GLYPH_OFFSET{0.0f, 0.0f}); +std::vector aGlyphOffset(1, {0.0f, 0.0f}); std::vector aEnds(1); // end of each glyph box float totWidth = 0; { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/MtaOleClipb.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 8eccadb49ede6277cfe7086d64b523c8eb847e91 Author: Stephan Bergmann AuthorDate: Wed Jan 30 14:37:58 2019 +0100 Commit: Stephan Bergmann CommitDate: Wed Jan 30 17:40:11 2019 +0100 -Werror,-Wunused-const-variable (clang-cl) Change-Id: I3a1ebc4cc4cadd3b4a69b772addbb51eace84e27 Reviewed-on: https://gerrit.libreoffice.org/67142 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index d935713b8e43..02a5f309aa14 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -61,7 +61,6 @@ namespace /* private */ const sal_uInt32 MAX_WAITTIME = 1; // msec const sal_uInt32 MAX_WAIT_SHUTDOWN = 1; // msec -const sal_uInt32 MAX_CLIPEVENT_PROCESSING_TIME = 5000; // msec const bool MANUAL_RESET = true; const bool INIT_NONSIGNALED = false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/MtaOleClipb.cxx | 65 +++--- dtrans/source/win32/clipb/MtaOleClipb.hxx |6 -- 2 files changed, 10 insertions(+), 61 deletions(-) New commits: commit a30dbe34a14906933cfd47e29a4df69a628ab517 Author: Mike Kaganski AuthorDate: Mon Nov 5 18:23:40 2018 +0300 Commit: Mike Kaganski CommitDate: Mon Nov 5 19:30:16 2018 +0100 Win: implement Clipboard Format Listener instead of obsolete Viewer https://docs.microsoft.com/en-us/windows/desktop/dataxchg/using-the-clipboard discusses the techniques to monitor clipboard contents on Windows, and recommends Clipboard Format Listener for Vista+. https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-setclipboardviewer further mentions that using the current "Clipboard Viewer Window" approach, "The clipboard viewer chain can be broken by an application that fails to handle the clipboard chain messages properly". This change reimplements our listener to use recommended way; this should make our clipboard handling more robust, avoiding the need to handle the chain with other applications' windows. Change-Id: Ib33b27a57d7a6af2ab7e3e59d030aa55329694f9 Reviewed-on: https://gerrit.libreoffice.org/62909 Reviewed-by: Mike Kaganski Tested-by: Mike Kaganski diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 79983edd5b16..d935713b8e43 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -161,7 +161,6 @@ CMtaOleClipboard::CMtaOleClipboard( ) : m_hEvtThrdReady( nullptr ), m_hwndMtaOleReqWnd( nullptr ), m_MtaOleReqWndClassAtom( 0 ), -m_hwndNextClipViewer( nullptr ), m_pfncClipViewerCallback( nullptr ), m_bRunClipboardNotifierThread( true ), m_hClipboardChangedEvent( m_hClipboardChangedNotifierEvents[0] ), @@ -238,8 +237,7 @@ CMtaOleClipboard::~CMtaOleClipboard( ) if ( m_MtaOleReqWndClassAtom ) UnregisterClassW( g_szWndClsName, nullptr ); -OSL_ENSURE( ( nullptr == m_pfncClipViewerCallback ) && -!IsWindow( m_hwndNextClipViewer ), +OSL_ENSURE( ( nullptr == m_pfncClipViewerCallback ), "Clipboard viewer not properly unregistered" ); } @@ -354,7 +352,7 @@ bool CMtaOleClipboard::registerClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncClipV bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncClipViewerCallback ) { -bool bRet = true; +bool bRet = false; // we need exclusive access because the clipboard changed notifier // thread also accesses this variable @@ -366,13 +364,9 @@ bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncCli // SetClipboardViewer sends a WM_DRAWCLIPBOARD message we ignore // this message if we register ourself as clip viewer m_bInRegisterClipViewer = true; -m_hwndNextClipViewer = SetClipboardViewer( m_hwndMtaOleReqWnd ); +bRet = AddClipboardFormatListener(m_hwndMtaOleReqWnd); m_bInRegisterClipViewer = false; -// if there is no other cb-viewer the -// return value is NULL!!! -bRet = IsWindow( m_hwndNextClipViewer ); - // save the new callback function m_pfncClipViewerCallback = pfncClipViewerCallback; } @@ -382,8 +376,7 @@ bool CMtaOleClipboard::onRegisterClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncCli // unregister if input parameter is NULL and we previously registered // as clipboard viewer -ChangeClipboardChain( m_hwndMtaOleReqWnd, m_hwndNextClipViewer ); -m_hwndNextClipViewer = nullptr; +bRet = RemoveClipboardFormatListener(m_hwndMtaOleReqWnd); } return bRet; @@ -417,32 +410,9 @@ LRESULT CMtaOleClipboard::onFlushClipboard( ) return static_cast( OleFlushClipboard( ) ); } -// handle clipboard chain change event +// handle clipboard update event -LRESULT CMtaOleClipboard::onChangeCBChain( HWND hWndRemove, HWND hWndNext ) -{ -if ( hWndRemove == m_hwndNextClipViewer ) -m_hwndNextClipViewer = hWndNext; -else if ( IsWindow( m_hwndNextClipViewer ) ) -{ -// forward the message to the next one -DWORD_PTR dwpResult; -SendMessageTimeoutW( -m_hwndNextClipViewer, -WM_CHANGECBCHAIN, -reinterpret_cast(hWndRemove), -reinterpret_cast(hWndNext), -SMTO_BLOCK, -MAX_CLIPEVENT_PROCESSING_TIME, - ); -} - -return 0; -} - -// handle draw clipboard event - -LRESULT CMtaOleClipboard::onDrawClipboard( ) +LRESULT CMtaOleClipboard::onClipboardUpdate() { // we don't send a notification if we are // registering ourself as clipboard @@ -456,20 +426,6 @@ LRESULT CMtaOleClipboard::onDrawClipboard( ) aGuard.clear( ); } -// forward the
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/MtaOleClipb.cxx | 100 +- 1 file changed, 5 insertions(+), 95 deletions(-) New commits: commit 3d8c159841bcab7365b2bed3df71ed3c15188312 Author: Mike Kaganski AuthorDate: Mon Nov 5 11:00:14 2018 +0100 Commit: Mike Kaganski CommitDate: Mon Nov 5 15:10:20 2018 +0100 tdf#109085: don't assume MtaOleReq window is still valid at shutdown The window can be destroyed by e.g. WM_QUERYENDSESSION/WM_ENDSESSION sequence, and then the message MSG_REGCLIPVIEWER handler would not run and the condition would never be set. Since we need to wait for the message processed, let's just use sendMessage which would return only after the message has been processed anyway, and also will return immediately on failure (e.g., window handle invalid). Also this changes other cases where postMessage + wait pattern was used, and removes the condition from MsgContext. Change-Id: Ic12deafbaedd1cc99b9d6145650d99069c618f0e Reviewed-on: https://gerrit.libreoffice.org/62881 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 7dc5c7e38a53..79983edd5b16 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -66,81 +66,8 @@ namespace /* private */ const bool MANUAL_RESET = true; const bool INIT_NONSIGNALED = false; -/* Cannot use osl conditions because they are blocking -without waking up on messages sent by another thread -this leads to deadlocks because we are blocking the -communication between inter-thread marshalled COM -pointers. -COM Proxy-Stub communication uses SendMessages for -synchronization purposes. -*/ -class Win32Condition -{ -public: -// ctor -Win32Condition() -{ -m_hEvent = CreateEventW( -nullptr, /* no security */ -true, /* manual reset */ -false, /* initial state not signaled */ -nullptr); /* automatic name */ -} - -// dtor -~Win32Condition() -{ -CloseHandle(m_hEvent); -} - -// wait infinite for event be signaled -// leave messages sent through -void wait() -{ -while(true) -{ -DWORD dwResult = -MsgWaitForMultipleObjects(1, _hEvent, FALSE, INFINITE, QS_SENDMESSAGE); - - switch (dwResult) -{ -case WAIT_OBJECT_0: -return; - -case WAIT_OBJECT_0 + 1: -{ -/* PeekMessage processes all messages in the SendMessage - queue that's what we want, messages from the PostMessage - queue stay untouched */ -MSG msg; -PeekMessageW(, nullptr, 0, 0, PM_NOREMOVE); - -break; -} -} -} -} - -// reset the event -void set() -{ -SetEvent(m_hEvent); -} - -private: -HANDLE m_hEvent; - -// prevent copy/assignment -private: -Win32Condition(const Win32Condition&) = delete; -Win32Condition& operator=(const Win32Condition&) = delete; -}; - -// we use one condition for every request - struct MsgCtx { -Win32Condition aCondition; HRESULT hr; }; @@ -329,12 +256,10 @@ HRESULT CMtaOleClipboard::flushClipboard( ) MsgCtx aMsgCtx; -postMessage( MSG_FLUSHCLIPBOARD, +sendMessage( MSG_FLUSHCLIPBOARD, static_cast< WPARAM >( 0 ), reinterpret_cast< LPARAM >( ) ); -aMsgCtx.aCondition.wait( /* infinite */ ); - return aMsgCtx.hr; } @@ -357,12 +282,10 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject ) MsgCtxaMsgCtx; -postMessage( MSG_GETCLIPBOARD, +sendMessage( MSG_GETCLIPBOARD, reinterpret_cast< WPARAM >( ), reinterpret_cast< LPARAM >( ) ); -aMsgCtx.aCondition.wait( /* infinite */ ); - HRESULT hr = aMsgCtx.hr; if ( SUCCEEDED( hr ) ) @@ -422,13 +345,7 @@ bool CMtaOleClipboard::registerClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncClipV OSL_ENSURE( GetCurrentThreadId( ) != m_uOleThreadId, "registerClipViewer from within the OleThread called" ); -MsgCtx aMsgCtx; - -postMessage(
[Libreoffice-commits] core.git: dtrans/source sd/source sot/source svx/source
dtrans/source/win32/ftransl/ftransl.cxx |2 - sd/source/ui/view/sdview2.cxx | 20 +++--- sd/source/ui/view/sdview3.cxx | 35 sot/source/base/exchange.cxx|2 - svx/source/tbxctrls/colrctrl.cxx| 32 + 5 files changed, 52 insertions(+), 39 deletions(-) New commits: commit 0a6813ad5d57d0df72562c797a8b0581bfd65a11 Author: Michael Stahl AuthorDate: Sat Oct 27 23:39:27 2018 +0200 Commit: Michael Stahl CommitDate: Sun Oct 28 08:56:08 2018 +0100 tdf#119235 svx,sd: fix drag from ColorBar This was using the SfxPoolItem serialisation of XATTR_FILL* items, where only XFillColorItem and XFillStyleItem were actually used; the binary serialisation was removed without being aware of this feature. Fix this by using uno::Any instead, rather than reviving the binary serialisation. Also change the clipboard format strings, just to be safe. (regression from 97b889b8b2b2554ce33fd6b3f0359fc18f39832d) Change-Id: I1828621a9aae606a1ca47835eef608062efe64a0 Reviewed-on: https://gerrit.libreoffice.org/62455 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 2223d3af6db5..c498472442e0 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -136,7 +136,7 @@ static const std::vector< FormatEntry > g_TranslTable { // SotClipboardFormatId::SVIM FormatEntry("application/x-openoffice-svim;windows_formatname=\"SVIM (StarView ImageMap)\"", "SVIM (StarView ImageMap)", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::XFA -FormatEntry("application/x-openoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr)\"", "XFA (XOutDev FillAttr)", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), +FormatEntry("application/x-libreoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr Any)\"", "XFA (XOutDev FillAttr Any)", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT FormatEntry("application/vnd.oasis.opendocument.text-flat-xml", "EditEngine ODF", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::INTERNALLINK_STATE diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index c2f2abbc5c6f..a6ffc051d5d9 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include #include @@ -666,14 +667,19 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, { if(pIAOHandle->getOverlayObjectList().isHitPixel(rEvt.maPosPixel)) { -::tools::SvRef xStm; - -if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) && xStm.is() ) +uno::Any const data(aDataHelper.GetAny(SotClipboardFormatId::XFA, "")); +uno::Sequence props; +if (data >>= props) { -XFillExchangeData aFillData( XFillAttrSetItem( () ) ); - -ReadXFillExchangeData( *xStm, aFillData ); -const Color aColor( aFillData.GetXFillAttrSetItem()->GetItemSet().Get( XATTR_FILLCOLOR ).GetColorValue() ); +::comphelper::SequenceAsHashMap const map(props); +Color aColor(COL_BLACK); +auto const it = map.find("FillColor"); +if (it != map.end()) +{ +XFillColorItem color; +color.PutValue(it->second, 0); +aColor = color.GetColorValue(); +} static_cast< SdrHdlColor* >( pIAOHandle )->SetColor( aColor, true ); nRet = nDropAction; } diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index e15e67a860de..127671347b3d 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -72,6 +72,7 @@ #include #include #include +#include #include #include #include @@ -1330,14 +1331,10 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, if(!bReturn && pPickObj && CHECK_FORMAT_TRANS( SotClipboardFormatId::XFA ) ) { -::tools::SvRef xStm; - -if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) ) +uno::Any const data(aDataHelper.GetAny(SotClipboardFormatId::XFA, "")); +
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/cnttype/mcnttype.cxx |6 -- dtrans/source/cnttype/mcnttype.hxx |1 - 2 files changed, 7 deletions(-) New commits: commit a0ed677fbc17ac9daea42d6264982c62a4a2f338 Author: Stephan Bergmann AuthorDate: Thu Oct 11 23:13:14 2018 +0200 Commit: Stephan Bergmann CommitDate: Fri Oct 12 09:02:18 2018 +0200 Remove unnecessary mutex CMimeContentType::m_ParameterMap isn't modified after construction Change-Id: Ib3dbfbd4212ed0d7e8a9f29c655f935d3fc4f1bf Reviewed-on: https://gerrit.libreoffice.org/61698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/dtrans/source/cnttype/mcnttype.cxx b/dtrans/source/cnttype/mcnttype.cxx index 483806163bea..4ba1a295fd8a 100644 --- a/dtrans/source/cnttype/mcnttype.cxx +++ b/dtrans/source/cnttype/mcnttype.cxx @@ -28,7 +28,6 @@ using namespace com::sun::star::uno; using namespace com::sun::star::container; using namespace std; -using namespace osl; CMimeContentType::CMimeContentType( const OUString& aCntType ) { @@ -52,8 +51,6 @@ OUString SAL_CALL CMimeContentType::getFullMediaType( ) Sequence< OUString > SAL_CALL CMimeContentType::getParameters( ) { -MutexGuard aGuard( m_aMutex ); - Sequence< OUString > seqParams; map< OUString, OUString >::iterator iter; @@ -70,7 +67,6 @@ Sequence< OUString > SAL_CALL CMimeContentType::getParameters( ) sal_Bool SAL_CALL CMimeContentType::hasParameter( const OUString& aName ) { -MutexGuard aGuard( m_aMutex ); return ( m_ParameterMap.end( ) != m_ParameterMap.find( aName.toAsciiLowerCase() ) ); } @@ -78,8 +74,6 @@ OUString SAL_CALL CMimeContentType::getParameterValue( const OUString& aName ) { auto const lower = aName.toAsciiLowerCase(); -MutexGuard aGuard( m_aMutex ); - if ( !hasParameter( lower ) ) throw NoSuchElementException( ); diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx index 07ff21a944d8..6b2dd4c8e925 100644 --- a/dtrans/source/cnttype/mcnttype.hxx +++ b/dtrans/source/cnttype/mcnttype.hxx @@ -51,7 +51,6 @@ private: void init( const OUString& aCntType ); private: -::osl::Mutex m_aMutex; OUStringm_MediaType; OUStringm_MediaSubtype; std::map< OUString, OUString > m_ParameterMap; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/cnttype/mcnttype.hxx | 12 1 file changed, 12 deletions(-) New commits: commit 2a20bdbb21ee01b0b21246c3d6f87d535c467e9f Author: Stephan Bergmann AuthorDate: Thu Oct 11 23:11:07 2018 +0200 Commit: Stephan Bergmann CommitDate: Fri Oct 12 09:02:00 2018 +0200 Remove undefined member function declarations ...that had accidentally not been removed along with the definitions in b75e3ded1f73c943fb09f117e476e367ac0c3413 "tdf#120158: Base CMimeContentType on INetMIME::scanContentType" Change-Id: If94c0c413b891480c12a098c7b15caa1422213b0 Reviewed-on: https://gerrit.libreoffice.org/61697 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx index 68c4bff5a258..07ff21a944d8 100644 --- a/dtrans/source/cnttype/mcnttype.hxx +++ b/dtrans/source/cnttype/mcnttype.hxx @@ -49,18 +49,6 @@ public: private: /// @throws css::lang::IllegalArgumentException void init( const OUString& aCntType ); -void getSym(); -void acceptSym( const OUString& pSymTlb ); -void skipSpaces(); -void type(); -void subtype(); -void trailer(); -OUString pName( ); -OUString pValue( ); -OUString quotedPValue( ); -OUString nonquotedPValue( ); -void comment(); -static bool isInRange( const OUString& aChr, const OUString& aRange ); private: ::osl::Mutex m_aMutex; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source embedserv/source extensions/source extensions/test odk/examples sfx2/source solenv/gbuild sw/source
dtrans/source/win32/clipb/MtaOleClipb.cxx |4 embedserv/source/inc/stdafx.h |3 --- extensions/source/activex/StdAfx2.h|3 --- extensions/test/ole/AxTestComponents/StdAfx.h |3 --- extensions/test/ole/EventListenerSample/EventListener/StdAfx.h |3 --- extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h |3 --- odk/examples/OLE/activex/StdAfx2.h |3 --- sfx2/source/appl/shutdowniconw32.cxx |4 solenv/gbuild/platform/com_MSC_defs.mk |3 +-- solenv/gbuild/platform/windows.mk |5 - sw/source/ui/vba/vbasystem.cxx |3 --- 11 files changed, 5 insertions(+), 32 deletions(-) New commits: commit c8481c8a43ce2544275b2d70ef29a8b0cb157732 Author: Jan-Marek Glogowski AuthorDate: Wed Oct 10 19:36:11 2018 +0200 Commit: Jan-Marek Glogowski CommitDate: Thu Oct 11 00:55:03 2018 +0200 Drop duplicate WINVER and _WIN32_WINNT defines Just keep the definition of _WIN32_WINNT in windows.mk, which claims it automatically derivates WINVER in some sdk header. Change-Id: I0a83e91ffdc9e0fc847433a92a45424fbfcb189c Reviewed-on: https://gerrit.libreoffice.org/61631 Reviewed-by: Mike Kaganski Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 4d7ee04bfa30..7dc5c7e38a53 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -30,10 +30,6 @@ hidden window and forward these requests via window messages. */ -#if !defined WINVER -#define WINVER 0x0400 -#endif - #include #include diff --git a/embedserv/source/inc/stdafx.h b/embedserv/source/inc/stdafx.h index e2369d3f7af9..9ec4fffcabee 100644 --- a/embedserv/source/inc/stdafx.h +++ b/embedserv/source/inc/stdafx.h @@ -3,9 +3,6 @@ #define AFX_STDAFX_H_ #define STRICT -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0502 -#endif #define _ATL_APARTMENT_THREADED // #define _ATL_STATIC_REGISTRY diff --git a/extensions/source/activex/StdAfx2.h b/extensions/source/activex/StdAfx2.h index 0c48a5e5fb5a..4d8deddf604d 100644 --- a/extensions/source/activex/StdAfx2.h +++ b/extensions/source/activex/StdAfx2.h @@ -25,9 +25,6 @@ #define INCLUDED_EXTENSIONS_SOURCE_ACTIVEX_STDAFX2_H #define STRICT -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0502 -#endif #define _ATL_APARTMENT_THREADED #define _ATL_STATIC_REGISTRY diff --git a/extensions/test/ole/AxTestComponents/StdAfx.h b/extensions/test/ole/AxTestComponents/StdAfx.h index da6810aea051..211943ce4709 100644 --- a/extensions/test/ole/AxTestComponents/StdAfx.h +++ b/extensions/test/ole/AxTestComponents/StdAfx.h @@ -28,9 +28,6 @@ #endif #define STRICT -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0502 -#endif #define _ATL_APARTMENT_THREADED #include diff --git a/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h b/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h index 08ee6950931f..c901a6dbe0d9 100644 --- a/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h +++ b/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h @@ -28,9 +28,6 @@ #endif #define STRICT -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0502 -#endif #define _ATL_APARTMENT_THREADED #include diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h index d7262d1ec595..678114bae490 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h @@ -28,9 +28,6 @@ #endif #define STRICT -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0502 -#endif #define _ATL_APARTMENT_THREADED #include diff --git a/odk/examples/OLE/activex/StdAfx2.h b/odk/examples/OLE/activex/StdAfx2.h index df14ccf949a0..1d6c6ddfd074 100644 --- a/odk/examples/OLE/activex/StdAfx2.h +++ b/odk/examples/OLE/activex/StdAfx2.h @@ -41,9 +41,6 @@ #define INCLUDED_EXAMPLES_ACTIVEX_STDAFX2_H #define STRICT -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0502 -#endif #define _ATL_APARTMENT_THREADED #define _ATL_STATIC_REGISTRY diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 6575d098f1d2..b48b1e5e6875 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -16,10 +16,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if !defined WINVER -#define WINVER 0x0400 -#endif - #include #include diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index 252690c8c0a8..e6afe0b5ad2a 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DOTransferable.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9eb489da4682a89ab96b0d6a8ba13418aac4ca9d Author: Mike Kaganski AuthorDate: Wed Oct 10 16:37:15 2018 +0200 Commit: Mike Kaganski CommitDate: Wed Oct 10 20:13:56 2018 +0200 Properly check HRESULT Although the IEnumFORMATETC::Next documentation only mentions S_OK and S_FALSE, there are error codes that also may be returned: e.g., 0x800706BA RPC server unavailable (encountered locally in a unit test). In that case, this used to loop infinitely. We are only interested in S_OK result, so check for it. Change-Id: I062e409e84efb68353321f7c48d922ec83191f73 Reviewed-on: https://gerrit.libreoffice.org/61621 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index 2b3f5ff2e890..db70196e18a3 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -281,7 +281,7 @@ void CDOTransferable::initFlavorList( ) pEnumFormatEtc->Reset( ); FORMATETC fetc; -while ( S_FALSE != pEnumFormatEtc->Next( 1, , nullptr ) ) +while ( S_OK == pEnumFormatEtc->Next( 1, , nullptr ) ) { // we use locales only to determine the // charset if there is text on the cliboard ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source onlineupdate/source vcl/opengl vcl/win
dtrans/source/win32/misc/ImplHelper.cxx|2 - onlineupdate/source/update/updater/updater.cxx | 32 - vcl/opengl/win/WinDeviceInfo.cxx |2 - vcl/win/app/salinst.cxx|2 - vcl/win/window/salframe.cxx|4 +-- 5 files changed, 21 insertions(+), 21 deletions(-) New commits: commit b18747fcee1ba8744e5cd63791dc9f3eb6848a56 Author: Jan-Marek Glogowski AuthorDate: Fri Sep 7 16:09:50 2018 +0200 Commit: Mike Kaganski CommitDate: Fri Sep 7 22:04:50 2018 +0200 Fix some std::unique_ptr array allocs Found by reviewing the output of and the code around git grep -n "unique_ptr.*new.*\[.*\]" | grep -v "\[\]" The onlineupdater code needs a little bit more attention. Change-Id: I8b70c7da7db60af52bfac12314a21602ede8bfc0 Reviewed-on: https://gerrit.libreoffice.org/60162 Tested-by: Jenkins Reviewed-by: Mike Kaganski diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx index 4b98b4850006..f933701ce961 100644 --- a/dtrans/source/win32/misc/ImplHelper.cxx +++ b/dtrans/source/win32/misc/ImplHelper.cxx @@ -95,7 +95,7 @@ OUString getWinCPFromLocaleId( LCID lcid, LCTYPE lctype ) if ( nResult ) { -std::unique_ptr buff( new wchar_t[nResult] ); +std::unique_ptr buff( new wchar_t[nResult] ); // Now get the actual data nResult = GetLocaleInfoW( lcid, lctype, buff.get(), nResult ); diff --git a/onlineupdate/source/update/updater/updater.cxx b/onlineupdate/source/update/updater/updater.cxx index 1782804eff15..a05fd075bd3a 100644 --- a/onlineupdate/source/update/updater/updater.cxx +++ b/onlineupdate/source/update/updater/updater.cxx @@ -1119,8 +1119,8 @@ public: void Finish(int status); private: -std::unique_ptr mFile; -std::unique_ptr mRelPath; +std::unique_ptr mFile; +std::unique_ptr mRelPath; int mSkip; }; @@ -1247,8 +1247,8 @@ public: virtual void Finish(int status); private: -std::unique_ptr mDir; -std::unique_ptr mRelPath; +std::unique_ptr mDir; +std::unique_ptr mRelPath; int mSkip; }; @@ -1260,6 +1260,7 @@ RemoveDir::Parse(NS_tchar *line) NS_tchar* validPath = get_valid_path(, true); if (!validPath) return PARSE_ERROR; + mRelPath.reset(new NS_tchar[MAXPATHLEN]); NS_tstrcpy(mRelPath.get(), validPath); @@ -1371,8 +1372,8 @@ public: virtual void Finish(int status); private: -std::unique_ptr mFile; -std::unique_ptr mRelPath; +std::unique_ptr mFile; +std::unique_ptr mRelPath; bool mAdded; ArchiveReader& mArchiveReader; }; @@ -1387,7 +1388,6 @@ AddFile::Parse(NS_tchar *line) return PARSE_ERROR; mRelPath.reset(new NS_tchar[MAXPATHLEN]); - NS_tstrcpy(mRelPath.get(), validPath); mFile.reset(get_full_path(validPath)); @@ -1799,7 +1799,7 @@ public: virtual void Finish(int status); protected: -std::unique_ptr mTestFile; +std::unique_ptr mTestFile; }; AddIfFile::AddIfFile(ArchiveReader& archiveReader): @@ -1866,7 +1866,7 @@ public: virtual void Finish(int status); protected: -std::unique_ptr mTestFile; +std::unique_ptr mTestFile; }; AddIfNotFile::AddIfNotFile(ArchiveReader& archiveReader): @@ -1933,7 +1933,7 @@ public: virtual void Finish(int status); private: -std::unique_ptr mTestFile; +std::unique_ptr mTestFile; }; PatchIfFile::PatchIfFile(ArchiveReader& archiveReader): @@ -2323,7 +2323,7 @@ CopyInstallDirToDestDir() #endif copy_recursive_skiplist skiplist; -std::unique_ptr pUserProfile(new NS_tchar[MAXPATHLEN]); +std::unique_ptr pUserProfile(new NS_tchar[MAXPATHLEN]); NS_tstrcpy(pUserProfile.get(), gPatchDirPath); NS_tchar *slash = (NS_tchar *) NS_tstrrchr(pUserProfile.get(), NS_T('/')); if (slash) @@ -4036,7 +4036,7 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list) NS_tsnprintf(searchspec, sizeof(searchspec)/sizeof(searchspec[0]), NS_T("%s*"), dirpath); -std::unique_ptr pszSpec(get_full_path(searchspec)); +std::unique_ptr pszSpec(get_full_path(searchspec)); hFindFile = FindFirstFileW(pszSpec.get(), ); if (hFindFile != INVALID_HANDLE_VALUE) @@ -4116,7 +4116,7 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list) char chars[MAXNAMLEN]; } ent_buf; struct dirent* ent; -std::unique_ptr searchpath(get_full_path(dirpath)); +std::unique_ptr searchpath(get_full_path(dirpath)); DIR* dir = opendir(searchpath.get()); if (!dir) @@ -4206,7 +4206,7 @@ int add_dir_entries(const NS_tchar *dirpath, ActionList *list) int rv = OK; FTS *ftsdir; FTSENT *ftsdirEntry; -std::unique_ptr searchpath(get_full_path(dirpath)); +std::unique_ptr searchpath(get_full_path(dirpath)); // Remove the trailing slash so the paths don't
[Libreoffice-commits] core.git: dtrans/source sc/source xmloff/dtd
dtrans/source/win32/dtobj/XTDataObject.hxx |2 +- dtrans/source/win32/workbench/XTDo.hxx |2 +- sc/source/filter/inc/xehelper.hxx |2 +- sc/source/filter/inc/xihelper.hxx |2 +- sc/source/filter/lotus/lotform.cxx |4 ++-- xmloff/dtd/office.mod |2 +- xmloff/dtd/text.mod|2 +- 7 files changed, 8 insertions(+), 8 deletions(-) New commits: commit b00d6854f88bb9f071095c89bf2c6d4ded6b4ec6 Author: Andrea GelminiDate: Wed Apr 25 09:08:06 2018 +0200 Fix typos Change-Id: I32c0966f8489d58f02b32bf205aedbb8303a217d Reviewed-on: https://gerrit.libreoffice.org/53432 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx index 3a6a0d49c5c3..d9979e7cfebb 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.hxx +++ b/dtrans/source/win32/dtobj/XTDataObject.hxx @@ -44,7 +44,7 @@ - This class inherits from IDataObject an so can be placed on the OleClipboard. The class wraps a transferable object which is the original DataSource -- DataFlavors offerd by this transferable will be translated into +- DataFlavors offered by this transferable will be translated into appropriate clipboard formats - if the transferable contains text data always text and unicodetext will be offered or vice versa diff --git a/dtrans/source/win32/workbench/XTDo.hxx b/dtrans/source/win32/workbench/XTDo.hxx index a6c9c763c6db..5b35699038bc 100644 --- a/dtrans/source/win32/workbench/XTDo.hxx +++ b/dtrans/source/win32/workbench/XTDo.hxx @@ -44,7 +44,7 @@ class EnumFormatEtc; - This class inherits from IDataObject an so can be placed on the OleClipboard. The class wraps a transferable object which is the original DataSource -- DataFlavors offerd by this transferable will be translated into +- DataFlavors offered by this transferable will be translated into appropriate clipboard formats - if the transferable contains text data always text and unicodetext will be offered or vice versa diff --git a/sc/source/filter/inc/xehelper.hxx b/sc/source/filter/inc/xehelper.hxx index 22ae75852343..c90c6fa18c76 100644 --- a/sc/source/filter/inc/xehelper.hxx +++ b/sc/source/filter/inc/xehelper.hxx @@ -331,7 +331,7 @@ class EditEngine; /** Converts edit engine text objects to an Excel header/footer string. @descr Header/footer content is divided into three parts: Left, center and right portion. All formatting information will be encoded in the Excel string -using special character seuences. A control sequence starts with the ampersand +using special character sequences. A control sequence starts with the ampersand character. Supported control sequences: diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx index a4e8c2527103..8f64e2fd606c 100644 --- a/sc/source/filter/inc/xihelper.hxx +++ b/sc/source/filter/inc/xihelper.hxx @@ -136,7 +136,7 @@ struct XclFontData; /** Converts an Excel header/footer string into three edit engine text objects. @descr Header/footer content is divided into three parts: Left, center and right portion. All formatting information is encoded in the Excel string -using special character seuences. A control sequence starts with the ampersand +using special character sequences. A control sequence starts with the ampersand character. Supported control sequences: diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index a80cc13c4693..4000b3c1a4ea 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -287,7 +287,7 @@ void LotusToSc::LotusRelToScRel( sal_uInt16 nCol, sal_uInt16 nRow, ScSingleRefDa nRow &= 0x1FFF; break; default: -SAL_WARN( "sc.filter", "*LotusToSc::LotusRelToScRel(): unhandeled case?" ); +SAL_WARN( "sc.filter", "*LotusToSc::LotusRelToScRel(): unhandled case?" ); } } else @@ -307,7 +307,7 @@ void LotusToSc::LotusRelToScRel( sal_uInt16 nCol, sal_uInt16 nRow, ScSingleRefDa nRow &= 0x3FFF; break; default: -SAL_WARN( "sc.filter", "*LotusToSc::LotusRelToScRel(): unhandeled case?" ); +SAL_WARN( "sc.filter", "*LotusToSc::LotusRelToScRel(): unhandled case?" ); } } diff --git a/xmloff/dtd/office.mod b/xmloff/dtd/office.mod index a0ec56c50f34..e3f332e29e52 100644 --- a/xmloff/dtd/office.mod +++ b/xmloff/dtd/office.mod @@ -182,7 +182,7 @@ text:bibliography-configuration and text:linenumbering-configuration may appear only once! - Unfortunatetly,
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/MtaOleClipb.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 016faa7fa1540b23c3e22c318cdc462a8e75 Author: Stephan BergmannDate: Sun Dec 10 23:10:13 2017 +0100 loplugin:redundantcast (clang-cl) Change-Id: I6d45c262bfa79f00f21e71df25a324263bef0971 Reviewed-on: https://gerrit.libreoffice.org/46198 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/dtrans/source/win32/clipb/MtaOleClipb.cxx b/dtrans/source/win32/clipb/MtaOleClipb.cxx index 91585935c5b9..145ae4e739c0 100644 --- a/dtrans/source/win32/clipb/MtaOleClipb.cxx +++ b/dtrans/source/win32/clipb/MtaOleClipb.cxx @@ -679,7 +679,7 @@ void CMtaOleClipboard::createMtaOleReqWnd( ) wcex.cbSize = sizeof(wcex); wcex.style = 0; -wcex.lpfnWndProc= static_cast< WNDPROC >( CMtaOleClipboard::mtaOleReqWndProc ); +wcex.lpfnWndProc= CMtaOleClipboard::mtaOleReqWndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; wcex.hInstance = hInst; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/XTDataObject.cxx | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) New commits: commit 0a478850dc29a61f36c04093f95027ac9260f0fa Author: Stephan BergmannDate: Sat Sep 30 22:42:43 2017 +0200 loplugin:flatten (clang-cl, dtrans) Change-Id: I773640d233d5a80cb31dad5a8acff4e04afeedbd Reviewed-on: https://gerrit.libreoffice.org/42976 Tested-by: Jenkins Reviewed-by: Stephan Bergmann diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index f9e681a4b399..3599f5589b52 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -299,18 +299,15 @@ STDMETHODIMP CXTDataObject::GetData( LPFORMATETC pFormatetc, LPSTGMEDIUM pmedium void SAL_CALL CXTDataObject::renderLocaleAndSetupStgMedium( FORMATETC const & fetc, STGMEDIUM& stgmedium ) { -if ( m_FormatRegistrar.hasSynthesizedLocale( ) ) -{ -LCID lcid = CFormatRegistrar::getSynthesizedLocale( ); -renderDataAndSetupStgMedium( -reinterpret_cast< sal_Int8* >( ), -fetc, -0, -sizeof( LCID ), -stgmedium ); -} -else +if ( !m_FormatRegistrar.hasSynthesizedLocale( ) ) throw CInvalidFormatEtcException( DV_E_FORMATETC ); +LCID lcid = CFormatRegistrar::getSynthesizedLocale( ); +renderDataAndSetupStgMedium( +reinterpret_cast< sal_Int8* >( ), +fetc, +0, +sizeof( LCID ), +stgmedium ); } void SAL_CALL CXTDataObject::renderUnicodeAndSetupStgMedium( ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DOTransferable.cxx | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) New commits: commit 079eee6fdb3883029cf3bf4ca861ed2a7c06058d Author: Stephan BergmannDate: Wed Sep 27 08:46:07 2017 +0200 loplugin:unnecessarycatchthrow (clang-cl) Change-Id: Ie564d16cbd23929cea0e54d38a451b4bfa4fbe84 diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index 4303c69b3fb7..311e3a2320b9 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -230,14 +230,8 @@ Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor& aFlavor ) // check CF_DIB availability as an alternative fetc.setClipformat(CF_DIB); -try -{ -clipDataStream = getClipboardData( fetc ); -} -catch( UnsupportedFlavorException& ) -{ -throw; // pass through, tried all possibilities -} +clipDataStream = getClipboardData( fetc ); +// pass UnsupportedFlavorException out, tried all possibilities } else throw; // pass through exception ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DOTransferable.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7901d47cbb6feb31b9d8fd8a3c877fe2c97f62a5 Author: Stephan BergmannDate: Thu Sep 14 08:36:20 2017 +0200 loplugin:unnecessaryparen (clang-cl) Change-Id: Icd5e625f7c67c45ea3038455514e44c1c9449661 diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index ceca4996a7db..4303c69b3fb7 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -364,7 +364,7 @@ LCID SAL_CALL CDOTransferable::getLocaleFromClipboard( ) { CFormatEtc fetc = CDataFormatTranslator::getFormatEtcForClipformat( CF_LOCALE ); ByteSequence_t aLCIDSeq = getClipboardData( fetc ); -lcid = *(reinterpret_cast ( aLCIDSeq.getArray( ) ) ); +lcid = *reinterpret_cast ( aLCIDSeq.getArray( ) ); // because of a Win95/98 Bug; there the high word // of a locale has the same value as the ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source sal/osl
dtrans/source/win32/dtobj/DataFmtTransl.cxx |2 +- sal/osl/w32/interlck.cxx|4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 186eda28ffbcd9ed918b2cf7f3d7bd294575 Author: Stephan BergmannDate: Tue Aug 22 08:38:48 2017 +0200 loplugin:unnecessaryparen (clang-cl) Change-Id: I61b006051e708636f0bba83b16de36f4571b8da7 diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index a498e9d4471e..c35cc42f43a6 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -231,7 +231,7 @@ bool SAL_CALL CDataFormatTranslator::isHTMLFormat( CLIPFORMAT cf ) bool SAL_CALL CDataFormatTranslator::isTextHtmlFormat( CLIPFORMAT cf ) { OUString clipFormatName = getClipboardFormatName( cf ); -return ( clipFormatName.equalsIgnoreAsciiCase( HTML_FORMAT_NAME_SOFFICE ) ); +return clipFormatName.equalsIgnoreAsciiCase( HTML_FORMAT_NAME_SOFFICE ); } OUString SAL_CALL CDataFormatTranslator::getTextCharsetFromLCID( LCID lcid, CLIPFORMAT aClipformat ) diff --git a/sal/osl/w32/interlck.cxx b/sal/osl/w32/interlck.cxx index 3866062d75c2..b9ecf6d78eef 100644 --- a/sal/osl/w32/interlck.cxx +++ b/sal/osl/w32/interlck.cxx @@ -23,12 +23,12 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount) { -return (InterlockedIncrement(pCount)); +return InterlockedIncrement(pCount); } oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* pCount) { -return (InterlockedDecrement(pCount)); +return InterlockedDecrement(pCount); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/ftransl/ftransl.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit c0998d9481cd57560a4d549d760f0be9da510306 Author: Varun DhallDate: Sun Jul 23 22:31:49 2017 +0530 EditEngine: Removing BIN format for Windows Change-Id: I2caf2323220c076374e89294c26e4976bf1ddbea Reviewed-on: https://gerrit.libreoffice.org/40332 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 40df081759a5..64962aecf05a 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -145,8 +145,6 @@ static const std::vector< FormatEntry > g_TranslTable { FormatEntry("application/x-openoffice-svim;windows_formatname=\"SVIM (StarView ImageMap)\"", "SVIM (StarView ImageMap)", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::XFA FormatEntry("application/x-openoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr)\"", "XFA (XOutDev FillAttr)", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), -// SotClipboardFormatId::EDITENGINE - FormatEntry("application/x-openoffice-editengine;windows_formatname=\"EditEngineFormat\"", "EditEngineFormat", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT FormatEntry("application/vnd.oasis.opendocument.text-flat-xml", "EditEngine ODF", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::INTERNALLINK_STATE ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/FmtFilter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7d82067d38663bc0a8ee1a12087a763bcb73d744 Author: Stephan BergmannDate: Mon Jul 17 17:19:31 2017 +0200 loplugin:unnecessaryparen: dtrans (clang-cl) Change-Id: Ie366a48242d04a888e34ae2c95230ef4de05fbbb diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 0a2f2446cd1e..711dd8a68364 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -283,7 +283,7 @@ Sequence SAL_CALL TextHtmlToHTMLFormat(Sequence& aTextHtml) std::wstring getFileExtension(const std::wstring& aFilename) { std::wstring::size_type idx = aFilename.rfind(L"."); -if ((idx != std::wstring::npos)) +if (idx != std::wstring::npos) { return std::wstring(aFilename, idx); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/ftransl/ftransl.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 3278cbf7dcf0c72c125fb4ba14e2b24faf267d9c Author: Varun DhallDate: Tue Jun 13 01:36:06 2017 +0530 EditEngine: Added EditEngine ODF format for Windows Change-Id: I6750295708f2e7a9d73f85df4abbeeb8e5e60a07 Reviewed-on: https://gerrit.libreoffice.org/38716 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 6cb028e95888..40df081759a5 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -147,6 +147,8 @@ static const std::vector< FormatEntry > g_TranslTable { FormatEntry("application/x-openoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr)\"", "XFA (XOutDev FillAttr)", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::EDITENGINE FormatEntry("application/x-openoffice-editengine;windows_formatname=\"EditEngineFormat\"", "EditEngineFormat", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), +// SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT +FormatEntry("application/vnd.oasis.opendocument.text-flat-xml", "EditEngine ODF", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::INTERNALLINK_STATE FormatEntry("application/x-openoffice-internallink-state;windows_formatname=\"StatusInfo of SvxInternalLink\"", "StatusInfo of SvxInternalLink", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::SOLK ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source include/filter offapi/com offapi/type_reference sd/source
dtrans/source/win32/clipb/WinClipbImpl.cxx |4 +--- include/filter/msfilter/escherex.hxx |2 +- offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl |3 +-- offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl |2 +- offapi/type_reference/offapi.idl |3 +-- sd/source/filter/eppt/eppt.cxx |2 +- 6 files changed, 6 insertions(+), 10 deletions(-) New commits: commit 32260c40b265b97358fc426fb9f849c243dc7dd4 Author: Stephan BergmannDate: Mon May 29 15:38:06 2017 +0200 Revert "[API-CHANGE] Add persistent (in addition to persistant)" This reverts commit 795d56dfd55a78a240cef79c822ba958c4f18006. The Gerrit UI had fooled me into pushing the "Submit" button in error. diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index f10050b20817..548a7ff4c5aa 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx @@ -138,9 +138,7 @@ OUString SAL_CALL CWinClipbImpl::getName( ) sal_Int8 SAL_CALL CWinClipbImpl::getRenderingCapabilities( ) { -// Errant spelling "Persistant" deprecated in version 5.4 -// see offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl -return ( Delayed | Persistant | Persistent ); +return ( Delayed | Persistant ); } void SAL_CALL CWinClipbImpl::flushClipboard( ) diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index f25a961b7bc3..4486ceb34e58 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -1090,7 +1090,7 @@ public: */ voidInsertAtCurrentPos( sal_uInt32 nBytes ); -voidInsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); // It is not being checked if this key is already in the PersistentTable +voidInsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); // It is not being checked if this key is already in the PersistantTable voidReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); sal_uInt32 GetPersistOffset( sal_uInt32 nKey ); boolSeekToPersistOffset( sal_uInt32 nKey ); diff --git a/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl b/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl index f46bd2ff5d31..6b0cdc96c230 100644 --- a/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl +++ b/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl @@ -37,8 +37,7 @@ published constants RenderingCapabilities /** The implementation is able to store the data persistent in the system so that it does not get lost when the source application no longer exist. */ -/** @deprecated */ const byte Persistant = 2; -const byte Persistent = 2; +const byte Persistant = 2; }; diff --git a/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl b/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl index 32f8bf39db4e..1cb96db1ece8 100644 --- a/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl +++ b/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl @@ -46,7 +46,7 @@ published interface XSystemClipboard /** Provides the ability to render the complete clipboard content. This interface is only available if the method com::sun::star::datatransfer::clipboard::XClipboardEx::getRenderingCapabilities() -returns Persistent +returns Persistant */ [optional] interface XFlushableClipboard; diff --git a/offapi/type_reference/offapi.idl b/offapi/type_reference/offapi.idl index 14f39fac820d..e796d59192e2 100644 --- a/offapi/type_reference/offapi.idl +++ b/offapi/type_reference/offapi.idl @@ -4312,8 +4312,7 @@ module com { }; published constants RenderingCapabilities { const byte Delayed = 1; - /** @deprecated */ const byte Persistant = 2; - const byte Persistent = 2; + const byte Persistant = 2; }; published interface XFlushableClipboard { interface ::com::sun::star::uno::XInterface; diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index 33f44824691b..fc6dce12a3e5 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -1319,7 +1319,7 @@ void PPTWriter::ImplWriteOLE( ) } } -// write PersistentTable and UserEditAtom +// write PersistantTable and UserEditAtom bool PPTWriter::ImplWriteAtomEnding() { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source include/filter offapi/com offapi/type_reference sd/source
dtrans/source/win32/clipb/WinClipbImpl.cxx |4 +++- include/filter/msfilter/escherex.hxx |2 +- offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl |3 ++- offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl |2 +- offapi/type_reference/offapi.idl |3 ++- sd/source/filter/eppt/eppt.cxx |2 +- 6 files changed, 10 insertions(+), 6 deletions(-) New commits: commit 795d56dfd55a78a240cef79c822ba958c4f18006 Author: Julien NabetDate: Thu Apr 27 22:22:33 2017 +0200 [API-CHANGE] Add persistent (in addition to persistant) + keep "persistant" for compatibility reasons but put it as deprecated Change-Id: I7ef8efb9f376eadfdac876d142840aab5a0b4416 Reviewed-on: https://gerrit.libreoffice.org/37042 Tested-by: Jenkins Reviewed-by: Michael Meeks diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index 548a7ff4c5aa..f10050b20817 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx @@ -138,7 +138,9 @@ OUString SAL_CALL CWinClipbImpl::getName( ) sal_Int8 SAL_CALL CWinClipbImpl::getRenderingCapabilities( ) { -return ( Delayed | Persistant ); +// Errant spelling "Persistant" deprecated in version 5.4 +// see offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl +return ( Delayed | Persistant | Persistent ); } void SAL_CALL CWinClipbImpl::flushClipboard( ) diff --git a/include/filter/msfilter/escherex.hxx b/include/filter/msfilter/escherex.hxx index 4486ceb34e58..f25a961b7bc3 100644 --- a/include/filter/msfilter/escherex.hxx +++ b/include/filter/msfilter/escherex.hxx @@ -1090,7 +1090,7 @@ public: */ voidInsertAtCurrentPos( sal_uInt32 nBytes ); -voidInsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); // It is not being checked if this key is already in the PersistantTable +voidInsertPersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); // It is not being checked if this key is already in the PersistentTable voidReplacePersistOffset( sal_uInt32 nKey, sal_uInt32 nOffset ); sal_uInt32 GetPersistOffset( sal_uInt32 nKey ); boolSeekToPersistOffset( sal_uInt32 nKey ); diff --git a/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl b/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl index 6b0cdc96c230..f46bd2ff5d31 100644 --- a/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl +++ b/offapi/com/sun/star/datatransfer/clipboard/RenderingCapabilities.idl @@ -37,7 +37,8 @@ published constants RenderingCapabilities /** The implementation is able to store the data persistent in the system so that it does not get lost when the source application no longer exist. */ -const byte Persistant = 2; +/** @deprecated */ const byte Persistant = 2; +const byte Persistent = 2; }; diff --git a/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl b/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl index 1cb96db1ece8..32f8bf39db4e 100644 --- a/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl +++ b/offapi/com/sun/star/datatransfer/clipboard/XSystemClipboard.idl @@ -46,7 +46,7 @@ published interface XSystemClipboard /** Provides the ability to render the complete clipboard content. This interface is only available if the method com::sun::star::datatransfer::clipboard::XClipboardEx::getRenderingCapabilities() -returns Persistant +returns Persistent */ [optional] interface XFlushableClipboard; diff --git a/offapi/type_reference/offapi.idl b/offapi/type_reference/offapi.idl index e796d59192e2..14f39fac820d 100644 --- a/offapi/type_reference/offapi.idl +++ b/offapi/type_reference/offapi.idl @@ -4312,7 +4312,8 @@ module com { }; published constants RenderingCapabilities { const byte Delayed = 1; - const byte Persistant = 2; + /** @deprecated */ const byte Persistant = 2; + const byte Persistent = 2; }; published interface XFlushableClipboard { interface ::com::sun::star::uno::XInterface; diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx index fc6dce12a3e5..33f44824691b 100644 --- a/sd/source/filter/eppt/eppt.cxx +++ b/sd/source/filter/eppt/eppt.cxx @@ -1319,7 +1319,7 @@ void PPTWriter::ImplWriteOLE( ) } } -// write PersistantTable and UserEditAtom +// write PersistentTable and UserEditAtom bool PPTWriter::ImplWriteAtomEnding() { ___ Libreoffice-commits mailing list
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DOTransferable.cxx |2 +- dtrans/source/win32/dtobj/XTDataObject.hxx |2 +- dtrans/source/win32/workbench/XTDo.hxx |2 +- 3 files changed, 3 insertions(+), 3 deletions(-) New commits: commit eff5af0f73971aee76c0175240c31599ad3b223f Author: Jens CarlDate: Thu Mar 30 03:27:34 2017 + tdf#39468 Translate German comments Translate German comments in dtrans/ Change-Id: I8cdae7234e6ffd60e61c3b6b35ae5eee55924ac6 Reviewed-on: https://gerrit.libreoffice.org/35883 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index 58117c51565f..ceca4996a7db 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -272,7 +272,7 @@ sal_Bool SAL_CALL CDOTransferable::isDataFlavorSupported( const DataFlavor& aFla // the list of dataflavors currently on the clipboard will be initialized // only once; if the client of this Transferable will hold a reference -// to it und the underlying clipboard content changes, the client does +// to it and the underlying clipboard content changes, the client does // possible operate on a invalid list // if there is only text on the clipboard we will also offer unicode text // an synthesize this format on the fly if requested, to accomplish this diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx index db3496dbab24..13e34b033eb4 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.hxx +++ b/dtrans/source/win32/dtobj/XTDataObject.hxx @@ -51,7 +51,7 @@ appropriate clipboard formats - if the transferable contains text data always text and unicodetext will be offered or vice versa -- text data will be automatically converted between text und unicode text +- text data will be automatically converted between text and unicode text - although the transferable may support text in different charsets (codepages) only text in one codepage can be offered by the clipboard diff --git a/dtrans/source/win32/workbench/XTDo.hxx b/dtrans/source/win32/workbench/XTDo.hxx index 61b1499a1de1..4bfc33188473 100644 --- a/dtrans/source/win32/workbench/XTDo.hxx +++ b/dtrans/source/win32/workbench/XTDo.hxx @@ -48,7 +48,7 @@ class EnumFormatEtc; appropriate clipboard formats - if the transferable contains text data always text and unicodetext will be offered or vice versa -- text data will be automatically converted between text und unicode text +- text data will be automatically converted between text and unicode text - although the transferable may support text in different charsets (codepages) only text in one codepage can be offered by the clipboard ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DOTransferable.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 08d8fd9dd82d8c1ca2b364b96c3aed600fd1e1c4 Author: Stephan BergmannDate: Tue Mar 14 14:43:11 2017 +0100 loplugin:unoany (clang-cl) Change-Id: Ia5211e7ad27332d4d4cab546d6968e32dfb71523 diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index 5588cda..58117c5 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -114,10 +114,10 @@ Any byteStreamToAny( CDOTransferable::ByteSequence_t& aByteStream, const Type& a if ( aRequestedDataType == CPPUTYPE_OUSTRING ) { OUString str = byteStreamToOUString( aByteStream ); -aAny = makeAny( str ); +aAny <<= str; } else -aAny = makeAny( aByteStream ); +aAny <<= aByteStream; return aAny; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source embeddedobj/source embedserv/source extensions/source shell/source xmlsecurity/source
dtrans/source/generic/clipboardmanager.cxx |3 +++ dtrans/source/win32/dtobj/DOTransferable.cxx|4 dtrans/source/win32/dtobj/FetcList.cxx |1 + dtrans/source/win32/dtobj/XTDataObject.cxx |1 + dtrans/source/win32/ftransl/ftransl.cxx |2 ++ embeddedobj/source/msole/olecomponent.cxx |3 +++ embeddedobj/source/msole/xdialogcreator.cxx |1 + embedserv/source/embed/docholder.cxx|2 ++ extensions/source/ole/oleobjw.cxx |1 + extensions/source/ole/servprov.cxx |1 + extensions/source/ole/unoobjw.cxx |2 ++ extensions/source/scanner/scanwin.cxx |1 + shell/source/win32/SysShExec.cxx|3 ++- xmlsecurity/source/xmlsec/mscrypt/xmlencryption_mscryptimpl.cxx |2 ++ xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx |2 -- 15 files changed, 26 insertions(+), 3 deletions(-) New commits: commit fed3783e77e00635e50622e7229b06c9e25451f1 Author: Stephan BergmannDate: Wed Feb 8 08:40:06 2017 +0100 Add missing #includes ...like 6dce9c6757823b9e89863716ae70ff4e8ddd4e60, for Windows-only code Change-Id: I35f37aae2e6f55ff8ed82afc710a9b59a43b028c diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index 12a8b11..89ce1dc 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -18,7 +18,10 @@ */ #include +#include +#include #include +#include #include #include diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index 0feb5c1..5588cda 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -29,7 +29,11 @@ #include "MimeAttrib.hxx" #include "FmtFilter.hxx" #include "Fetc.hxx" +#include #include +#include +#include +#include #include using namespace std; diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx index a320d34..c574473 100644 --- a/dtrans/source/win32/dtobj/FetcList.cxx +++ b/dtrans/source/win32/dtobj/FetcList.cxx @@ -20,6 +20,7 @@ #include #include "FetcList.hxx" #include "Fetc.hxx" +#include #include #include diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index cc3c86d..5f3c33e 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -24,6 +24,7 @@ #include "../misc/ImplHelper.hxx" #include "DTransHelper.hxx" #include "TxtCnvtHlp.hxx" +#include #include #include "com/sun/star/awt/AsyncCallback.hpp" #include "com/sun/star/awt/XCallback.hpp" diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 8b96cdd..a5b7a9e 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -20,8 +20,10 @@ #include #include "ftransl.hxx" +#include #include #include +#include #include #include #include "../misc/ImplHelper.hxx" diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx index adff4fe..c18775b 100644 --- a/embeddedobj/source/msole/olecomponent.cxx +++ b/embeddedobj/source/msole/olecomponent.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + +#include #include #include #include diff --git a/embeddedobj/source/msole/xdialogcreator.cxx b/embeddedobj/source/msole/xdialogcreator.cxx index 07bc3d7..5d5f7b3 100644 --- a/embeddedobj/source/msole/xdialogcreator.cxx +++ b/embeddedobj/source/msole/xdialogcreator.cxx @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index f8661e1..ff30b0b 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,7 @@ #include #include #include +#include #include #include #include diff --git a/extensions/source/ole/oleobjw.cxx b/extensions/source/ole/oleobjw.cxx index 851b805..fa5bfef 100644 --- a/extensions/source/ole/oleobjw.cxx +++ b/extensions/source/ole/oleobjw.cxx @@ -26,6 +26,7 @@ #include "osl/thread.h" #include +#include #include #include #include diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx index 73bc133..30fea73 100644 --- a/extensions/source/ole/servprov.cxx +++ b/extensions/source/ole/servprov.cxx @@ -29,6 +29,7
[Libreoffice-commits] core.git: dtrans/source editeng/source forms/source include/sot include/svtools sc/source sd/source sfx2/source sot/source svtools/source sw/source
dtrans/source/win32/ftransl/ftransl.cxx |4 +++- editeng/source/editeng/eeobj.cxx |8 +--- editeng/source/editeng/impedit2.cxx | 11 ++- forms/source/richtext/clipboarddispatcher.cxx |6 -- include/sot/formats.hxx |3 ++- include/svtools/sores.hxx |4 +++- sc/source/ui/app/seltrans.cxx |1 + sc/source/ui/app/transobj.cxx | 10 +++--- sc/source/ui/docshell/impex.cxx |4 ++-- sc/source/ui/drawfunc/drtxtob.cxx |8 ++-- sc/source/ui/drawfunc/drtxtob1.cxx|1 + sc/source/ui/view/cellsh.cxx |2 ++ sc/source/ui/view/editsh.cxx |7 +-- sc/source/ui/view/gridwin.cxx |7 +-- sc/source/ui/view/viewfun3.cxx| 16 sc/source/ui/view/viewfun4.cxx|4 sd/source/ui/app/sdxfer.cxx |4 +++- sd/source/ui/func/fuinsert.cxx|1 + sd/source/ui/view/drviews7.cxx|1 + sd/source/ui/view/outlnvsh.cxx|2 ++ sd/source/ui/view/sdview3.cxx | 15 +-- sfx2/source/appl/appdde.cxx |1 + sot/source/base/exchange.cxx |1 + sot/source/base/formats.cxx |6 ++ svtools/source/dialogs/formats.src|4 svtools/source/dialogs/insdlg.cxx |3 ++- svtools/source/misc/transfer.cxx |4 sw/source/core/doc/swserv.cxx |1 + sw/source/core/docnode/section.cxx|1 + sw/source/uibase/dochdl/swdtflvr.cxx | 23 +-- sw/source/uibase/shells/annotsh.cxx |6 +- 31 files changed, 134 insertions(+), 35 deletions(-) New commits: commit 048e30c1f8231e6cd144a9251061f6fa127b353e Author: Oliver SpechtDate: Fri Dec 30 16:47:17 2016 +0100 tdf#101828 handle rtf/richtext correctly Change-Id: Id894f62a918bd6e6fa59f8d546307343bf2bd4b0 Reviewed-on: https://gerrit.libreoffice.org/32682 Tested-by: Jenkins Reviewed-by: Thorsten Behrens diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index cb62bdd..3350211 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -134,7 +134,7 @@ static const std::vector< FormatEntry > g_TranslTable { // SotClipboardFormatId::SIMPLE_FILE FormatEntry("application/x-openoffice-file;windows_formatname=\"FileName\"", "FileName", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::RTF -FormatEntry("text/richtext", "Rich Text Format", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), +FormatEntry("text/rtf", "Rich Text Format", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::DRAWING FormatEntry("application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"", "Drawing Format", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), // SotClipboardFormatId::SVXB @@ -352,6 +352,8 @@ static const std::vector< FormatEntry > g_TranslTable { FormatEntry("application/x-openoffice-dummy3;windows_formatname=\"SO_DUMMYFORMAT_3\"", "SO_DUMMYFORMAT_3", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), //SotClipboardFormatId::DUMMY4 FormatEntry("application/x-openoffice-dummy4;windows_formatname=\"SO_DUMMYFORMAT_4\"", "SO_DUMMYFORMAT_4", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), +// SotClipboardFormatId::RICHTEXT +FormatEntry("text/richtext", "Richtext Format", nullptr, CF_INVALID, CPPUTYPE_DEFAULT), }; namespace { diff --git a/editeng/source/editeng/eeobj.cxx b/editeng/source/editeng/eeobj.cxx index 7347fa3..c72354e 100644 --- a/editeng/source/editeng/eeobj.cxx +++ b/editeng/source/editeng/eeobj.cxx @@ -57,7 +57,7 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo { aAny <<= GetString(); } -else if ( ( nT == SotClipboardFormatId::EDITENGINE ) || ( nT == SotClipboardFormatId::RTF ) ) +else if ( ( nT == SotClipboardFormatId::EDITENGINE ) || ( nT == SotClipboardFormatId::RTF ) || ( nT == SotClipboardFormatId::RICHTEXT ) ) { // No RTF on demand any more: // 1) Was not working, because I had to flush() the clipboard immediately anyway @@ -84,10 +84,11 @@ uno::Any EditDataObject::getTransferData( const datatransfer::DataFlavor& rFlavo uno::Sequence< datatransfer::DataFlavor > EditDataObject::getTransferDataFlavors( ) throw(uno::RuntimeException, std::exception) { -uno::Sequence< datatransfer::DataFlavor > aDataFlavors(3); +uno::Sequence< datatransfer::DataFlavor > aDataFlavors(4); SotExchange::GetFormatDataFlavor(
[Libreoffice-commits] core.git: dtrans/source include/vcl toolkit/source
dtrans/source/win32/dtobj/XTDataObject.cxx | 33 + dtrans/source/win32/dtobj/XTDataObject.hxx |3 +- include/vcl/svapp.hxx |4 +++ toolkit/source/awt/asynccallback.cxx |3 -- 4 files changed, 40 insertions(+), 3 deletions(-) New commits: commit bdd108cd72e630189c360c5327c480c1d64d55b1 Author: Tomaž VajngerlDate: Wed Nov 23 17:01:46 2016 +0100 tdf#103852 avoid clipboard deadlock Deallocate the XTransferable object async using AsyncCallback (that uses Application::PostUserEvent) which executes the callback in a thread-safe way on the main thread. This avoids a deadlock at deallocation so that the XTransferable. Modify AsyncCallback to not hold the SolarMutexGuard because Application::PostUserEvent is considered thread-safe. Document Application::PostUserEvent thread-safety Change-Id: I4237a1cf380e8be66b3eefc393a58bb4853bf4e1 Reviewed-on: https://gerrit.libreoffice.org/31126 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index 3ca9325..1c13d34 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -25,8 +25,11 @@ #include "DTransHelper.hxx" #include "TxtCnvtHlp.hxx" #include +#include "com/sun/star/awt/AsyncCallback.hpp" +#include "com/sun/star/awt/XCallback.hpp" #include "FmtFilter.hxx" #include +#include #if defined _MSC_VER #pragma warning(push,1) @@ -82,6 +85,28 @@ void SAL_CALL setupStgMedium( const FORMATETC& fetc, OSL_ASSERT( false ); } +/** + We need to destroy XTransferable in the main thread to avoid dead lock + when locking in the clipboard thread. So we transfer the ownership of the + XTransferable reference to this object and release it when the callback + is executed in main thread. +*/ +class AsyncDereference : public cppu::WeakImplHelper +{ +Reference maTransferable; + +public: +AsyncDereference(css::uno::Reference const & rTransferable) +: maTransferable(rTransferable) +{} + +virtual void SAL_CALL notify(css::uno::Any const &) +throw (css::uno::RuntimeException, std::exception) override +{ +maTransferable.set(nullptr); +} +}; + // a helper class that will be thrown by the function validateFormatEtc class CInvalidFormatEtcException @@ -174,12 +199,20 @@ CXTDataObject::CXTDataObject( const Reference< XComponentContext >& rxContext, const Reference< XTransferable >& aXTransferable ) : m_nRefCnt( 0 ) , m_XTransferable( aXTransferable ) +, m_XComponentContext( rxContext ) , m_bFormatEtcContainerInitialized( false ) , m_DataFormatTranslator( rxContext ) , m_FormatRegistrar( rxContext, m_DataFormatTranslator ) { } +CXTDataObject::~CXTDataObject() +{ +css::awt::AsyncCallback::create(m_XComponentContext)->addCallback( +new AsyncDereference(m_XTransferable), +css::uno::Any()); +} + // IUnknown->QueryInterface STDMETHODIMP CXTDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject ) diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx index 8bf3c10..db3496d 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.hxx +++ b/dtrans/source/win32/dtobj/XTDataObject.hxx @@ -64,7 +64,7 @@ class CXTDataObject : public IDataObject public: CXTDataObject( const css::uno::Reference< css::uno::XComponentContext >& rxContext, const css::uno::Reference< css::datatransfer::XTransferable >& aXTransferable ); -virtual ~CXTDataObject() {} +virtual ~CXTDataObject(); // ole interface implementation @@ -103,6 +103,7 @@ private: private: LONG m_nRefCnt; css::uno::Reference< css::datatransfer::XTransferable > m_XTransferable; +css::uno::Reference< css::uno::XComponentContext> m_XComponentContext; CFormatEtcContainer m_FormatEtcContainer; bool m_bFormatEtcContainerInitialized; CDataFormatTranslator m_DataFormatTranslator; diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 2719224..9b930b3 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -776,9 +776,13 @@ public: User events allow for the deferreal of work to later in the main-loop - at idle. + Execution of the deferred work is thread-safe which means all the tasks are executed + serially, so no thread-safety locks between tasks are necessary. + @param rLink Link to event callback function @param pCaller Pointer to data sent to the event by the caller. Optional. @param
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/FmtFilter.cxx | 108 1 file changed, 108 deletions(-) New commits: commit de162ef3c7d447e1faf3bc8d0766fc0e34d80b49 Author: Thorsten BehrensDate: Thu Jul 14 02:38:04 2016 +0200 dtrans: remove commented-out code This was disabled since f87fd75f68148b9b5ddff7f62ce12c5ec1d7757a INTEGRATION: CWS dtransfix (1.11.136) Change-Id: Ica132a8b5ed13f5b70944c48e2ec5f6fdd88159e diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index aaa416f..ea66d37 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -222,114 +222,6 @@ Sequence< sal_Int8 > SAL_CALL OOBmpToWinDIB( Sequence< sal_Int8 >& aOOBmp ) return winDIBStream; } -// converts the openoffice text/html clipboard format to the HTML Format -// well known under MS Windows -// the MS HTML Format has a header before the real html data -// -// Version:1.0 Version number of the clipboard. Staring is 0.9 -// StartHTML: Byte count from the beginning of the clipboard to the start -// of the context, or -1 if no context -// EndHTML: Byte count from the beginning of the clipboard to the end -// of the context, or -1 if no context -// StartFragment: Byte count from the beginning of the clipboard to the -// start of the fragment -// EndFragment: Byte count from the beginning of the clipboard to the -// end of the fragment -// StartSelection: Byte count from the beginning of the clipboard to the -// start of the selection -// EndSelection:Byte count from the beginning of the clipboard to the -// end of the selection -// -// StartSelection and EndSelection are optional -// The fragment should be preceded and followed by the HTML comments -// and (no space between !-- and the -// text - -/* -Sequence< sal_Int8 > SAL_CALL TextHtmlToHTMLFormat( Sequence< sal_Int8 >& aTextHtml ) -{ -OSL_ASSERT( aTextHtml.getLength( ) > 0 ); - -// check parameter -if ( !(aTextHtml.getLength( ) > 0) ) -return Sequence< sal_Int8 >( ); - -// we create a buffer with the approximated size of -// the HTML Format header -char aHTMLFmtHdr[120]; - -memset( aHTMLFmtHdr, 0, sizeof( aHTMLFmtHdr ) ); - -// fill the buffer with dummy values to calc the -// exact length - -wsprintf( -aHTMLFmtHdr, - "Version:1.0\nStartHTML:%010d\r\nnEndHTML:%010d\r\nStartFragment:%010\r\nnEndFragment:%010d\r\n", 0, 0, 0, 0 ); - -sal_uInt32 lHTMLFmtHdr = rtl_str_getLength( aHTMLFmtHdr ); - -// the office always writes the start -// and end html tag in upper cases and -// without spaces -// both tags don't allow parameters -OString startHtmlTag( "" ); -OString endHtmlTag( "" ); - -// we don't include '>' into the search -// because the body tag allows parameters -// e.g. -OString startBodyTag( "= 0) && (nEndHtml > nStartHtml) && (nStartFrgmt > nStartHtml) && (nEndFrgmt > nStartFrgmt) ); - -Sequence< sal_Int8 > aHTMLFmtSequence; - -if ( (nStartHtml > -1) && (nEndHtml > -1) && (nStartFrgmt > -1) && (nEndFrgmt > -1) ) -{ -nStartHtml = nStartHtml + lHTMLFmtHdr - 1; // we start one before Word 2000 does also so -nEndHtml= nEndHtml+ lHTMLFmtHdr + endHtmlTag.getLength( ) + 1; // our SOffice 5.2 wants 2 behind ? -nStartFrgmt = nStartFrgmt + startBodyTag.getLength( ) + lHTMLFmtHdr; // after the tag -nEndFrgmt = nEndFrgmt + lHTMLFmtHdr; - -// fill the html header -memset( aHTMLFmtHdr, 0, sizeof( aHTMLFmtHdr ) ); - -wsprintf( -aHTMLFmtHdr, - "Version:1.0\nStartHTML:%010d\r\nEndHTML:%010d\r\nStartFragment:%010d\r\nEndFragment:%010d\r\n", -nStartHtml, nEndHtml, nStartFrgmt, nEndFrgmt ); - -// we add space for a trailing \0 -aHTMLFmtSequence.realloc( lHTMLFmtHdr + aTextHtml.getLength( ) + 1 ); -memset( aHTMLFmtSequence.getArray( ), 0, aHTMLFmtSequence.getLength( ) ); - -// copy the HTML Format header -memcpy( -static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) ), -static_cast< LPVOID >( aHTMLFmtHdr ), lHTMLFmtHdr ); - -// concat the text/html -memcpy( -static_cast< LPVOID >( aHTMLFmtSequence.getArray( ) + lHTMLFmtHdr ), -static_cast< LPVOID >( aTextHtml.getArray( ) ), -
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dnd/source.hxx|6 ++ dtrans/source/win32/dnd/sourcecontext.hxx |6 ++ dtrans/source/win32/dnd/target.hxx|7 ++- dtrans/source/win32/dnd/targetdragcontext.hxx |5 ++--- dtrans/source/win32/dnd/targetdropcontext.hxx |5 ++--- 5 files changed, 10 insertions(+), 19 deletions(-) New commits: commit d5397bf17d1b2d268c1d5905079b69619ea0467a Author: Jochen NitschkeDate: Tue May 24 17:27:38 2016 +0200 C++11: disable ctors/operators with delete (dtrans) replace the old declare and don't implement pattern with C++11 delete keyword. remove obsolete default ctor declarations. Change-Id: I90cce42445e3b0558dc9b6e0f9cd2a27359e5d9e Reviewed-on: https://gerrit.libreoffice.org/25411 Tested-by: Jochen Nitschke Reviewed-by: Michael Stahl diff --git a/dtrans/source/win32/dnd/source.hxx b/dtrans/source/win32/dnd/source.hxx index 0f73d6c..61f21eb 100644 --- a/dtrans/source/win32/dnd/source.hxx +++ b/dtrans/source/win32/dnd/source.hxx @@ -57,10 +57,6 @@ class DragSource: // The mouse button that set off the drag and drop operation short m_MouseButton; -DragSource(); -DragSource(const DragSource&); -DragSource = ( const DragSource&); - // First starting a new drag and drop thread if // the last one has finished void StartDragImpl( @@ -89,6 +85,8 @@ public: public: explicit DragSource(const Reference& rxContext); virtual ~DragSource(); +DragSource(const DragSource&) = delete; +DragSource = ( const DragSource&) = delete; // XInitialization virtual void SAL_CALL initialize( const Sequence< Any >& aArguments ) diff --git a/dtrans/source/win32/dnd/sourcecontext.hxx b/dtrans/source/win32/dnd/sourcecontext.hxx index 937c5d9..9f1788b 100644 --- a/dtrans/source/win32/dnd/sourcecontext.hxx +++ b/dtrans/source/win32/dnd/sourcecontext.hxx @@ -44,13 +44,11 @@ class SourceContext: public MutexDummy, // the action ( copy, move etc) sal_Int8 m_currentAction; -SourceContext(); -SourceContext( const SourceContext&); -SourceContext = (const SourceContext& ); - public: SourceContext( DragSource* pSource, const Reference& listener); ~SourceContext(); +SourceContext(const SourceContext&) = delete; +SourceContext = (const SourceContext&) = delete; virtual void SAL_CALL addDragSourceListener( const Reference& dsl ) throw( RuntimeException); diff --git a/dtrans/source/win32/dnd/target.hxx b/dtrans/source/win32/dnd/target.hxx index 4e7d3b8..47ff87c 100644 --- a/dtrans/source/win32/dnd/target.hxx +++ b/dtrans/source/win32/dnd/target.hxx @@ -106,14 +106,11 @@ private: Reference m_currentDragContext; Reference m_currentDropContext; -private: -DropTarget(); -DropTarget(DropTarget&); -DropTarget = (DropTarget&); - public: explicit DropTarget(const Reference& rxContext); virtual ~DropTarget(); +DropTarget(DropTarget&) = delete; +DropTarget = (DropTarget&) = delete; // Overrides WeakComponentImplHelper::disposing which is called by // WeakComponentImplHelper::dispose diff --git a/dtrans/source/win32/dnd/targetdragcontext.hxx b/dtrans/source/win32/dnd/targetdragcontext.hxx index ed329c0..3d061b4 100644 --- a/dtrans/source/win32/dnd/targetdragcontext.hxx +++ b/dtrans/source/win32/dnd/targetdragcontext.hxx @@ -37,12 +37,11 @@ class TargetDragContext: public WeakImplHelper // to non-interface functions of m_pDropTarget DropTarget* m_pDropTarget; -TargetDragContext(); -TargetDragContext( const TargetDragContext&); -TargetDragContext = ( const TargetDragContext&); public: explicit TargetDragContext(DropTarget* pTarget); ~TargetDragContext(); +TargetDragContext( const TargetDragContext&) = delete; +TargetDragContext = ( const TargetDragContext&) = delete; virtual void SAL_CALL acceptDrag( sal_Int8 dragOperation ) throw( RuntimeException); diff --git a/dtrans/source/win32/dnd/targetdropcontext.hxx b/dtrans/source/win32/dnd/targetdropcontext.hxx index a7ae0e6..ec2e5b2 100644 --- a/dtrans/source/win32/dnd/targetdropcontext.hxx +++ b/dtrans/source/win32/dnd/targetdropcontext.hxx @@ -36,12 +36,11 @@ class TargetDropContext: public WeakImplHelper // to non-interface functions of m_pDropTarget DropTarget* m_pDropTarget; -TargetDropContext(); -TargetDropContext( const TargetDropContext&); -TargetDropContext = ( const TargetDropContext&); public: explicit TargetDropContext(DropTarget* pTarget); ~TargetDropContext(); +TargetDropContext( const TargetDropContext&) = delete; +TargetDropContext = ( const TargetDropContext&) = delete; // XDropTargetDragContext virtual void SAL_CALL acceptDrop( sal_Int8 dropOperation ) ___ Libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source sal/osl
dtrans/source/cnttype/wbench/testcnttype.cxx |2 +- sal/osl/unx/process.cxx |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) New commits: commit 90891602fc826d11985910fc8e892706cd419539 Author: Jochen NitschkeDate: Tue May 17 09:55:13 2016 +0200 limit scanf string field width Change-Id: I9070bae914d923171b6eaf8209de00922dc87be7 Reviewed-on: https://gerrit.libreoffice.org/25052 Tested-by: Jenkins Reviewed-by: Jochen Nitschke diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx index f6482c2..b4cfb7a 100644 --- a/dtrans/source/cnttype/wbench/testcnttype.cxx +++ b/dtrans/source/cnttype/wbench/testcnttype.cxx @@ -71,7 +71,7 @@ sal_Bool readCntTypesFromFileIntoVector( char* fname, vector< string >& vecData fseek( fstream, 0L, SEEK_SET ); char line[1024]; -while ( fscanf( fstream, "%[^\n]s", line ) != EOF ) +while ( fscanf( fstream, "%1023[^\n]s", line ) != EOF ) { vecData.push_back( line ); fgetc( fstream ); diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index 391b160..4d372a3 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -899,7 +899,7 @@ bool osl_getProcStat(pid_t pid, struct osl_procStat* procstat) "%lu %li %li %li" "%lu %lu %li %lu" "%lu %lu %lu %lu %lu" - "%s %s %s %s" + "%23s %23s %23s %23s" "%lu %lu %lu", >state, >ppid, >pgrp,>session, >tty, >tpgid, @@ -975,7 +975,7 @@ bool osl_getProcStatus(pid_t pid, struct osl_procStat* procstat) tmp = strstr(prstatusbuf,"SigPnd:"); if(tmp) { -sscanf(tmp, "SigPnd: %s SigBlk: %s SigIgn: %s %*s %s", +sscanf(tmp, "SigPnd: %23s SigBlk: %23s SigIgn: %23s %*s %23s", procstat->signal, procstat->blocked, procstat->sigignore, procstat->sigcatch ); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/WinClipboard.cxx |2 +- dtrans/source/win32/dnd/sourcecontext.cxx |4 ++-- dtrans/source/win32/dnd/target.cxx | 10 +- 3 files changed, 8 insertions(+), 8 deletions(-) New commits: commit 47b586380ec72a41d7b701a3f3da1f5b053f4762 Author: Noel GrandinDate: Mon Jan 25 10:23:46 2016 +0200 fix Windows build by reverting part of commit commit 752cd07d085ac0aadc99bd512d49072843139032 "InterfaceContainer2 with vector instead of Sequence" Change-Id: I69782899ce21fb48f6e77439bee7c7acdb0b4c41 diff --git a/dtrans/source/win32/clipb/WinClipboard.cxx b/dtrans/source/win32/clipb/WinClipboard.cxx index b8c83e9..3deada7 100644 --- a/dtrans/source/win32/clipb/WinClipboard.cxx +++ b/dtrans/source/win32/clipb/WinClipboard.cxx @@ -189,7 +189,7 @@ void SAL_CALL CWinClipboard::notifyAllClipboardListener( ) { aGuard.clear( ); -OInterfaceContainerHelper2* pICHelper = rBHelper.aLC.getContainer( +OInterfaceContainerHelper* pICHelper = rBHelper.aLC.getContainer( cppu::UnoType::get()); if ( pICHelper ) diff --git a/dtrans/source/win32/dnd/sourcecontext.cxx b/dtrans/source/win32/dnd/sourcecontext.cxx index 03ef66a..84e54da 100644 --- a/dtrans/source/win32/dnd/sourcecontext.cxx +++ b/dtrans/source/win32/dnd/sourcecontext.cxx @@ -94,7 +94,7 @@ void SourceContext::fire_dragDropEnd( sal_Bool success, sal_Int8 effect) e.DragSourceContext= static_cast ( this); e.Source.set( static_cast ( this), UNO_QUERY); -OInterfaceContainerHelper2* pContainer= rBHelper.getContainer( +OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType::get()); if( pContainer) @@ -121,7 +121,7 @@ void SourceContext::fire_dropActionChanged( sal_Int8 dropAction, sal_Int8 userAc e.DragSourceContext= static_cast ( this); e.Source.set( static_cast ( this), UNO_QUERY); -OInterfaceContainerHelper2* pContainer= rBHelper.getContainer( +OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType::get()); if( pContainer) diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index dccbe88..d7247f9 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -488,7 +488,7 @@ HRESULT DropTarget::Drop( IDataObject * /*pDataObj*/, void DropTarget::fire_drop( const DropTargetDropEvent& dte) { -OInterfaceContainerHelper2* pContainer= rBHelper.getContainer( cppu::UnoType::get()); +OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType::get()); if( pContainer) { OInterfaceIteratorHelper iter( *pContainer); @@ -502,7 +502,7 @@ void DropTarget::fire_drop( const DropTargetDropEvent& dte) void DropTarget::fire_dragEnter( const DropTargetDragEnterEvent& e ) { -OInterfaceContainerHelper2* pContainer= rBHelper.getContainer( cppu::UnoType::get()); +OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType::get()); if( pContainer) { OInterfaceIteratorHelper iter( *pContainer); @@ -516,7 +516,7 @@ void DropTarget::fire_dragEnter( const DropTargetDragEnterEvent& e ) void DropTarget::fire_dragExit( const DropTargetEvent& dte ) { -OInterfaceContainerHelper2* pContainer= rBHelper.getContainer( cppu::UnoType::get()); +OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType::get()); if( pContainer) { @@ -531,7 +531,7 @@ void DropTarget::fire_dragExit( const DropTargetEvent& dte ) void DropTarget::fire_dragOver( const DropTargetDragEvent& dtde ) { -OInterfaceContainerHelper2* pContainer= rBHelper.getContainer( cppu::UnoType::get()); +OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType::get()); if( pContainer) { OInterfaceIteratorHelper iter( *pContainer ); @@ -545,7 +545,7 @@ void DropTarget::fire_dragOver( const DropTargetDragEvent& dtde ) void DropTarget::fire_dropActionChanged( const DropTargetDragEvent& dtde ) { -OInterfaceContainerHelper2* pContainer= rBHelper.getContainer( cppu::UnoType::get()); +OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType::get()); if( pContainer) { OInterfaceIteratorHelper iter( *pContainer); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/ftransl/ftransl.cxx | 300 dtrans/source/win32/ftransl/ftransl.hxx | 20 -- 2 files changed, 154 insertions(+), 166 deletions(-) New commits: commit 268e4e90f9696998333026ac45b52c4f349d0069 Author: Noel GrandinDate: Mon Nov 30 13:03:32 2015 +0200 allocate and initialise FormatEntry table at compile-time no need to init this at runtime, it's purely static data Change-Id: I73ff5b0d8f273d7ee925f485f3ed712f117f5b40 diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 968c2f6..6a17ca4 100644 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -69,25 +69,35 @@ namespace MODULE_PRIVATE } } -FormatEntry::FormatEntry() +struct FormatEntry { -} + FormatEntry() {} + + FormatEntry( +const char *mime_content_type, +const char *human_presentable_name, +const char *native_format_name, +CLIPFORMAT std_clipboard_format_id, +css::uno::Type const & cppu_type +); + +css::datatransfer::DataFlavor aDataFlavor; +OUString aNativeFormatName; +sal_Int32 aStandardFormatId; +}; FormatEntry::FormatEntry( -const char* mime_content_type, -const char* human_presentable_name, -const char* native_format_name, +const char *mime_content_type, +const char *human_presentable_name, +const char *native_format_name, CLIPFORMAT std_clipboard_format_id, css::uno::Type const & cppu_type) + : aDataFlavor( OUString::createFromAscii(mime_content_type), OUString::createFromAscii(human_presentable_name), cppu_type) { -aDataFlavor.MimeType = OUString::createFromAscii(mime_content_type); -aDataFlavor.HumanPresentableName = OUString::createFromAscii(human_presentable_name); -aDataFlavor.DataType = cppu_type; - if (native_format_name) -aNativeFormatName = OUString::createFromAscii(native_format_name); +aNativeFormatName = OUString::createFromAscii(native_format_name); else -aNativeFormatName = OUString::createFromAscii(human_presentable_name); +aNativeFormatName = OUString::createFromAscii(human_presentable_name); aStandardFormatId = std_clipboard_format_id; } @@ -97,7 +107,6 @@ FormatEntry::FormatEntry( CDataFormatTranslator::CDataFormatTranslator( const Reference< XComponentContext >& rxContext ) : m_xContext( rxContext ) { -initTranslationTable( ); } Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataFlavor& aDataFlavor ) @@ -212,258 +221,257 @@ Sequence< OUString > SAL_CALL CDataFormatTranslator::getSupportedServiceNames( ) // format number we can stop if we find the first // CF_INVALID -void SAL_CALL CDataFormatTranslator::initTranslationTable() -{ +static const std::vector< FormatEntry > g_TranslTable { //SotClipboardFormatId::DIF - m_TranslTable.push_back(FormatEntry("application/x-openoffice-dif;windows_formatname=\"DIF\"", "DIF", "DIF", CF_DIF, CPPUTYPE_DEFAULT)); +FormatEntry("application/x-openoffice-dif;windows_formatname=\"DIF\"", "DIF", "DIF", CF_DIF, CPPUTYPE_DEFAULT), // SotClipboardFormatId::BITMAP // #i124085# CF_DIBV5 disabled, leads to problems at export. To fully support, using // an own mime-type may be necessary. I have tried that, but saw no real advantages // with different apps when exchanging bitmap-based data. So, disabled for now. At // the same time increased png format exchange for better interoperability - //m_TranslTable.push_back(FormatEntry("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", "Bitmap", CF_DIBV5, CPPUTYPE_DEFAULT)); +// FormatEntry("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", "Bitmap", CF_DIBV5, CPPUTYPE_DEFAULT), - m_TranslTable.push_back(FormatEntry("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", "Bitmap", CF_DIB, CPPUTYPE_DEFAULT)); - m_TranslTable.push_back(FormatEntry("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", "Bitmap", CF_BITMAP, CPPUTYPE_DEFAULT)); + FormatEntry("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", "Bitmap", CF_DIB, CPPUTYPE_DEFAULT), + FormatEntry("application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"", "Bitmap", "Bitmap", CF_BITMAP, CPPUTYPE_DEFAULT), // SotClipboardFormatId::STRING -m_TranslTable.push_back(FormatEntry("text/plain;charset=utf-16", "Unicode-Text", "", CF_UNICODETEXT, CppuType_String)); +FormatEntry("text/plain;charset=utf-16", "Unicode-Text", "", CF_UNICODETEXT, CppuType_String), // Format Locale - for internal use - m_TranslTable.push_back(FormatEntry("application/x-openoffice-locale;windows_formatname=\"Locale\"", "Locale",
[Libreoffice-commits] core.git: dtrans/source dtrans/test editeng/source embeddedobj/source embedserv/source
dtrans/source/test/test_dtrans.cxx |2 - dtrans/source/win32/dnd/sourcecontext.cxx |4 +-- dtrans/source/win32/dnd/target.cxx |6 ++-- dtrans/test/win32/dnd/atlwindow.cxx|4 +-- editeng/source/items/numitem.cxx |2 - editeng/source/misc/unolingu.cxx | 13 - editeng/source/xml/xmltxtimp.cxx |2 - embeddedobj/source/commonembedding/miscobj.cxx |2 - embeddedobj/source/commonembedding/persistence.cxx |8 +++--- embeddedobj/source/commonembedding/xfactory.cxx| 25 +++--- embeddedobj/source/general/docholder.cxx | 20 +++ embeddedobj/source/general/dummyobject.cxx |4 +-- embeddedobj/source/msole/olecomponent.cxx |2 - embeddedobj/source/msole/oleembed.cxx |4 +-- embeddedobj/source/msole/olemisc.cxx |4 +-- embeddedobj/source/msole/olepersist.cxx| 21 +++ embeddedobj/source/msole/ownview.cxx |8 +++--- embeddedobj/source/msole/xdialogcreator.cxx| 10 +++ embedserv/source/embed/docholder.cxx | 28 ++--- embedserv/source/embed/ed_ipersiststr.cxx |2 - 20 files changed, 81 insertions(+), 90 deletions(-) New commits: commit 3c971162b57bb042dc001f775b8e20ec37ecbef8 Author: Noel GrandinDate: Fri Oct 30 14:22:53 2015 +0200 use uno::Reference::set method instead of assignment Change-Id: I150f213ab033f5fc1b50abe4e1529292206c9feb Reviewed-on: https://gerrit.libreoffice.org/19689 Tested-by: Jenkins Reviewed-by: Noel Grandin diff --git a/dtrans/source/test/test_dtrans.cxx b/dtrans/source/test/test_dtrans.cxx index 2787f93..b81b3b6 100644 --- a/dtrans/source/test/test_dtrans.cxx +++ b/dtrans/source/test/test_dtrans.cxx @@ -137,7 +137,7 @@ void SAL_CALL ClipboardListener::changedContents( const ClipboardEvent& event ) throw(RuntimeException) { m_nReceivedChangedContentsEvents++; -m_xClipboard = Reference< XClipboard > (event.Source, UNO_QUERY); +m_xClipboard.set(event.Source, UNO_QUERY); m_xTransferable = event.Contents; } diff --git a/dtrans/source/win32/dnd/sourcecontext.cxx b/dtrans/source/win32/dnd/sourcecontext.cxx index cee6c98..84e54da 100644 --- a/dtrans/source/win32/dnd/sourcecontext.cxx +++ b/dtrans/source/win32/dnd/sourcecontext.cxx @@ -92,7 +92,7 @@ void SourceContext::fire_dragDropEnd( sal_Bool success, sal_Int8 effect) } e.DragSource= m_dragSource; e.DragSourceContext= static_cast ( this); -e.Source= Reference( static_cast ( this), UNO_QUERY); +e.Source.set( static_cast ( this), UNO_QUERY); OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType::get()); @@ -119,7 +119,7 @@ void SourceContext::fire_dropActionChanged( sal_Int8 dropAction, sal_Int8 userAc e.UserAction= userAction; e.DragSource= m_dragSource; e.DragSourceContext= static_cast ( this); -e.Source= Reference( static_cast ( this), UNO_QUERY); +e.Source.set( static_cast ( this), UNO_QUERY); OInterfaceContainerHelper* pContainer= rBHelper.getContainer( cppu::UnoType::get()); diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index bc5b649..d7247f9 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -334,7 +334,7 @@ HRESULT DropTarget::DragEnter( IDataObject *pDataObj, DropTargetDragEnterEvent e; e.SupportedDataFlavors= m_currentData->getTransferDataFlavors(); e.DropAction= m_nCurrentDropAction; -e.Source= Reference( static_cast (this),UNO_QUERY); +e.Source.set( static_cast (this),UNO_QUERY); e.Context= m_currentDragContext; POINT point={ pt.x, pt.y}; ScreenToClient( m_hWnd, ); @@ -373,7 +373,7 @@ HRESULT DropTarget::DragOver( DWORD grfKeyState, { DropTargetDragEvent e; e.DropAction= m_nCurrentDropAction; -e.Source= Reference(static_cast (this),UNO_QUERY); +e.Source.set(static_cast (this),UNO_QUERY); e.Context= m_currentDragContext; POINT point={ pt.x, pt.y}; ScreenToClient( m_hWnd, ); @@ -456,7 +456,7 @@ HRESULT DropTarget::Drop( IDataObject * /*pDataObj*/, { DropTargetDropEvent e; e.DropAction= m_nCurrentDropAction; -e.Source= Reference( static_cast (this), UNO_QUERY); +e.Source.set( static_cast (this), UNO_QUERY);
[Libreoffice-commits] core.git: dtrans/source editeng/source embeddedobj/source embedserv/source sc/source sfx2/source slideshow/source sot/source vcl/unx
dtrans/source/cnttype/mcnttype.hxx|2 - editeng/source/outliner/outlobj.cxx |2 - embeddedobj/source/commonembedding/xfactory.hxx |4 +- embeddedobj/source/general/docholder.cxx | 19 -- embeddedobj/source/general/intercept.cxx |2 - embedserv/source/embed/intercept.cxx |2 - sc/source/ui/unoobj/docuno.cxx|3 - sfx2/source/dialog/backingcomp.cxx|2 - sfx2/source/dialog/backingwindow.hxx |2 - slideshow/source/engine/animationnodes/animationcolornode.cxx |2 - sot/source/base/object.cxx|8 ++-- sot/source/sdstor/storage.cxx | 16 sot/source/sdstor/ucbstorage.cxx |2 - vcl/unx/gtk3/app/gtk3gtkinst.cxx |4 +- 14 files changed, 33 insertions(+), 37 deletions(-) New commits: commit 35fd0cf311d0ab6e647ef8a244f350d8a690e734 Author: Caolán McNamaraDate: Sun Sep 13 21:13:25 2015 +0100 cppcheck: noExplicitConstructor Change-Id: I39194062ba68c4cb1ccc9b93c629f005ccd02497 diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx index d0d31a3..e527c8e 100644 --- a/dtrans/source/cnttype/mcnttype.hxx +++ b/dtrans/source/cnttype/mcnttype.hxx @@ -32,7 +32,7 @@ class CMimeContentType : public cppu::WeakImplHelper< css::datatransfer::XMimeContentType > { public: -CMimeContentType( const OUString& aCntType ); +explicit CMimeContentType(const OUString& rCntType); // XMimeContentType diff --git a/editeng/source/outliner/outlobj.cxx b/editeng/source/outliner/outlobj.cxx index 02094ae..cb40988 100644 --- a/editeng/source/outliner/outlobj.cxx +++ b/editeng/source/outliner/outlobj.cxx @@ -107,7 +107,7 @@ struct OutlinerParaObject::Impl Impl( const EditTextObject& rTextObj, const ParagraphDataVector& rParaData, bool bIsEditDoc ) : mxData(new OutlinerParaObjData(rTextObj.Clone(), rParaData, bIsEditDoc)) {} -Impl( const EditTextObject& rTextObj ) : +explicit Impl(const EditTextObject& rTextObj) : mxData(new OutlinerParaObjData(rTextObj.Clone(), ParagraphDataVector(), true)) {} Impl( const Impl& r ) : mxData(r.mxData) {} diff --git a/embeddedobj/source/commonembedding/xfactory.hxx b/embeddedobj/source/commonembedding/xfactory.hxx index cef1817..81f1506 100644 --- a/embeddedobj/source/commonembedding/xfactory.hxx +++ b/embeddedobj/source/commonembedding/xfactory.hxx @@ -37,7 +37,7 @@ class OOoEmbeddedObjectFactory : public ::cppu::WeakImplHelper< ::comphelper::MimeConfigurationHelper m_aConfigHelper; public: -OOoEmbeddedObjectFactory( +explicit OOoEmbeddedObjectFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ) : m_xContext( rxContext ) , m_aConfigHelper( rxContext ) @@ -84,7 +84,7 @@ class OOoSpecialEmbeddedObjectFactory : public ::cppu::WeakImplHelper< ::comphelper::MimeConfigurationHelper m_aConfigHelper; public: -OOoSpecialEmbeddedObjectFactory( +explicit OOoSpecialEmbeddedObjectFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext ) : m_xContext( rxContext ) , m_aConfigHelper( rxContext ) diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index f8437c2..0212200 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -78,26 +78,23 @@ using namespace ::com::sun::star; - - -class IntCounterGuard { -sal_Int32& m_nFlag; +class IntCounterGuard +{ +sal_Int32& m_rFlag; public: -IntCounterGuard( sal_Int32& nFlag ) -: m_nFlag( nFlag ) +explicit IntCounterGuard(sal_Int32& rFlag) +: m_rFlag(rFlag) { -m_nFlag++; +++m_rFlag; } ~IntCounterGuard() { -if ( m_nFlag ) -m_nFlag--; +if (m_rFlag) +--m_rFlag; } }; - - static void InsertMenu_Impl( const uno::Reference< container::XIndexContainer >& xTargetMenu, sal_Int32 nTargetIndex, const uno::Reference< container::XIndexAccess >& xSourceMenu, diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index 079d912..732cac6 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -34,7 +34,7 @@ class StatusChangeListenerContainer : public cppu::OMultiTypeInterfaceContainerHelperVar { public: -StatusChangeListenerContainer( ::osl::Mutex& aMutex ) +explicit StatusChangeListenerContainer(osl::Mutex& aMutex) :
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/cnttype/mcnttfactory.hxx | 16 ++--- dtrans/source/cnttype/mcnttype.hxx | 18 +++--- dtrans/source/generic/clipboardmanager.hxx | 48 - dtrans/source/generic/generic_clipboard.hxx| 56 ++-- dtrans/source/inc/DtObjFactory.hxx |8 +- dtrans/source/win32/clipb/WinClipbImpl.hxx | 20 +++ dtrans/source/win32/clipb/WinClipboard.cxx |2 dtrans/source/win32/clipb/WinClipboard.hxx | 44 dtrans/source/win32/dnd/globals.cxx|2 dtrans/source/win32/dnd/globals.hxx|6 +- dtrans/source/win32/dtobj/DOTransferable.cxx |4 - dtrans/source/win32/dtobj/DOTransferable.hxx | 57 ++--- dtrans/source/win32/dtobj/DataFmtTransl.hxx|8 +- dtrans/source/win32/dtobj/FetcList.hxx | 14 ++--- dtrans/source/win32/dtobj/FmtFilter.hxx| 18 +++--- dtrans/source/win32/dtobj/XNotifyingDataObject.hxx | 14 ++--- dtrans/source/win32/dtobj/XTDataObject.hxx | 16 ++--- dtrans/source/win32/ftransl/ftransl.cxx|6 +- dtrans/source/win32/ftransl/ftransl.hxx| 48 - 19 files changed, 203 insertions(+), 202 deletions(-) New commits: commit ea407568570d301888a0a51712356379d7b695d6 Author: Noel GrandinDate: Fri Sep 11 14:59:25 2015 +0200 dtrans: com::sun::star->css Change-Id: I4625a9b73c517b8187e03b11cc0546abdf338d8b Reviewed-on: https://gerrit.libreoffice.org/18502 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/dtrans/source/cnttype/mcnttfactory.hxx b/dtrans/source/cnttype/mcnttfactory.hxx index 7ce1899..971bb91 100644 --- a/dtrans/source/cnttype/mcnttfactory.hxx +++ b/dtrans/source/cnttype/mcnttfactory.hxx @@ -27,8 +27,8 @@ #include class CMimeContentTypeFactory : public -cppu::WeakImplHelper< com::sun::star::datatransfer::XMimeContentTypeFactory, \ -com::sun::star::lang::XServiceInfo > +cppu::WeakImplHelper< css::datatransfer::XMimeContentTypeFactory, + css::lang::XServiceInfo > { public: @@ -36,19 +36,19 @@ public: // XMimeContentTypeFactory -virtual ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XMimeContentType > SAL_CALL createMimeContentType( const OUString& aContentType ) -throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; +virtual css::uno::Reference< css::datatransfer::XMimeContentType > SAL_CALL createMimeContentType( const OUString& aContentType ) +throw(css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE; // XServiceInfo virtual OUString SAL_CALL getImplementationName( ) -throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; +throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) -throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; +throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; -virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) -throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; +virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) +throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; private: ::osl::Mutex m_aMutex; diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx index a4126c6..d0d31a3 100644 --- a/dtrans/source/cnttype/mcnttype.hxx +++ b/dtrans/source/cnttype/mcnttype.hxx @@ -29,28 +29,28 @@ #include class CMimeContentType : public -cppu::WeakImplHelper< com::sun::star::datatransfer::XMimeContentType > +cppu::WeakImplHelper< css::datatransfer::XMimeContentType > { public: CMimeContentType( const OUString& aCntType ); // XMimeContentType -virtual OUString SAL_CALL getMediaType( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; -virtual OUString SAL_CALL getMediaSubtype( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; -virtual OUString SAL_CALL getFullMediaType( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; +virtual OUString SAL_CALL getMediaType( ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; +virtual OUString SAL_CALL getMediaSubtype( ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE; +
[Libreoffice-commits] core.git: dtrans/source dtrans/test
dtrans/source/cnttype/mcnttfactory.hxx|4 ++-- dtrans/source/cnttype/mcnttype.hxx|4 ++-- dtrans/source/generic/clipboardmanager.cxx|2 +- dtrans/source/generic/clipboardmanager.hxx|4 ++-- dtrans/source/generic/generic_clipboard.cxx |2 +- dtrans/source/generic/generic_clipboard.hxx |4 ++-- dtrans/source/test/test_dtrans.cxx|9 - dtrans/source/win32/clipb/WinClipboard.cxx|2 +- dtrans/source/win32/clipb/WinClipboard.hxx|4 ++-- dtrans/source/win32/dnd/source.cxx|2 +- dtrans/source/win32/dnd/source.hxx|4 ++-- dtrans/source/win32/dnd/sourcecontext.cxx |2 +- dtrans/source/win32/dnd/sourcecontext.hxx |5 ++--- dtrans/source/win32/dnd/target.cxx|2 +- dtrans/source/win32/dnd/target.hxx|4 ++-- dtrans/source/win32/dnd/targetdragcontext.hxx |4 ++-- dtrans/source/win32/dnd/targetdropcontext.hxx |4 ++-- dtrans/source/win32/dtobj/DOTransferable.hxx |4 ++-- dtrans/source/win32/ftransl/ftransl.hxx |4 ++-- dtrans/source/win32/workbench/test_wincb.cxx |7 +++ dtrans/test/win32/dnd/sourcelistener.hxx |4 ++-- dtrans/test/win32/dnd/targetlistener.hxx |4 ++-- dtrans/test/win32/dnd/transferable.hxx|4 ++-- 23 files changed, 43 insertions(+), 46 deletions(-) New commits: commit 7e495e2b9e7b52ed169c936b63d960958db310cd Author: Takeshi Abe t...@fixedpoint.jp Date: Thu Jul 23 16:20:52 2015 +0900 tdf#88206 replace cppu::WeakImplHelper* etc. with the variadic variants in dtrans. Change-Id: Ia7e3c37681c763089dd31c861854a9b500996305 Reviewed-on: https://gerrit.libreoffice.org/17318 Tested-by: Jenkins c...@libreoffice.org Reviewed-by: Noel Grandin noelgran...@gmail.com diff --git a/dtrans/source/cnttype/mcnttfactory.hxx b/dtrans/source/cnttype/mcnttfactory.hxx index 19bf550..7ce1899 100644 --- a/dtrans/source/cnttype/mcnttfactory.hxx +++ b/dtrans/source/cnttype/mcnttfactory.hxx @@ -22,12 +22,12 @@ #include rtl/ustring.hxx #include sal/types.h -#include cppuhelper/compbase2.hxx +#include cppuhelper/implbase.hxx #include com/sun/star/lang/XServiceInfo.hpp #include com/sun/star/datatransfer/XMimeContentTypeFactory.hpp class CMimeContentTypeFactory : public -cppu::WeakImplHelper2 com::sun::star::datatransfer::XMimeContentTypeFactory, \ +cppu::WeakImplHelper com::sun::star::datatransfer::XMimeContentTypeFactory, \ com::sun::star::lang::XServiceInfo { diff --git a/dtrans/source/cnttype/mcnttype.hxx b/dtrans/source/cnttype/mcnttype.hxx index e44e122..a4126c6 100644 --- a/dtrans/source/cnttype/mcnttype.hxx +++ b/dtrans/source/cnttype/mcnttype.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_DTRANS_SOURCE_CNTTYPE_MCNTTYPE_HXX #define INCLUDED_DTRANS_SOURCE_CNTTYPE_MCNTTYPE_HXX -#include cppuhelper/compbase1.hxx +#include cppuhelper/implbase.hxx #include rtl/ustring.hxx #include sal/types.h #include com/sun/star/lang/IllegalArgumentException.hpp @@ -29,7 +29,7 @@ #include map class CMimeContentType : public -cppu::WeakImplHelper1 com::sun::star::datatransfer::XMimeContentType +cppu::WeakImplHelper com::sun::star::datatransfer::XMimeContentType { public: CMimeContentType( const OUString aCntType ); diff --git a/dtrans/source/generic/clipboardmanager.cxx b/dtrans/source/generic/clipboardmanager.cxx index b67e6ac..e538a7f 100644 --- a/dtrans/source/generic/clipboardmanager.cxx +++ b/dtrans/source/generic/clipboardmanager.cxx @@ -33,7 +33,7 @@ using namespace std; using ::dtrans::ClipboardManager; ClipboardManager::ClipboardManager(): -WeakComponentImplHelper3 XClipboardManager, XEventListener, XServiceInfo (m_aMutex), +WeakComponentImplHelper XClipboardManager, XEventListener, XServiceInfo (m_aMutex), m_aDefaultName(OUString(default)) { } diff --git a/dtrans/source/generic/clipboardmanager.hxx b/dtrans/source/generic/clipboardmanager.hxx index a65e672..2d9a1d4 100644 --- a/dtrans/source/generic/clipboardmanager.hxx +++ b/dtrans/source/generic/clipboardmanager.hxx @@ -20,7 +20,7 @@ #ifndef INCLUDED_DTRANS_SOURCE_GENERIC_CLIPBOARDMANAGER_HXX #define INCLUDED_DTRANS_SOURCE_GENERIC_CLIPBOARDMANAGER_HXX -#include cppuhelper/compbase3.hxx +#include cppuhelper/compbase.hxx #include com/sun/star/datatransfer/clipboard/XClipboardManager.hpp #include com/sun/star/lang/XServiceInfo.hpp @@ -35,7 +35,7 @@ typedef ::std::map OUString, ::com::sun::star::uno::Reference ::com::sun::star namespace dtrans { -class ClipboardManager : public ::cppu::WeakComponentImplHelper3 +class ClipboardManager : public ::cppu::WeakComponentImplHelper ::com::sun::star::datatransfer::clipboard::XClipboardManager, ::com::sun::star::lang::XEventListener, ::com::sun::star::lang::XServiceInfo diff --git a/dtrans/source/generic/generic_clipboard.cxx
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dnd/target.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 372d416692e0f5a6f1a3a97ff6f967eaab54233c Author: Michael Stahl mst...@redhat.com Date: Tue Jul 28 17:20:57 2015 +0200 dtrans: reset DropTarget::m_pDropTarget if it is released JunitTest_forms_unoapi_3 just crashed in DropTarget::disposing() with m_pDropTarget pointing to garbage. Change-Id: Icb5ad15a3d4b857b45553543d404e14abbac4374 diff --git a/dtrans/source/win32/dnd/target.cxx b/dtrans/source/win32/dnd/target.cxx index cd051ba..bc5b649 100644 --- a/dtrans/source/win32/dnd/target.cxx +++ b/dtrans/source/win32/dnd/target.cxx @@ -87,6 +87,7 @@ void SAL_CALL DropTarget::disposing() { CoLockObjectExternal( m_pDropTarget, FALSE, TRUE); m_pDropTarget-Release(); +m_pDropTarget = nullptr; } if( m_oleThreadId) @@ -171,6 +172,7 @@ void SAL_CALL DropTarget::initialize( const Sequence Any aArguments ) // do clean up if drag and drop is not possible CoLockObjectExternal( m_pDropTarget, FALSE, FALSE); m_pDropTarget-Release(); +m_pDropTarget = nullptr; m_hWnd= NULL; } } @@ -219,6 +221,7 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams) // do clean up if drag and drop is not possible CoLockObjectExternal( pTarget-m_pDropTarget, FALSE, FALSE); pTarget-m_pDropTarget-Release(); +pTarget-m_pDropTarget = nullptr; pTarget-m_hWnd= NULL; } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DataFmtTransl.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 3e7a6ff8c32e7fd5947b344e9d22ef7ba48dcca5 Author: Ashod Nakashian ashodnakash...@yahoo.com Date: Mon Feb 2 13:53:32 2015 -0500 Fix for possible unaddressable write. DrMemory reports unaddressable write of 2 bytes (a single unicode character) in GetClipboardFormatNameW. While the API documentation do not imply that the buffer length excludes the null terminator, the returned length does. Even though in my case the format name was HTML Format which is far shorter than the 256 character buffer size, DrMemory consistently cought unaddressable write at the end of the buffer. It's not clear why GetClipboardFormatNameW would need to access beyond the length of the data it writes, but this fix is harmless and at least will silence DrMemory, if not fix a genuine issue. Change-Id: Ib8ac69a65d4fcff53e71f56f9a06c9c7299be1ba Reviewed-on: https://gerrit.libreoffice.org/14286 Tested-by: Jenkins c...@libreoffice.org Reviewed-by: Noel Grandin noelgran...@gmail.com diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index 37c8dd8..33c458f 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -170,7 +170,7 @@ OUString CDataFormatTranslator::getClipboardFormatName( CLIPFORMAT aClipformat ) { OSL_PRECOND( CF_INVALID != aClipformat, Invalid clipboard format ); -sal_Unicode wBuff[ MAX_CLIPFORMAT_NAME ]; +sal_Unicode wBuff[ MAX_CLIPFORMAT_NAME + 1 ]; // Null terminator isn't counted, apparently. sal_Int32 nLen = GetClipboardFormatNameW( aClipformat, reinterpret_castLPWSTR(wBuff), MAX_CLIPFORMAT_NAME ); return OUString( wBuff, nLen ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/FmtFilter.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 3da925eb807d8ccab9a3b928ba7c4c898c2b8d66 Author: Matteo Casalin matteo.casa...@yahoo.com Date: Sat Jan 24 19:15:39 2015 +0100 Fix warning C4101: ´ex´ : unreferenced local variable Change-Id: I0c8d488047fc7a28a3fa5a47de5da947bb911136 diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 019d840..4063762 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -448,6 +448,7 @@ std::wstring getShellLinkTarget(const std::wstring aLnkFile) catch(sal::systools::ComError ex) { OSL_FAIL(ex.what()); +(void)ex; } return target; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/FmtFilter.cxx |1 - 1 file changed, 1 deletion(-) New commits: commit 5dc23d533f2cbe2264b40816ddb550f227ab777d Author: Caolán McNamara caol...@redhat.com Date: Sat Jan 24 17:03:32 2015 + cppcheck: selfAssignment Change-Id: I8910f69d86c608350eefcbcce49c6d8e7577bd22 diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 46fa0ba..019d840 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -448,7 +448,6 @@ std::wstring getShellLinkTarget(const std::wstring aLnkFile) catch(sal::systools::ComError ex) { OSL_FAIL(ex.what()); -ex = ex; } return target; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source filter/source include/osl include/rtl offapi/com sal/osl sal/qa svtools/source vcl/inc vcl/source
dtrans/source/win32/dnd/source.cxx |2 +- filter/source/graphicfilter/idxf/dxfgrprd.cxx|2 +- include/osl/thread.h |4 ++-- include/rtl/process.h|4 ++-- offapi/com/sun/star/deployment/XExtensionManager.idl |2 +- sal/osl/unx/thread.cxx |2 +- sal/qa/helper/gcov/deprecated.txt|4 ++-- sal/qa/osl/process/osl_Thread.cxx|2 +- svtools/source/contnr/fileview.cxx |2 +- vcl/inc/sft.hxx |6 +++--- vcl/source/filter/wmf/wmfwr.hxx |2 +- 11 files changed, 16 insertions(+), 16 deletions(-) New commits: commit b63571f510793376a334d346974d4d0d73b9a0ff Author: Julien Nabet serval2...@yahoo.fr Date: Sat Dec 20 16:39:24 2014 +0100 Typos Change-Id: I3475be796cf2655d9b619b86c9686aeef4b97b82 diff --git a/dtrans/source/win32/dnd/source.cxx b/dtrans/source/win32/dnd/source.cxx index d7907f5..2728aed 100644 --- a/dtrans/source/win32/dnd/source.cxx +++ b/dtrans/source/win32/dnd/source.cxx @@ -99,7 +99,7 @@ void DragSource::StartDragImpl( // The SourceContext class administers the XDragSourceListener s and // fires events to them. An instance only exists in the scope of this -// functions. However, the drag and drop operation causes callbacks +// function. However, the drag and drop operation causes callbacks // to the IDropSource interface implemented in this class (but only // while this function executes). The source context is also used // in DragSource::QueryContinueDrag. diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx index 0d79682..ecba39f 100644 --- a/filter/source/graphicfilter/idxf/dxfgrprd.cxx +++ b/filter/source/graphicfilter/idxf/dxfgrprd.cxx @@ -27,7 +27,7 @@ // we use an own ReadLine function, because Stream::ReadLine stops if -// a 0-sign occurs; this functions converts 0-signs to blanks and reads +// a 0-sign occurs; this function converts 0-signs to blanks and reads // a complete line until a cr/lf is found OString DXFReadLine(SvStream rIStm) diff --git a/include/osl/thread.h b/include/osl/thread.h index 7c2dd3c..0a8eb4c 100644 --- a/include/osl/thread.h +++ b/include/osl/thread.h @@ -62,7 +62,7 @@ typedef sal_uInt32 oslThreadIdentifier; typedef void* oslThreadKey; /** Create the thread, using the function-ptr pWorker as -its main (worker) function. This functions receives in +its main (worker) function. This function receives in its void* parameter the value supplied by pThreadData. Once the OS-structures are initialized,the thread starts running. @@ -71,7 +71,7 @@ typedef void* oslThreadKey; SAL_DLLPUBLIC oslThread SAL_CALL osl_createThread(oslWorkerFunction pWorker, void* pThreadData); /** Create the thread, using the function-ptr pWorker as -its main (worker) function. This functions receives in +its main (worker) function. This function receives in its void* parameter the value supplied by pThreadData. The thread will be created, but it won't start running. To wake-up the thread, use resume(). diff --git a/include/rtl/process.h b/include/rtl/process.h index bd55a3a..d393b5c 100644 --- a/include/rtl/process.h +++ b/include/rtl/process.h @@ -46,7 +46,7 @@ SAL_DLLPUBLIC void SAL_CALL rtl_getGlobalProcessId( sal_uInt8 *pTargetUUID ); /** Get the nArg-th command-line argument passed to the main-function of this process. -This functions differs from osl_getCommandArg() in filtering any bootstrap values +This function differs from osl_getCommandArg() in filtering any bootstrap values given by command args, that means that all arguments starting with -env: will be ignored by this function. @@ -60,7 +60,7 @@ SAL_DLLPUBLIC oslProcessError SAL_CALL rtl_getAppCommandArg(sal_uInt32 nArg, rtl /** Returns the number of command line arguments at process start. -This functions differs from osl_getCommandArg() in filtering any bootstrap values +This function differs from osl_getCommandArg() in filtering any bootstrap values given by command args, that means that all arguments starting with -env: will be ignored by this function. diff --git a/offapi/com/sun/star/deployment/XExtensionManager.idl b/offapi/com/sun/star/deployment/XExtensionManager.idl index d6c92ce..f7bb93f 100644 --- a/offapi/com/sun/star/deployment/XExtensionManager.idl +++ b/offapi/com/sun/star/deployment/XExtensionManager.idl @@ -304,7 +304,7 @@ interface XExtensionManager need to be displayed, and which are installed with the corresponding option, are also not returned. -Extensions returned by this functions are not returned by +Extensions returned by these functions are not returned by
[Libreoffice-commits] core.git: dtrans/source fpicker/source slideshow/source
dtrans/source/win32/dtobj/XTDataObject.hxx |2 +- dtrans/source/win32/workbench/XTDo.hxx |2 +- fpicker/source/win32/filepicker/helppopupwindow.hxx|2 +- slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx |2 +- slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm |2 +- slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx |2 +- 6 files changed, 6 insertions(+), 6 deletions(-) New commits: commit 36774806da0f23897ff9c0b619bf17068d2213cd Author: Julien Nabet serval2...@yahoo.fr Date: Tue Feb 25 22:00:50 2014 +0100 (a/A)utomaticaly - (a/A)utomatically Change-Id: Ice4327bdb8e5a14ef082f013fa513b2267f0fbf3 diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx index a8a87c6..a8d0c94 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.hxx +++ b/dtrans/source/win32/dtobj/XTDataObject.hxx @@ -52,7 +52,7 @@ appropriate clipboard formats - if the transferable contains text data always text and unicodetext will be offered or vice versa -- text data will be automaticaly converted between text und unicode text +- text data will be automatically converted between text und unicode text - although the transferable may support text in different charsets (codepages) only text in one codepage can be offered by the clipboard diff --git a/dtrans/source/win32/workbench/XTDo.hxx b/dtrans/source/win32/workbench/XTDo.hxx index 5d87dbc..2a9116a 100644 --- a/dtrans/source/win32/workbench/XTDo.hxx +++ b/dtrans/source/win32/workbench/XTDo.hxx @@ -50,7 +50,7 @@ class EnumFormatEtc; appropriate clipboard formats - if the transferable contains text data always text and unicodetext will be offered or vice versa -- text data will be automaticaly converted between text und unicode text +- text data will be automatically converted between text und unicode text - although the transferable may support text in different charsets (codepages) only text in one codepage can be offered by the clipboard diff --git a/fpicker/source/win32/filepicker/helppopupwindow.hxx b/fpicker/source/win32/filepicker/helppopupwindow.hxx index ff476cb..ae0179a 100644 --- a/fpicker/source/win32/filepicker/helppopupwindow.hxx +++ b/fpicker/source/win32/filepicker/helppopupwindow.hxx @@ -44,7 +44,7 @@ The interface is very simple but necessary for our needs. -The window automaticaly calculates the necessary +The window automatically calculates the necessary dimensions of the window and a appropriate show position based on the position the client provides. When the user click any mouse button or hits any key diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx index 0e99164..8a6ce80 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx @@ -368,7 +368,7 @@ public: #endif }; -// declare the static variables as some gcc versions have problems declaring them automaticaly +// declare the static variables as some gcc versions have problems declaring them automatically bool OGLTransitionerImpl::cbBrokenTexturesATI; float OGLTransitionerImpl::cnGLVersion; bool OGLTransitionerImpl::cbMesa; diff --git a/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm b/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm index d48a831..d4903961 100644 --- a/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm +++ b/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm @@ -285,7 +285,7 @@ public: #endif }; -// declare the static variables as some gcc versions have problems declaring them automaticaly +// declare the static variables as some gcc versions have problems declaring them automatically /**/ bool OGLTransitionerImpl::cbBrokenTexturesATI; diff --git a/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx index 36a96cb..f24466b 100644 --- a/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx @@ -297,7 +297,7 @@ public: #endif }; -// declare the static variables as some gcc versions have problems declaring them automaticaly +// declare the static variables as some gcc versions have problems declaring them automatically bool OGLTransitionerImpl::cbBrokenTexturesATI; float OGLTransitionerImpl::cnGLVersion; bool OGLTransitionerImpl::cbMesa; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/FmtFilter.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 1d512fb31c20e17426f0652234a1304ead2d8c8d Author: Jan Holesovsky ke...@collabora.com Date: Fri Feb 21 09:07:57 2014 +0100 Update comment. Change-Id: Ie2aeb65760fc06483f709a4194b9ee1d1f7a8955 diff --git a/dtrans/source/win32/dtobj/FmtFilter.cxx b/dtrans/source/win32/dtobj/FmtFilter.cxx index 6f67a3b..4adbc93 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.cxx +++ b/dtrans/source/win32/dtobj/FmtFilter.cxx @@ -355,8 +355,8 @@ std::string GetHtmlFormatHeader(size_t startHtml, size_t endHtml, size_t startFr return htmlHeader.str(); } -// the office always writes the start and end html tag in upper cases and -// without spaces both tags don't allow parameters +// the case of these tags has to match what we output in our filters +// both tags don't allow parameters const std::string TAG_HTML = std::string(html); const std::string TAG_END_HTML = std::string(/html); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/dtobj/DOTransferable.cxx | 15 +++ 1 file changed, 15 insertions(+) New commits: commit 20658ca9f8dd840a593de727e89b84e27bf90245 Author: Armin Le Grand a...@apache.org Date: Tue Oct 15 10:54:43 2013 + Resolves: #i123407# Do not insist on CF_DIBV5 for clipboard data also accept CF_DIB (cherry picked from commit b7d59ee36d0786aba13e6b00d93cdfa0045e5379) Change-Id: Iaafdeab981d6621e6696a642c68e29392af3e200 diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index 7e35ac2..83a8461 100644 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -116,6 +116,21 @@ Any SAL_CALL CDOTransferable::getTransferData( const DataFlavor aFlavor ) Any aAny = makeAny( aUnicodeText ); return aAny; } +else if(CF_DIBV5 == fetc.getClipformat()) +{ +// #i123407# CF_DIBV5 has priority; if the try to fetch this failed, +// check CF_DIB availability as an alternative +fetc.setClipformat(CF_DIB); + +try +{ +clipDataStream = getClipboardData( fetc ); +} +catch( UnsupportedFlavorException ) +{ +throw; // pass through, tried all possibilities +} +} else throw; // pass through exception } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/misc/ImplHelper.cxx |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) New commits: commit ba083e5c5a4723db90acacb769c4f1624f182287 Author: Tor Lillqvist t...@collabora.com Date: Wed Sep 4 00:58:42 2013 +0300 WaE: use number() instead of valueOf() Change-Id: I4a464a8e6448d1f9b1be820f11e643930682bcdb diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx index 982d33f..3337644 100644 --- a/dtrans/source/win32/misc/ImplHelper.cxx +++ b/dtrans/source/win32/misc/ImplHelper.cxx @@ -94,11 +94,11 @@ OUString SAL_CALL getWinCPFromLocaleId( LCID lcid, LCTYPE lctype ) // set an default value if ( LOCALE_IDEFAULTCODEPAGE == lctype ) { -winCP = OUString::valueOf( static_castsal_Int32(GetOEMCP( )), 10 ); +winCP = OUString::number( static_castsal_Int32(GetOEMCP( )) ); } else if ( LOCALE_IDEFAULTANSICODEPAGE == lctype ) { -winCP = OUString::valueOf( static_castsal_Int32(GetACP( )), 10 ); +winCP = OUString::number( static_castsal_Int32(GetACP( )) ); } else OSL_ASSERT( sal_False ); @@ -180,7 +180,7 @@ OUString SAL_CALL cptostr( sal_uInt32 codepage ) { OSL_ASSERT( IsValidCodePage( codepage ) ); -return OUString::valueOf( static_castsal_Int64( codepage ), 10 ); +return OUString::number( static_castsal_Int64( codepage ) ); } //- ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: dtrans/source
dtrans/source/win32/clipb/WinClipbImpl.cxx | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) New commits: commit 1e95602e5d566468ed075b1813e21ba08039b2db Author: Urs Fässler u...@bitzgi.ch Date: Thu Feb 14 16:36:06 2013 +0100 Translation of german comment Change-Id: I2876e33ccfd5dd7b33747d77a4cdaaa03bd01de9 diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index 167e889..76e4c64 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx @@ -180,16 +180,15 @@ sal_Int8 SAL_CALL CWinClipbImpl::getRenderingCapabilities( ) throw( RuntimeExce void SAL_CALL CWinClipbImpl::flushClipboard( ) throw( RuntimeException ) { -// sollte eigentlich hier stehen: ClearableMutexGuard aGuard( m_ClipContentMutex ); -// geht aber nicht, da FlushClipboard zurückruft und das DataObject -// freigibt und damit würde es einen Deadlock in onReleaseDataObject geben -// FlushClipboard muà synchron sein, damit das runterfahren ggf. erst weitergeht, -// wenn alle Clipboard-Formate gerendert wurden -// die Abfrage ist nötig, damit nur geflusht wird, wenn wir wirklich Clipboardowner -// sind (ich weiss nicht genau was passiert, wenn man flusht und nicht Clipboard -// owner ist). -// eventuell kann man aber die Abfrage in den Clipboard STA Thread verlagern, indem -// man sich dort das DataObject merkt und vor dem flushen OleIsCurrentClipboard ruft +// actually it should be ClearableMutexGuard aGuard( m_ClipContentMutex ); +// but it does not work since FlushClipboard does a callback and frees DataObject +// which results in a deadlock in onReleaseDataObject. +// FlushClipboard had to be synchron in order to prevent shutdown until all +// clipboard-formats are redered. +// The request is needed to prevent flushing if we are not clipboard owner (it is +// not known what happens if we flush but aren't clipoard owner). +// It may be possible to move the request to the clipboard STA thread by saving the +// DataObject and call OleIsCurrentClipboard bevore flushing. if ( NULL != m_pCurrentClipContent ) m_MtaOleClipboard.flushClipboard( ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits