Issue 122388

Summary: 'Paste Special - As Bitmap' pastes rectangle with page width
Product: General Reporter: Rainer Bielefeld <rainerbielefeld_ooo_qa>
Component: uiAssignee: AOO issues mailing list <issues>
Status: RESOLVED FIXED QA Contact:
Severity: Normal    
Priority: P3 CC: Armin.Le.Grand, elish, issues
Version: 4.0.0-devKeywords: regression
Target Milestone: 4.0.0   
Hardware: All   
OS: Windows 7   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Description Flags
Sample Document none

Description Rainer Bielefeld 2013-05-27 04:41:44 UTC
Created attachment 80730 [details]
Sample Document

Steps how to reproduce with server installation of  "AOO 4.0.0-Dev – English UI / German locale [AOO400m2(Build:9701) -   Rev. 1485784 Rev.1485289 (2013-05-24)]" on WIN7 Home Premium (64bit)", Common 4.0 Trunk User Profile:

1. From OOo start center open new Draw document
2. Draw 'Drawing Toolbar -> Symbol Shapes -> Filled Rectangle' 60x30mm 
   (width x height)
3. click rectangle
4. <control+c> for Copy
5. Menu 'Edit -> Paste Special -> Bimap'
   Expected: width as source shape
   Actual: full page width (A4 Portrait) 
7. Menu 'Format -> Page -> Landscape'
8. Redo from Step 3! Now bitmap will be even bigger with landscape page width

Additional Info
a) Already Reproducible  with server installation of  " AOO 4.0.0-Dev  – English UI / German locale [AOO400m1(Build:9700) - Rev. 1457992 - Rev.1457606]" on WIN7 Home Premium (64bit)", own separate user profile.
b)Same when I paste special to new blank Writer document
d) but not when I copy / paste special as Bitmap rectangle from writer to Draw
e) not all Shapes affected, smiley, square and most others work fine
f) That problem might be not 100% reproducible. It seemed it worked for me 
   at least 1 time with an unfilled rectangle. Additionally 1 time I got a
   placeholder instead of a rectangle after paste-special. Some more research
   might be useful.
g) worked fine with 3.4.1, so Regression
h) you can easily reproduce with attached sample document. Small black 
   rectangle is source shape, big rectangle is result of my paste special
Comment 1 Edwin Sharp 2013-05-27 12:23:28 UTC
Symbol Shapes has:
Smiley Face, Sun, Moon, Lightning Bolt, Heart, Flower, Cloud, "Prohibited" Symbol, Puzzle, Double Bracket, Left Bracket, Right Bracket, Double Brace, Left Brace, Right Brace, Square Bevel, Octagon Bevel, Diamond Bevel.

No "Filled Rectangle".

Rev. 1479897
Comment 2 Rainer Bielefeld 2013-05-27 14:07:47 UTC
@Edwin Sharp 
So it is, I wanted to write 'Basic Shapes', Symbol Shapes is nonsense.
Comment 3 Armin Le Grand 2013-05-29 16:03:57 UTC
ALG: The MapMode is wrong (on pixels) after creation. It sohould be on 100th mm and fits to the pref size which is set correctly. It gets 'corrected' to this in TransferableDataHelper::GetBitmapEx in svtools/source/misc/transfer.cxx|1853 where a fix of #110748# is applied.
Comment 4 Armin Le Grand 2013-05-29 16:07:14 UTC
ALG: That BugID is from an older Bugtracker and the content is no longer reachable. Nonetheless, the text at the fix claims to repair when bigger than 50 cm, but the implementation checks for 5 cm (which is 5000 100th mm). Since we do not really know what that fix did, I would opt to change that value to the ones described in the text of the fix.
Comment 5 Armin Le Grand 2013-05-29 16:16:31 UTC
ALG: Works as expected, comitting, done.
Also added to change the PrefSize to the target mapping and correct that, too.
Comment 6 SVN Robot 2013-05-29 16:21:05 UTC
"alg" committed SVN revision 1487531 into trunk:
i122388 Corrected old fix to mentioned bounds