[GSoC Draft Proposal] Support animated PDF

2019-03-31 Thread Ahmad Osama
Hello all,

I would like to express my interest in joining Okular this year in Google
Summer of Code, I liked the project of Supporting animated PDF.

I have been investigating in how to add this new support to Okular and I
prepared this draft proposal:
https://docs.google.com/document/d/1yaDVRMMenL_Ju1iiK05vWUwi6uR64JOtbFsVadd35cc/edit?usp=sharing

This proposal is still being edited as I am still investigating, so I would
appreciate your suggestions and comments.

Best Regards,
Ahmad Osama


D16285: Remember printing option and print range in the print dialog

2018-10-26 Thread Ahmad Osama
ahmadosama updated this revision to Diff 44260.
ahmadosama added a comment.


  - Changing variables, function names and comments to be more meaningful

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16285?vs=44043&id=44260

BRANCH
  remember_print_range

REVISION DETAIL
  https://phabricator.kde.org/D16285

AFFECTED FILES
  core/document.cpp
  core/document.h
  core/document_p.h
  part.cpp

To: ahmadosama, #okular
Cc: aacid, yurchor, broulik, ngraham, okular-devel


D16285: Remember printing option and print range in the print dialog

2018-10-21 Thread Ahmad Osama
ahmadosama added a comment.


  In D16285#346944 , @aacid wrote:
  
  > In D16285#346879 , @ahmadosama 
wrote:
  >
  > > In D16285#346864 , @aacid 
wrote:
  > >
  > > > If you're not going to save the data, why are you adding it to  the 
docinfo xml?
  > > >
  > > > If this is only for remembering the options while okular is open i 
don't even think it makes sense storing it into document at all and should just 
be stored in Part  as something like a QMap
  > >
  > >
  > > I am adding the data to the docinfo xml to remember those data when the 
file is reopened even after closing Okular the printing data would be 
remembered for the same file.
  >
  >
  > But you just said "I reset the printing options when closing the document".
  >
  > So I'm confused.
  >
  > Is the plan to remember options between different Okular executions or is 
it no?
  
  
  I apologize for my confusing comments.
  Yes, the plan is to remember printing options between different executions 
similar to remembering the document rotation.
  
  The problem in my first patch was that if I have an opened document X and 
then close this document,
  and opened another document Y the printing options of X will be used in Y, so 
I added this part
  
d->m_printRangeOption = QPrinter::AllPages;
d->m_printFrom = -1;
d->m_printTo = -1;
  
  similar to what is done to the rotation:
  
d->m_rotation = Rotation0;
  
  to restore the printing options to the default values.
  This is what I meant by resetting and I apologize again for not being clear.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D16285

To: ahmadosama, #okular
Cc: aacid, yurchor, broulik, ngraham, okular-devel


D16285: Remember printing option and print range in the print dialog

2018-10-21 Thread Ahmad Osama
ahmadosama added a comment.


  @yurchor 
  I have reformatted the code to be consistent, sorry for this.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D16285

To: ahmadosama, #okular
Cc: aacid, yurchor, broulik, ngraham, okular-devel


D16285: Remember printing option and print range in the print dialog

2018-10-21 Thread Ahmad Osama
ahmadosama updated this revision to Diff 44043.
ahmadosama added a comment.


  - Reformat other parts of the code

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16285?vs=44041&id=44043

BRANCH
  remember_print_range

REVISION DETAIL
  https://phabricator.kde.org/D16285

AFFECTED FILES
  core/document.cpp
  core/document.h
  core/document_p.h
  part.cpp

To: ahmadosama, #okular
Cc: aacid, yurchor, broulik, ngraham, okular-devel


D16285: Remember printing option and print range in the print dialog

2018-10-21 Thread Ahmad Osama
ahmadosama updated this revision to Diff 44041.
ahmadosama added a comment.


  - Reformatting the code to be consistent with other parts

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16285?vs=44036&id=44041

BRANCH
  remember_print_range

REVISION DETAIL
  https://phabricator.kde.org/D16285

AFFECTED FILES
  core/document.cpp
  core/document.h
  core/document_p.h
  part.cpp

To: ahmadosama, #okular
Cc: aacid, yurchor, broulik, ngraham, okular-devel


D16285: Remember printing option and print range in the print dialog

2018-10-21 Thread Ahmad Osama
ahmadosama added a comment.


  In D16285#346864 , @aacid wrote:
  
  > If you're not going to save the data, why are you adding it to  the docinfo 
xml?
  >
  > If this is only for remembering the options while okular is open i don't 
even think it makes sense storing it into document at all and should just be 
stored in Part  as something like a QMap
  
  
  I am adding the data to the docinfo xml to remember those data when the file 
is reopened even after closing Okular the printing data would be remembered for 
the same file.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D16285

To: ahmadosama, #okular
Cc: aacid, yurchor, broulik, ngraham, okular-devel


D16285: Remember printing option and print range in the print dialog

2018-10-21 Thread Ahmad Osama
ahmadosama added a comment.


  In D16285#344990 , @ngraham wrote:
  
  > This new information is saved/remembered per-document and not globally, 
right?
  
  
  The new information was saved for all documents if Okular was not closed, 
closing the document only did not reset the printing options.
  I reset the printing options when closing the document to avoid printing 
options from being stored for all opened documents before closing Okular.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D16285

To: ahmadosama, #okular
Cc: broulik, ngraham, okular-devel, aacid


D16285: Remember printing option and print range in the print dialog

2018-10-21 Thread Ahmad Osama
ahmadosama updated this revision to Diff 44036.
ahmadosama added a comment.


  - Resetting the printing option to the default options when closing document

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D16285?vs=43825&id=44036

BRANCH
  remember_print_range

REVISION DETAIL
  https://phabricator.kde.org/D16285

AFFECTED FILES
  core/document.cpp
  core/document.h
  core/document_p.h
  part.cpp

To: ahmadosama, #okular
Cc: broulik, ngraham, okular-devel, aacid


D16285: Remember printing option and print range in the print dialog

2018-10-17 Thread Ahmad Osama
ahmadosama retitled this revision from "Allow saving loading the printing 
option and range, missing to get data from the print dialog to save" to 
"Remember printing option and print range in the print dialog".
ahmadosama edited the summary of this revision.
ahmadosama added a reviewer: Okular.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D16285

To: ahmadosama, #okular
Cc: okular-devel, ngraham, aacid


D16285: Allow saving loading the printing option and range, missing to get data from the print dialog to save

2018-10-17 Thread Ahmad Osama
ahmadosama created this revision.
Herald added a project: Okular.
Herald added a subscriber: okular-devel.
ahmadosama requested review of this revision.

REVISION SUMMARY
  Allowing document to remember print range option, and remember from/to print 
range

REPOSITORY
  R223 Okular

BRANCH
  remember_print_range

REVISION DETAIL
  https://phabricator.kde.org/D16285

AFFECTED FILES
  core/document.cpp
  core/document.h
  core/document_p.h
  part.cpp

To: ahmadosama
Cc: okular-devel, ngraham, aacid


D14740: Fix problem of saving pdf switches from thumbnail view in sidebar to contents view

2018-08-12 Thread Ahmad Osama
ahmadosama added a comment.


  I updated the parttest.cpp, the tocreload.pdf file in the data directory 
reproduced this bug so I used it for the unit test.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D14740

To: ahmadosama, #okular
Cc: aacid, okular-devel, ngraham


D14740: Fix problem of saving pdf switches from thumbnail view in sidebar to contents view

2018-08-12 Thread Ahmad Osama
ahmadosama updated this revision to Diff 39544.
ahmadosama added a comment.


  - Adding a unit test to check that document doesnot go back to contents view 
after saving

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14740?vs=39543&id=39544

BRANCH
  returning_to_contents_when_saving_bug (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D14740

AFFECTED FILES
  autotests/parttest.cpp
  part.cpp
  ui/sidebar.h

To: ahmadosama, #okular
Cc: aacid, okular-devel, ngraham


D14740: Fix problem of saving pdf switches from thumbnail view in sidebar to contents view

2018-08-12 Thread Ahmad Osama
ahmadosama updated this revision to Diff 39543.
ahmadosama added a comment.


  - Adding a unit test to check that document doesnot go back to contents view 
after saving

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D14740?vs=39438&id=39543

BRANCH
  returning_to_contents_when_saving_bug (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D14740

AFFECTED FILES
  autotests/parttest.cpp
  part.cpp
  ui/sidebar.h

To: ahmadosama, #okular
Cc: aacid, okular-devel, ngraham


D14740: Fix problem of saving pdf switches from thumbnail view in sidebar to contents view

2018-08-11 Thread Ahmad Osama
ahmadosama edited the summary of this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D14740

To: ahmadosama, #okular
Cc: okular-devel, ngraham, aacid


D14740: Fix problem of saving pdf switches from thumbnail view in sidebar to contents view

2018-08-11 Thread Ahmad Osama
ahmadosama added a reviewer: Okular.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D14740

To: ahmadosama, #okular
Cc: okular-devel, ngraham, aacid


D14740: Fix problem of saving pdf switches from thumbnail view in sidebar to contents view

2018-08-11 Thread Ahmad Osama
ahmadosama edited the summary of this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D14740

To: ahmadosama
Cc: okular-devel, ngraham, aacid


D14740: Fix problem of saving pdf switches from thumbnail view in sidebar to contents view

2018-08-11 Thread Ahmad Osama
ahmadosama edited the summary of this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D14740

To: ahmadosama
Cc: okular-devel, ngraham, aacid


D14740: Fix problem of saving pdf switches from thumbnail view in sidebar to contents view

2018-08-11 Thread Ahmad Osama
ahmadosama edited the summary of this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D14740

To: ahmadosama
Cc: okular-devel, ngraham, aacid


D14740: Fix problem of saving pdf switches from thumbnail view in sidebar to contents view

2018-08-11 Thread Ahmad Osama
ahmadosama created this revision.
Restricted Application added a project: Okular.
Restricted Application added a subscriber: okular-devel.
ahmadosama requested review of this revision.

REPOSITORY
  R223 Okular

BRANCH
  returning_to_contents_when_saving_bug (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D14740

AFFECTED FILES
  part.cpp

To: ahmadosama
Cc: okular-devel, ngraham, aacid


D10932: [Okular] Option to reset forms

2018-04-18 Thread Ahmad Osama
ahmadosama added a comment.


  I agree with what you have said, and I was thinking about some of it.
  Closing the feature will not upset me, I have learned a lot from working on 
it.
  I hope that I could make better contributions to Okular later.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10932

To: ahmadosama, #okular, aacid
Cc: cfeck, ngraham, aacid, #okular, michaelweghorn


D11901: [Okular] Bug 387282: Highlighting of search results lost when rotating page

2018-04-18 Thread Ahmad Osama
ahmadosama added a comment.


  I will investigate more to find out why m_rects and m_highlights need 
different transformation matrices.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D11901

To: ahmadosama, #okular, aacid
Cc: aacid, ngraham, #okular, michaelweghorn


D11901: [Okular] Bug 387282: Highlighting of search results lost when rotating page

2018-04-11 Thread Ahmad Osama
ahmadosama updated this revision to Diff 31856.
ahmadosama added a comment.


  I used Okular::buildRotationMatrix to rotate the highlights, the rotation 
angle is specified in the rotateAt function

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11901?vs=31291&id=31856

BRANCH
  HighlightTextBug (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D11901

AFFECTED FILES
  core/page.cpp

To: ahmadosama, #okular
Cc: aacid, ngraham, #okular, michaelweghorn


D11901: [Okular] Bug 387282: Highlighting of search results lost when rotating page

2018-04-10 Thread Ahmad Osama
ahmadosama added a comment.


  As far as I know rotating m_page->m_rects should rotate annotations on the 
page, the annotations seem to work well when rotating them.
  
  When rotating the highlights I tried to replace:
  (*hlIt)->transform( RotationJob::rotationMatrix( oldRotation, m_rotation ) );
  with
  (*hlIt)->transform( matrix );
  
  but highlights were rotated correctly only from the original orientation.
  
  I am thinking of creating another function to get the rotation matrix for the 
highlights, or modify the Okular::buildRotationMatrix
  as follows Okular::buildRotationMatrix(Rotation oldRotation = Rotation0, 
Rotation newRotation)
  
  I am still going through the code to find a better way to solve this bug.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D11901

To: ahmadosama, #okular
Cc: aacid, ngraham, #okular, michaelweghorn


D11901: [Okular] Bug 387282: Highlighting of search results lost when rotating page

2018-04-10 Thread Ahmad Osama
ahmadosama added a comment.


  I have not tested it, I do not know what on the page should be rotated when 
rotating m_page->m_rects, I still trying to find out.
  What I did is that I replaced:
   (*hlIt)->transform( RotationJob::rotationMatrix( oldRotation, m_rotation ) );
  with:
  (*hlIt)->transform( matrix );
  but the highlights were rotated correctly only from the original position.
  
  But, I think that m_page->m_rects may not be rotated correctly because 
Okular::buildRotationMatrix(Rotation rotation), rotates only based on the new 
rotation and does not consider what the previous rotation was.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D11901

To: ahmadosama, #okular
Cc: aacid, ngraham, #okular, michaelweghorn


D11901: [Okular] Bug 387282: Highlighting of search results lost when rotating page

2018-04-07 Thread Ahmad Osama
ahmadosama added a comment.


  I tried rotating using ( const QTransform matrix = rotationMatrix() ) but it 
only works when rotating a page from its original orientation, this is why I 
modified the RotationJob::rotationMatrix in a way similar to 
Okular::buildRotationMatrix to allow rotating from different orientations.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D11901

To: ahmadosama, #okular
Cc: aacid, ngraham, #okular, michaelweghorn


D11901: [Okular] Bug 387282: Highlighting of search results lost when rotating page

2018-04-04 Thread Ahmad Osama
ahmadosama updated this revision to Diff 31291.
ahmadosama added a comment.


  I added the boolean parameter to either translate or not.

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D11901?vs=31202&id=31291

BRANCH
  HighlightTextBug (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D11901

AFFECTED FILES
  core/page.cpp
  core/rotationjob.cpp
  core/rotationjob_p.h

To: ahmadosama, #okular
Cc: aacid, ngraham, #okular, michaelweghorn


D11901: [Okular] Bug 387282: Highlighting of search results lost when rotating page

2018-04-04 Thread Ahmad Osama
ahmadosama added a comment.


  Oh yes this may break it, I am thinking of adding another Boolean parameter 
to the RotationJob::rotationMatrix function with a default value of false to 
either translate or not
  The function can be:
  RotationJob::rotationMatrix( Rotation from, Rotation to, bool translate = 
false )

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D11901

To: ahmadosama, #okular
Cc: aacid, ngraham, #okular, michaelweghorn


D10932: [Okular] Option to reset forms

2018-04-03 Thread Ahmad Osama
ahmadosama updated this revision to Diff 31204.
ahmadosama added a comment.


  Removing white spaces.

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10932?vs=29771&id=31204

REVISION DETAIL
  https://phabricator.kde.org/D10932

AFFECTED FILES
  autotests/CMakeLists.txt
  autotests/resetformstest.cpp
  core/document.cpp
  core/document.h
  core/documentcommands.cpp
  core/documentcommands_p.h
  part.rc
  ui/pageview.cpp
  ui/pageview.h

To: ahmadosama, #okular, aacid
Cc: cfeck, ngraham, aacid, #okular, michaelweghorn


D11901: [Okular] Bug 387282: Highlighting of search results lost when rotating page

2018-04-03 Thread Ahmad Osama
ahmadosama added a reviewer: Okular.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D11901

To: ahmadosama, #okular
Cc: #okular, michaelweghorn, ngraham, aacid


D11901: [Okular] Bug 387282: Highlighting of search results lost when rotating page

2018-04-03 Thread Ahmad Osama
ahmadosama created this revision.
Restricted Application added a subscriber: Okular.
Restricted Application added a project: Okular.
ahmadosama requested review of this revision.

REVISION SUMMARY
  The highlights were removed when rotating the page, also the 
RotaionJob::rotationMatrix function was not rotating the Highlihgts correctly.
  I removed the deletion and modified the rotaionMatrix function by making it 
shorter and adding a translation after the rotatin. I tried different rotations 
and they are working fine.
  BUG: 387282

REPOSITORY
  R223 Okular

BRANCH
  HighlightTextBug (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D11901

AFFECTED FILES
  core/page.cpp
  core/rotationjob.cpp

To: ahmadosama
Cc: #okular, michaelweghorn, ngraham, aacid


Re: GSoC Project: Verifying signatures of pdf files (Draft Proposal)

2018-03-17 Thread Ahmad Osama
I edited my proposal after researching how Adobe Acrobat implements the UI
and made some modifications to my plan.
I would appreciate any feedback regarding my proposal.

Regards,

On Fri, Mar 9, 2018 at 6:55 PM, Ahmad Osama 
wrote:

> Dear All;
>
> I am interested to participate with Okular in GSoC, I have written a draft
> proposal about the project I am interested to join.
>
> Here is the link to my proposal:
>
> https://docs.google.com/document/d/1DIQBvzPjuw8HdqEB0qXt4nkQ05bF_
> AV9_6kyrRcdJW8/edit?usp=sharing
>
> I am still going through Okular and Poppler's source code to get a better
> understanding and develop a better implementation plan.
>
> Any feedback or suggestions are highly appreciated.
>
> Regards,
> Ahmad Osama
>


D10932: [Okular] Option to reset forms

2018-03-17 Thread Ahmad Osama
ahmadosama updated this revision to Diff 29771.
ahmadosama added a comment.


  I have done the required changes.
  I created the EditWidgetsCommand class to undo/redo the reset action of all 
widgets by a single click, also I moved the core implementation of the reset 
function to the Document class, and I updated the reset auto test to include 
the undo/redo and the test is working fine on the created tests.

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10932?vs=29396&id=29771

REVISION DETAIL
  https://phabricator.kde.org/D10932

AFFECTED FILES
  autotests/CMakeLists.txt
  autotests/resetformstest.cpp
  core/document.cpp
  core/document.h
  core/documentcommands.cpp
  core/documentcommands_p.h
  part.cpp
  part.h
  part.rc
  ui/pageview.cpp
  ui/pageview.h

To: ahmadosama, #okular, aacid
Cc: ngraham, aacid, #okular, michaelweghorn


D10932: [Okular] Option to reset forms

2018-03-15 Thread Ahmad Osama
ahmadosama added inline comments.

INLINE COMMENTS

> aacid wrote in part.cpp:3359
> I don't think that's a good idea, do you think resetting the forms is as 
> common as showing/hiding them?

I am going to remove it, the user will be able to trigger the reset action from 
the "view" drop down menu in the menu bar.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10932

To: ahmadosama, #okular, aacid
Cc: ngraham, aacid, #okular, michaelweghorn


D10932: [Okular] Option to reset forms

2018-03-14 Thread Ahmad Osama
ahmadosama added a comment.


  Regarding the undo/redo stacks, the undo/redo command will not undo the whole 
reset, it will undo widgets somehow randomly.
  RadioButtons in the same page will be in the same undo command, as for 
TextLineEdit each single widget will be added separately to the undo/redo stack.
  
  So triggering the reset action will result in adding several commands to the 
undo stack not just one, I am currently thinking of how to make the whole undo 
in a single command in the stack.
  
  Also, the "Reset Forms" and "Show Forms/Hide Forms" buttons are stacked 
beside each other, the user can easily mistake by clicking the "Reset" button 
instead of the "Show Forms" Button.
  I am currently thinking about fixing this too.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10932

To: ahmadosama, #okular, aacid
Cc: ngraham, aacid, #okular, michaelweghorn


D10932: [Okular] Option to reset forms

2018-03-14 Thread Ahmad Osama
ahmadosama added inline comments.

INLINE COMMENTS

> aacid wrote in resetformstest.cpp:182
> what does this test do?

This test is to make sure that the reset button is working correctly.

> aacid wrote in part.cpp:3359
> Why did you add this?

I added it to show the "reset forms" button in the displayed message, beside 
the "Show Forms" button.

> aacid wrote in pageview.cpp:731
> Why are you calling this?

I am going to remove it, I was writing code similar to that of the toggle forms 
action when I started working on this option.

> aacid wrote in pageview.cpp:4333
> why do you set the text every single time this is called  instead of on 
> construction time?

Oh yes, I am going to edit this.

> aacid wrote in pageview.cpp:4433
> What's the point of all this one single line functions?

I did this so that if I want to change the reset function's implementation 
later,  
anyway I am going to remove those functions.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10932

To: ahmadosama, #okular, aacid
Cc: ngraham, aacid, #okular, michaelweghorn


Re: D10504: Bug 288042 - Option to reset forms

2018-03-14 Thread Ahmad Osama
yes I am going to cancel this revision.

On Wed, Mar 14, 2018 at 12:49 AM, Albert Astals Cid <
nore...@phabricator.kde.org> wrote:

> aacid added a comment. View Revision 
>
> So will you cancel this one in favor of the other one?
>
> *REPOSITORY*
> R223 Okular
>
> *REVISION DETAIL*
> https://phabricator.kde.org/D10504
>
> *To: *ahmadosama, aacid
> *Cc: *aacid, ngraham, Okular, michaelweghorn
>


[okular] [Bug 288042] Option to reset forms (PDF)

2018-03-13 Thread Ahmad Osama
https://bugs.kde.org/show_bug.cgi?id=288042

--- Comment #9 from Ahmad Osama  ---
I created an auto-test for this option that is working fine on the created test
cases, the new test along with the implementation for this option are in this
patch:

https://phabricator.kde.org/D10932

-- 
You are receiving this mail because:
You are the assignee for the bug.

D10932: [Okular] Option to reset forms

2018-03-13 Thread Ahmad Osama
ahmadosama updated this revision to Diff 29396.
ahmadosama edited the test plan for this revision.
ahmadosama added a comment.


  I added an auto-test for this option, the test is working fine on all the 
created test cases.

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10932?vs=29292&id=29396

REVISION DETAIL
  https://phabricator.kde.org/D10932

AFFECTED FILES
  autotests/CMakeLists.txt
  autotests/resetformstest.cpp
  part.cpp
  part.h
  part.rc
  ui/pageview.cpp
  ui/pageview.h

To: ahmadosama, #okular
Cc: ngraham, aacid, #okular, michaelweghorn


D10932: [Okular] Option to reset forms

2018-03-13 Thread Ahmad Osama
ahmadosama retitled this revision from "Bug 288042 - Option to reset forms 
(Implemented using FormFields)" to "[Okular] Option to reset forms".
ahmadosama edited the summary of this revision.
ahmadosama edited the test plan for this revision.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10932

To: ahmadosama, #okular
Cc: ngraham, aacid, #okular, michaelweghorn


D10932: Bug 288042 - Option to reset forms (Implemented using FormFields)

2018-03-11 Thread Ahmad Osama
ahmadosama updated this revision to Diff 29292.

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10932?vs=29263&id=29292

REVISION DETAIL
  https://phabricator.kde.org/D10932

AFFECTED FILES
  autotests/CMakeLists.txt
  autotests/resetformstest.cpp
  part.cpp
  part.h
  part.rc
  ui/pageview.cpp
  ui/pageview.h

To: ahmadosama, #okular
Cc: ngraham, aacid, #okular, michaelweghorn


D10932: Bug 288042 - Option to reset forms (Implemented using FormFields)

2018-03-11 Thread Ahmad Osama
ahmadosama updated this revision to Diff 29263.

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10932?vs=28717&id=29263

REVISION DETAIL
  https://phabricator.kde.org/D10932

AFFECTED FILES
  autotests/CMakeLists.txt
  autotests/resetformstest.cpp
  part.cpp
  part.h
  part.rc
  ui/pageview.cpp
  ui/pageview.h

To: ahmadosama, #okular
Cc: ngraham, aacid, #okular, michaelweghorn


GSoC Project: Verifying signatures of pdf files (Draft Proposal)

2018-03-09 Thread Ahmad Osama
Dear All;

I am interested to participate with Okular in GSoC, I have written a draft
proposal about the project I am interested to join.

Here is the link to my proposal:

https://docs.google.com/document/d/1DIQBvzPjuw8HdqEB0qXt4nkQ05bF_AV9_6kyrRcdJW8/edit?usp=sharing

I am still going through Okular and Poppler's source code to get a better
understanding and develop a better implementation plan.

Any feedback or suggestions are highly appreciated.

Regards,
Ahmad Osama


D10932: Bug 288042 - Option to reset forms (Implemented using FormFields)

2018-03-08 Thread Ahmad Osama
ahmadosama added a reviewer: Okular.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10932

To: ahmadosama, #okular
Cc: ngraham, aacid, #okular, michaelweghorn


D10932: Bug 288042 - Option to reset forms (Implemented using FormFields)

2018-03-05 Thread Ahmad Osama
ahmadosama updated this revision to Diff 28717.
ahmadosama added a comment.


  I mistakenly replaced the code with the auto test.
  I edited the patch now.

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10932?vs=28622&id=28717

REVISION DETAIL
  https://phabricator.kde.org/D10932

AFFECTED FILES
  autotests/resetformstest.cpp
  part.cpp
  part.rc
  ui/pageview.cpp
  ui/pageview.h

To: ahmadosama
Cc: ngraham, aacid, #okular, michaelweghorn


D10932: Bug 288042 - Option to reset forms (Implemented using FormFields)

2018-03-05 Thread Ahmad Osama
ahmadosama added a comment.


  I mistakenly replaced the code with the auto test.
  Here is the previous patch.
  
  F5741409: 0001-reimplementing-the-reset-option-using-formfields.patch 


REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10932

To: ahmadosama
Cc: ngraham, aacid, #okular, michaelweghorn


GSoC Project: Verifying signatures of pdf files (Requirements)

2018-03-04 Thread Ahmad Osama
Dear All;

I am exited to contribute to Okular this year in GSoC and I am interested
in the project of Verifying signatures of pdf files. I have submitted a
patch in a junior job to add an option to reset pdf forms.

I went through what I have studied in Computer Security and I am currently
going through poppler's APIs.

I would like to know if there are other requirements that I need to know to
get more familiar with the project.

Regards,
Ahmad Osama


[okular] [Bug 288042] Option to reset forms (PDF)

2018-03-04 Thread Ahmad Osama
https://bugs.kde.org/show_bug.cgi?id=288042

--- Comment #8 from Ahmad Osama  ---
Created attachment 83
  --> https://bugs.kde.org/attachment.cgi?id=83&action=edit
Implement the reset forms option using Okular::FormFields in a way similar to
editformstest.cpp

I uploaded the path here:
https://phabricator.kde.org/D10932

I am currently working on getting the auto test to work in a way other than
creating a reset function in the document class.

-- 
You are receiving this mail because:
You are the assignee for the bug.

D10932: Bug 288042 - Option to reset forms (Implemented using FormFields)

2018-03-04 Thread Ahmad Osama
ahmadosama updated this revision to Diff 28622.
ahmadosama added a comment.


  I have created an auto test but it is not working, in the test class I 
created a page view class that takes a document pointer in its constructor then 
it calls the reset function in the pageview class.
  
  I am  thinking of a way of getting it to work other than creating a reset 
function in the document class.

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10932?vs=28296&id=28622

REVISION DETAIL
  https://phabricator.kde.org/D10932

AFFECTED FILES
  autotests/resetformstest.cpp

To: ahmadosama
Cc: ngraham, aacid, #okular, michaelweghorn


D10504: Bug 288042 - Option to reset forms

2018-02-28 Thread Ahmad Osama
ahmadosama added a comment.


  I implemented the reset option using Okular::FormFields inspired by the 
comments here:
  https://git.reviewboard.kde.org/r/130057/
  
  I submitted another patch for this new implementation here:
  https://phabricator.kde.org/D10932
  
  I am currently working on the creation of the auto tests, I think using this 
implementation the auto test will be similar to editformstext.cpp and I will 
upload the auto test for review once it is done.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10504

To: ahmadosama, aacid
Cc: aacid, ngraham, #okular, michaelweghorn


D10932: Bug 288042 - Option to reset forms (Implemented using FormFields)

2018-02-28 Thread Ahmad Osama
ahmadosama created this revision.
ahmadosama added a project: Okular.
ahmadosama requested review of this revision.

REVISION SUMMARY
  Similar to how the autotest (editformtext.cpp) tests the form contents, I 
implemented the reset form option in a similar way by creating a function to 
reset each widget separately .
  
  I am not quite sure that resetting radio buttons will work well, when radio 
buttons are in different button groups.  
  This implementation is inspired by previous comments about this bug.

TEST PLAN
  I am currently working on implementing an auto test using formSample.pdf, I 
think the autotest will not be much different from editformtext.cpp .

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10932

AFFECTED FILES
  part.cpp
  part.rc
  ui/pageview.cpp
  ui/pageview.h

To: ahmadosama
Cc: ngraham, aacid, #okular, michaelweghorn


D10504: Bug 288042 - Option to reset forms

2018-02-20 Thread Ahmad Osama
ahmadosama added a comment.


  I have not created an auto test before, I am currently going through current 
auto tests to understand how it works, then I will try creating an auto test 
for this bug.

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10504

To: ahmadosama, aacid
Cc: aacid, ngraham, #okular, michaelweghorn


D10504: Bug 288042 - Option to reset forms

2018-02-17 Thread Ahmad Osama
ahmadosama updated this revision to Diff 27427.
ahmadosama added a comment.


  Removing unnecessary comments, add clear widget function for other widgets.

REPOSITORY
  R223 Okular

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D10504?vs=27143&id=27427

REVISION DETAIL
  https://phabricator.kde.org/D10504

AFFECTED FILES
  part.cpp
  ui/formwidgets.cpp
  ui/formwidgets.h
  ui/pageview.cpp
  ui/pageview.h

To: ahmadosama, aacid
Cc: aacid, ngraham, #okular, michaelweghorn, simgunz


[okular] [Bug 288042] Option to reset forms (PDF)

2018-02-14 Thread Ahmad Osama
https://bugs.kde.org/show_bug.cgi?id=288042

--- Comment #7 from Ahmad Osama  ---
I have posted it here: https://phabricator.kde.org/D10504

I saw the comment now, it sounds that I have implemented almost the same idea!

-- 
You are receiving this mail because:
You are the assignee for the bug.

D10504: Bug 288042 - Option to reset forms

2018-02-14 Thread Ahmad Osama
ahmadosama created this revision.
ahmadosama added a project: Okular.
Restricted Application added a subscriber: Okular.
ahmadosama requested review of this revision.

REVISION SUMMARY
  These changes are done to add a button to Reset pdf forms when clicked.
  
  Changes are to the following files:
  
  - part.cpp: Just changing the text displayed to the user when the document 
has forms
  - pageview.cpp/pageview.h: add an action to reset forms just like the Show 
Form/Hide form (aToggleForm QAction)
  - formwidget.cpp/formwidger.h: add a virtual function 'clearWidgetContents()' 
to the parent class (FormWidgetIface) that clears the contents of the widget, 
then overriding this function in its children to clear the contents differently 
in each widget, ex. clearing the FormLineEditClass (that iherits from 
QLineEdit) is done by setting text to an empty string ("").
  
  - the clearWidgetContents() is called when the QAction associated with it is 
triggered.
  
  *the clearWidgetContent() is added to the FormLineEdit, radioButton, 
checkBoxEdit and KTextEdit

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D10504

AFFECTED FILES
  part.cpp
  ui/formwidgets.cpp
  ui/formwidgets.h
  ui/pageview.cpp
  ui/pageview.h

To: ahmadosama
Cc: #okular, michaelweghorn, ngraham, simgunz, aacid


[okular] [Bug 288042] Option to reset forms (PDF)

2018-02-13 Thread Ahmad Osama
https://bugs.kde.org/show_bug.cgi?id=288042

Ahmad Osama  changed:

   What|Removed |Added

 CC||ahmad.osama@gmail.com

--- Comment #5 from Ahmad Osama  ---
Created attachment 110619
  --> https://bugs.kde.org/attachment.cgi?id=110619&action=edit
The attachment contains a zip file with 3 patches containing the changes to 5
files: part.cpp/pageview.cpp/pageview.h/formwidget.cpp/formwidget.h

These changes are done to add a button to Reset pdf forms when clicked.

Changes are to the following files:

* part.cpp: Just changing the text displayed to the user when the document has
forms
* pageview.cpp/pageview.h: add an action to reset forms just like the Show
Form/Hide form (aToggleForm QAction)
* formwidget.cpp/formwidger.h: add a virtual function 'clearWidgetContents()'
to the parent class (FormWidgetIface) that clears the contents of the widget,
then overriding this function in its children to clear the contents differently
in each widget, ex. clearing the FormLineEditClass (that iherits from
QLineEdit) is done by setting text to an empty string ("").

* the clearWidgetContents() is called when the QAction associated with it is
triggered.

-- 
You are receiving this mail because:
You are the assignee for the bug.