Issue 122388 - 'Paste Special - As Bitmap' pastes rectangle with page width
'Paste Special - As Bitmap' pastes rectangle with page width
Status: RESOLVED FIXED
Product: General
Classification: Code
Component: ui
4.0.0-dev
All Windows 7
: P3 normal (vote)
: 4.0.0
Assigned To: AOO issues mailing list
: regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-27 04:41 UTC by Rainer Bielefeld
Modified: 2013-07-12 16:40 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation on: ---
Developer Difficulty: ---


Attachments
Sample Document (9.11 KB, application/vnd.oasis.opendocument.graphics)
2013-05-27 04:41 UTC, Rainer Bielefeld
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
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