Re: [core] tdf#87963: Add percentage value to new calculated compressed image size
Hi, I have the following code compressgraphicdialog.ui True False Percentage Change : 0 0 5 True False True ??? 0 1 5 Also, I have added this code in compressgraphicdialog.hxx std::unique_ptrm_xFixedText7; and this line of code in compressgraphicdialog.cxx void CompressGraphicsDialog::Initialize() { . . . m_xFixedText7 = m_xBuilder->weld_label("label-percent-change"); . . . } There are no building errors here. But when I add the following code in compressgraphicdialog.cxx void CompressGraphicsDialog::Update() { . . . m_xFixedText7->set_label("working"); . . . } It gives the following exception: Exception thrown at 0x7FF99AEF0EA6 (svxlo.dll) in soffice.bin: 0xC005: Access violation reading location 0x. occurred. Could you please tell me what is going wrong here? Regards Anshu On Mon, 24 Aug, 2020, 9:39 PM anshu khare, wrote: > Hi, > > I have the following code compressgraphicdialog.ui > > > > True > False > context="compressgraphicdialog|label10">Percentage Change : > 0 > > target="label-percent-change"/> > > > > 0 > 5 > > > >id="label-percent-change"> > True > False > True > ??? > 0 > > target="label10"/> > > > > 1 > 5 > > > > Also, I have added this code in compressgraphicdialog.hxx > > std::unique_ptrm_xFixedText7; > > > and this line of code in compressgraphicdialog.cxx > > void CompressGraphicsDialog::Initialize() > { > . > . > . > > m_xFixedText7 = m_xBuilder->weld_label("label-percent-change"); > > . > . > . > } > > There are no building errors here. > > But when I add the following code in compressgraphicdialog.cxx > > void CompressGraphicsDialog::Update() > { > . > . > . > m_xFixedText7->set_label("working"); > . > . > . > } > > It gives the following exception: > > Exception thrown at 0x7FF99AEF0EA6 (svxlo.dll) in soffice.bin: > 0xC005: Access violation reading location 0x. occurred. > > Could you please tell me what is going wrong here? > > Regards > Anshu > > On Mon, Aug 24, 2020 at 2:26 AM Jim Raykowski (via Code Review) < > ger...@gerrit.libreoffice.org> wrote: > >> Jim Raykowski has posted comments on this change. ( >> https://gerrit.libreoffice.org/c/core/+/101242 ) >> >> Change subject: tdf#87963: Add percentage value to new calculated >> compressed image size >> .. >> >> >> Patch Set 2: >> >> You could make necessary changes by directly editing >> core/svx/uiconfig/ui/compressgraphicdialog.ui or use Glade >> https://glade.gnome.org/ >> >> >> -- >> To view, visit https://gerrit.libreoffice.org/c/core/+/101242 >> To unsubscribe, or for help writing mail filters, visit >> https://gerrit.libreoffice.org/settings >> >> Gerrit-Project: core >> Gerrit-Branch: master >> Gerrit-Change-Id: I5fb87fd4d8cceb38775cb98520c0c7ba1d49bc93 >> Gerrit-Change-Number: 101242 >> Gerrit-PatchSet: 2 >> Gerrit-Owner: Anshu >> Gerrit-Reviewer: Jenkins >> Gerrit-Reviewer: Julien Nabet >> Gerrit-CC: Jim Raykowski >> Gerrit-CC: Shivam Kumar Singh >> Gerrit-CC: Tomaž Vajngerl >> Gerrit-Comment-Date: Sun, 23 Aug 2020 20:56:01 + >> Gerrit-HasComments: No >> Gerrit-Has-Labels: No >> Gerrit-MessageType: comment >> > ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org htt
Re: [core] tdf#87963: Add percentage value to new calculated compressed image size
Hi I am developing on Visual Studio. I can access .cxx and .hxx files. How can get access to .ui files (so that I can add label to compressgraphicdialog.ui) ? Regards Anshu On Mon, 24 Aug, 2020, 12:35 AM Shivam, Kumar Singh (via Code Review), < ger...@gerrit.libreoffice.org> wrote: > Shivam, Kumar Singh has posted comments on this change. ( > https://gerrit.libreoffice.org/c/core/+/101242 ) > > Change subject: tdf#87963: Add percentage value to new calculated > compressed image size > .. > > > Patch Set 2: > > The correct way to do this would be to add a new label say > "label-new-percentage" in the svx/ui/compressgraphicdialog.ui file right > next to where the label for the current size is added. > After that declare a new label similar to m_xFixedText6 in > compressgraphicdialog.hxx and initialise it > something like this in the cxx file > > " m_xFixedPercentage = m_xBuilder->weld_label("label-new-percentage"); " > > and add the new calculated percentage to this label using set_label(). > Do you get my point? > > There might be a better way to do this, but this is what i would have > done. I am adding Tomaz as a reviewer he might be able to judge this idea. > > > -- > To view, visit https://gerrit.libreoffice.org/c/core/+/101242 > To unsubscribe, or for help writing mail filters, visit > https://gerrit.libreoffice.org/settings > > Gerrit-Project: core > Gerrit-Branch: master > Gerrit-Change-Id: I5fb87fd4d8cceb38775cb98520c0c7ba1d49bc93 > Gerrit-Change-Number: 101242 > Gerrit-PatchSet: 2 > Gerrit-Owner: Anshu > Gerrit-Reviewer: Jenkins > Gerrit-Reviewer: Julien Nabet > Gerrit-CC: Shivam, Kumar Singh > Gerrit-CC: Tomaž Vajngerl > Gerrit-Comment-Date: Sun, 23 Aug 2020 19:04:51 + > Gerrit-HasComments: No > Gerrit-Has-Labels: No > Gerrit-MessageType: comment > ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [core] tdf#87963: Add percentage value to new calculated compressed image size
On Mon, 24 Aug 2020 at 00:30, anshu khare wrote: > To show it in UI we have to create another label and display it over > there. > > Could u please tell me how to it? > > Please look for my comment on your patch. sincerely, Shivam Kumar Singh ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [core] tdf#87963: Add percentage value to new calculated compressed image size
To show it in UI we have to create another label and display it over there. Could u please tell me how to it? Regards Anshu On Sun, 23 Aug, 2020, 11:57 PM Julien Nabet (via Code Review), < ger...@gerrit.libreoffice.org> wrote: > Julien Nabet has posted comments on this change. ( > https://gerrit.libreoffice.org/c/core/+/101242 ) > > Change subject: tdf#87963: Add percentage value to new calculated > compressed image size > .. > > > Patch Set 2: Code-Review-2 > > I'm not an expert but the main problem I see is you use "printf". The goal > of the bugtracker is to display the information on UI not on a console. > > > -- > To view, visit https://gerrit.libreoffice.org/c/core/+/101242 > To unsubscribe, or for help writing mail filters, visit > https://gerrit.libreoffice.org/settings > > Gerrit-Project: core > Gerrit-Branch: master > Gerrit-Change-Id: I5fb87fd4d8cceb38775cb98520c0c7ba1d49bc93 > Gerrit-Change-Number: 101242 > Gerrit-PatchSet: 2 > Gerrit-Owner: Anshu > Gerrit-Reviewer: Jenkins > Gerrit-Reviewer: Julien Nabet > Gerrit-Comment-Date: Sun, 23 Aug 2020 18:27:20 + > Gerrit-HasComments: No > Gerrit-Has-Labels: Yes > Gerrit-MessageType: comment > ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice