Issue: When using the sample app, the user selected rights are incorrectly applied. To Reproduce: 1. Use the sample app to protect a file 2. Grant a user VIEW and PRINT rights. 3. After protection, examine the rights granted
Issue: When using the sample app, the user selected rights are incorrectly applied.
To Reproduce:
1. Use the sample app to protect a file
2. Grant a user VIEW and PRINT rights.
3. After protection, examine the rights granted

Result: the OWNER, VIEW, EDIT, EXPORT, EXTRACT rights were granted.
Expected: the VIEW and PRINT rights should have been granted.

To Fix:  calculate the number of columns instead of using hard-coded value of 6, and check the state of the checkbox before adding the right to the userRights

AzureAD/rms-sdk-for-cpp,AzureAD/rms-sdk-for-cpp,AzureAD/rms-sdk-for-cpp