Bug 138682 - Clipboard failure with HTML content
Summary: Clipboard failure with HTML content
Status: RESOLVED DUPLICATE of bug 116983
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-05 16:51 UTC by Telesto
Modified: 2020-12-06 10:51 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
CLP file (164.00 KB, application/octet-stream)
2020-12-05 16:51 UTC, Telesto
Details
Bibisect log (2.90 KB, text/plain)
2020-12-05 20:14 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-12-05 16:51:14 UTC
Description:
Clipboard failure with HTML content

Steps to Reproduce:
1. Download the attached clp file
2. Download Inside Clipboard
3. File -> load the downloaded clp into Inside Clipboard
4. Launch Writer
5. Right Click context menu -> Paste -> OK
6. Inside clipboard -> File -> Clear clipboard
7. File -> load the downloaded clp into Inside Clipboard
8. Right Click context menu -> Paste -> Disabled


Actual Results:
Paste disabled

Expected Results:
Able to paste


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.2.0.0.alpha0+ (x64)
Build ID: 32fdb8eb3506bc8dcf013cc713fe8e5debceb940
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL

and in
Version: 6.2.9.0.0+ (x86)
Build ID: 5f01fe15eb2661f1f9ce12d1d99dc2a705b462ee
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL
Comment 1 Telesto 2020-12-05 16:51:34 UTC
Created attachment 167851 [details]
CLP file
Comment 2 Telesto 2020-12-05 20:14:06 UTC
Created attachment 167854 [details]
Bibisect log

Bisected to
author	Julien Nabet <serval2412@yahoo.fr>	2017-06-18 22:27:12 +0200
committer	Julien Nabet <serval2412@yahoo.fr>	2017-06-18 23:16:13 +0200
commit 097de810da9ade4d25bb0c65de8269485b83ef3e (patch)
tree 0f6af373ce655e6b3130260a540897b6f898c873
parent 86bc372bf9c161ac7d17b356f8f14aeed11d5dd0 (diff)
Typo: existance->existance

https://cgit.freedesktop.org/libreoffice/core/commit/?id=097de810da9ade4d25bb0c65de8269485b83ef3e
Comment 3 Telesto 2020-12-05 20:26:21 UTC
@Julien
Apparently you're typo fix caused a regression with (Windows) clipboard. At least my bibisect leading straight to you're commit

Is it possible the logic changed somehow by the Typo correction: existance->existance

So PostItMgr.hxx "bool bCheckExistance" to "bool bCheckExistence" interfering with the file_url.hxx /core/sal/osl/w32/ "bool bCheckExistence" check - which was present before already but without 'interaction'?

Only n00b speculating..
Comment 4 Julien Nabet 2020-12-05 22:05:42 UTC
I may be wrong but I don't think the change of name has an impact here.
Here's a research of bCheckExistence in all LO code:
git grep -n bCheckExistence
sal/osl/w32/file_url.cxx:402:    bool bCheckExistence )
sal/osl/w32/file_url.cxx:435:            if ( !GetCaseCorrectPathNameEx( lpszPath, cchBuffer, nSkipLevels, bCheckExistence ) )
sal/osl/w32/file_url.cxx:443:                if ( bCheckExistence )
sal/osl/w32/file_url.cxx:497:    bool bCheckExistence
sal/osl/w32/file_url.cxx:518:            return GetCaseCorrectPathNameEx( lpszLongPath, cchBuffer, 0, bCheckExistence );
sal/osl/w32/file_url.hxx:59:    bool bCheckExistence
sw/inc/PostItMgr.hxx:147:        void            AddPostIts(bool bCheckExistence = true,bool bFocus = true);
sw/inc/PostItMgr.hxx:170:        SwSidebarItem*  InsertItem( SfxBroadcaster* pItem, bool bCheckExistence, bool bFocus);
sw/source/uibase/docvw/PostItMgr.cxx:278:SwSidebarItem* SwPostItMgr::InsertItem(SfxBroadcaster* pItem, bool bCheckExistence, bool bFocus)
sw/source/uibase/docvw/PostItMgr.cxx:280:    if (bCheckExistence)
sw/source/uibase/docvw/PostItMgr.cxx:1299:void SwPostItMgr::AddPostIts(const bool bCheckExistence, const bool bFocus)
sw/source/uibase/docvw/PostItMgr.cxx:1307:        InsertItem(pFormatField, bCheckExistence, bFocus);

It's only used as name parameter. Now I know that sometimes C++ may be tricky, so...

Do you build sources or do you use a package?
I mean, if you build sources, you may revert locally and give it a try to confirm the commit has indeed an impact.

Mike: any C++ "trick" I would have missed here on Windows part? My typo patch was quite straightforward. I didn't change some idl attribute or things like this.
Comment 5 Mike Kaganski 2020-12-06 08:09:54 UTC
(In reply to Julien Nabet from comment #4)
> Mike: any C++ "trick" I would have missed here on Windows part? My typo
> patch was quite straightforward. I didn't change some idl attribute or
> things like this.

I am 100% sure the bibisect is wrong.
Comment 6 Telesto 2020-12-06 10:21:55 UTC
(In reply to Mike Kaganski from comment #5)
> (In reply to Julien Nabet from comment #4)
> > Mike: any C++ "trick" I would have missed here on Windows part? My typo
> > patch was quite straightforward. I didn't change some idl attribute or
> > things like this.
> 
> I am 100% sure the bibisect is wrong.

And you're totally right :-(

@Julien/Mike
Sorry for the noise/annoyance I caused.. 

----

This problem looks like also to be present in 3.5. There is appears to me interaction going on with running applications (browser/Word and such) while looking at this.. bibisected it with number of apps which might influence the outcome. Sometimes I even think there is interaction between older versions.. So running 7.2 prior to say 5.4 is affecting behavior of 5.4 (but probably dreaming, makes no sense IMHO)

*** This bug has been marked as a duplicate of bug 116983 ***