Bug 125969 - Background image, previously imported by user, not visible as a bitmap thumbnail when file reopened
Summary: Background image, previously imported by user, not visible as a bitmap thumbn...
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.beta1+
Hardware: All All
: low minor
Assignee: Tushar Kumar Rai
URL:
Whiteboard:
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
: 134259 (view as bug list)
Depends on:
Blocks: Area-Fill-Tab-Bitmap
  Show dependency treegraph
 
Reported: 2019-06-17 16:31 UTC by Volga
Modified: 2021-02-26 16:32 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file (225.89 KB, application/vnd.oasis.opendocument.text)
2019-06-17 16:33 UTC, Volga
Details
My snapshot (398.70 KB, image/png)
2019-06-17 16:35 UTC, Volga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2019-06-17 16:31:02 UTC
Description:
While Writer load background image from document, open the Page Style dialog, click Area tab, the image can be seen at the Preview area, but can’t be seen at the Bitmap list, making it impossible to switch back if this image is replaced by other image and before the document is saved.

Steps to Reproduce:
1. Open Wood.odt from my attachment
2. Click Format -> Page -> Area

Actual Results:
The wooden background can be seen at the Preview, but it can’t be seen at the Bitmap list.

Expected Results:
The wooden background should also available at the Bitmap list. If this image is replaced by another image, the document is saved, and Writer is closed, this image can be dropped from the Bitmap list.


Reproducible: Always


User Profile Reset: No



Additional Info:
版本: 6.3.0.0.beta1 (x64)
Build ID: a187af327633f5f00363be5131bd21a13e0f1a7b
CPU 线程: 4; 操作系统: Windows 10.0; UI 渲染: 默认; VCL: win; 
区域语言: zh-CN (zh_CN); UI 语言: zh-CN
Calc: threaded
Comment 1 Volga 2019-06-17 16:33:36 UTC
Created attachment 152249 [details]
Sample file
Comment 2 Volga 2019-06-17 16:35:56 UTC
Created attachment 152250 [details]
My snapshot

This is my snapshot, notice that the Page Style dialog is resized to larger size.
Comment 3 Julien Nabet 2019-06-17 19:41:47 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

I suppose a good start should be in this file:
https://opengrok.libreoffice.org/xref/core/cui/source/tabpages/tpbitmap.cxx
Comment 4 Xisco Faulí 2019-06-28 14:54:19 UTC
(In reply to Julien Nabet from comment #3)
> On pc Debian x86-64 with master sources updated today, I could reproduce
> this.
> 
> I suppose a good start should be in this file:
> https://opengrok.libreoffice.org/xref/core/cui/source/tabpages/tpbitmap.cxx

Let's turn this into an easyhack then...
Comment 5 duuxixu 2020-04-13 08:32:38 UTC
I am familiar with this problem and I can solve it.
Comment 6 Timur 2020-06-25 12:35:14 UTC
*** Bug 134259 has been marked as a duplicate of this bug. ***
Comment 7 R. Green 2020-08-08 12:51:14 UTC
Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded

Bug still present in this version.
Comment 8 Xisco Faulí 2021-02-09 14:42:27 UTC Comment hidden (obsolete)
Comment 9 Tushar Kumar Rai 2021-02-26 16:32:16 UTC
Hello
I want to work on this bug.
Progress made in solving the bug-
 
In file cui/source/tabpages/tpbitmap.cxx
 
SvxBitmapTabPage::Reset performs the actions when user clicks on the bitmap section in Format->PageStyle->Area tab .
 
IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyBitmapHdl, ValueSet*, void) performs actions when user clicks on the default bitmaps present and add the bitmap into the preview .
 
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, weld::Button&, void) performs actions when user clicks on add/import button and new image is added in the bitmaps.
 
The idea to solve the bug is to get the image from the background and add it into the bitmaps and into the preview which can't be done in the file cui/source/tabpages/tpbitmap.cxx
because no idea of how to retrieve the background image.

This is the idea i could think of with the pointers(cui/source/tabpages/tpbitmap.cxx) provided in the bug.
Correct me if i am wrong at any point and please provide more pointers or some guidance to solve the bug.