Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into feature/GraphingCalculator branch #660

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
cb198e1
Merge pull request #1 from Microsoft/master
joseartrivera Mar 28, 2019
d9ab4f8
Merge pull request #2 from Microsoft/master
joseartrivera Apr 10, 2019
f6f1044
Simplify some of the calc engine string logic (#449)
joseartrivera Apr 11, 2019
ba471ed
Merge pull request #3 from Microsoft/master
joseartrivera Apr 11, 2019
afdda58
Drop unneeded const-qualifier on return type (#396)
janisozaur Apr 12, 2019
1093265
Improve the support of Narrator with parenthesis (#368)
rudyhuyn Apr 15, 2019
5a6c6f4
Prevent the application to crash when the current page is Date Calcul…
rudyhuyn Apr 15, 2019
775771d
Internal builds now require the OAuth access token (#457)
mcooley Apr 15, 2019
ad25fed
Keep input when users refresh currency rates (#369)
rudyhuyn Apr 16, 2019
7a7ceb5
Modify how modulo is calculated in Normal and Scientific mode. (#412)
rudyhuyn Apr 17, 2019
c150cd4
Removed AppBar, OperatorTextBox and OperandTextBox controls (#440)
jatinkumarg Apr 17, 2019
853704c
Add support for Pyeong, a Korean floorspace unit. (#444)
TurtleShip Apr 17, 2019
d21a47d
Compile CalcManager project with or without precompiled headers (#436)
Apr 18, 2019
de65db6
Decrease CPU usage of OverflowTextBlock + optimization (#403)
rudyhuyn Apr 18, 2019
8520d3f
Refactored XAML x:Names (#433)
LanceMcCarthy Apr 18, 2019
43b2d4e
Fix test code that never executes (#465)
EriWong Apr 19, 2019
0d31d5a
Fix UI issues with UnitConverter in RtL (#410)
rudyhuyn Apr 20, 2019
bd04c92
Simplify title bar (#442)
rudyhuyn Apr 20, 2019
fab2119
Clicking on the same element in the hamburger view should re-open tha…
AbduAmeen1 Apr 20, 2019
cdd2b1c
Updates to copypastemanager (#390)
Nicholas-Baron Apr 22, 2019
2a29947
Collapse CurrencySecondaryStatus when no text is present in the text …
EriWong Apr 23, 2019
452f18f
Update README to include infinite precision (#470)
bharatr21 Apr 23, 2019
861d4ef
Update the .gitignore to ignore GraphingImplOverrides.props. (#472)
Apr 23, 2019
b03a026
Allow vcxproj and sln files to merge as text. (#474)
Apr 24, 2019
1dee9dc
Fix #471 (#473)
EriWong Apr 24, 2019
cf7ec5f
Miscellaneous updates to internal release builds (#477)
mcooley Apr 25, 2019
8e1a147
Added WinAppDriver UI Tests to the Calculator Project. (#411)
hassanuz Apr 25, 2019
869cffa
Merge pull request #4 from Microsoft/master
joseartrivera Apr 26, 2019
9728ccf
Fix bug when the negate sign is before a space (#345)
rudyhuyn Apr 26, 2019
94a90d7
UI Tests YAML updated to integrate WinAppDriver task (#480)
hassanuz Apr 30, 2019
32aaa0d
fixes #471 (#481)
EriWong Apr 30, 2019
c77f1de
Update winui to 2.1 (#484)
joseartrivera May 1, 2019
2826d37
Fix the project code style, as it is not consistent. (#236)
seyfer May 2, 2019
ba4a27a
Merge pull request #5 from Microsoft/master
joseartrivera May 2, 2019
9f01c81
Secondary formatting changes (#489)
May 2, 2019
750130c
Accept exponential numbers without -/+ sign. (#270)
rudyhuyn May 9, 2019
28888d8
Remove Serialize/Deserialize functions never used in StandardCalculat…
rudyhuyn May 9, 2019
c568ec7
Update localized strings 2019-05-09 (#496)
mcooley May 9, 2019
b82f571
Updating version of release builds to 1905 (#500)
mcooley May 10, 2019
dcc731f
Repair empty link in ApplicationArchitecture.md (#502)
LucasLarson May 11, 2019
d8cb5c8
Keep spaces when users copy an error message (#430)
rudyhuyn May 11, 2019
860d6d3
Removed GroupName from JumpList so items can't be pinened or removed …
MahdiGhiasi May 14, 2019
9f47fe3
Fix unit tests to run on non-english devices (#289)
rudyhuyn May 14, 2019
9b920f0
Removed entrance transition for about button in NavigationView (#506)
MahdiGhiasi May 17, 2019
0f9bd40
Updating terminology in new feature development process for clarity (…
grochocki May 17, 2019
00f0f25
Added the name property for CalculationResult right/left scroll butto…
May 17, 2019
9515544
Update bug/feature templates to track if submitter requests assignmen…
HowardWolosky May 21, 2019
7baed03
Merge pull request #6 from microsoft/master
joseartrivera May 21, 2019
d4028cd
Force compiler to use utf-8 so the project compiles on systems in Chi…
Northurland May 22, 2019
2fd8dc1
Update localized strings 2019-05-24 (#521)
mcooley May 24, 2019
2b17f82
Migrate currency converter endpoints (#524)
joseartrivera May 31, 2019
6e3fe90
Wrap json parsing in try/catch (#534)
joseartrivera Jun 3, 2019
06c0dd9
Update internal package version (#532)
joseartrivera Jun 3, 2019
d6315c1
Merge pull request #7 from microsoft/master
joseartrivera Jun 3, 2019
98f1da2
Updating version of release builds to 1906 (#537)
mcooley Jun 4, 2019
fe30c7c
Add CMake project, GCC support (#540)
janisozaur Jun 6, 2019
81aec1e
Drop __inline from conflicting declarations (#545)
janisozaur Jun 10, 2019
7276b5c
Fixes bug #483 by setting AccessibilityView property to Raw for hidde…
greedyAI Jun 13, 2019
1ee438d
Bound the calendar picker to the control above (#507)
dkheri Jun 15, 2019
dab589b
Handle date difference for ends of months (#553)
Bigpet Jun 17, 2019
da9f4ea
Fix type of m_openParenCount (#550)
janisozaur Jun 18, 2019
841906a
Update comment in scicomm.cpp (#549)
janisozaur Jun 18, 2019
711b37f
Add missing override/final to CalculatorManagerDisplayTester (#551)
janisozaur Jun 18, 2019
e9551e3
Ensure gldPrevious is scoped to its own translation unit (#556)
janisozaur Jun 18, 2019
2517854
Added Calculator Standard Mode UI Tests (#501)
sanderl Jun 21, 2019
02a3532
Remove deprecated internal-only tests (#565)
mcooley Jun 24, 2019
33b885a
Update to v142 build tools for Visual Studio 2019 (#548)
mcooley Jun 24, 2019
31e4b98
Merge pull request #8 from microsoft/master
joseartrivera Jun 25, 2019
499e299
UI tests should be able to test both dev and store-released builds (#…
mcooley Jun 25, 2019
cb5dfdd
Modify ClipTime to adjust to local time before clipping (#558)
rudyhuyn Jun 26, 2019
b3432c9
Update to SDK 18362 (#568)
mcooley Jun 27, 2019
25708f0
Ensure consistent margins/padding with currency converter keypad (#566)
HowardWolosky Jun 28, 2019
2a5a52d
Date difference: display the difference in days (only) when we aren't…
rudyhuyn Jul 1, 2019
c3d3581
Applying NR 1 to CalculatorVector.h (#491)
Nicholas-Baron Jul 11, 2019
80e445e
Merge branch 'master' of https://github.com/microsoft/calculator
joseartrivera Jul 16, 2019
a35a030
Use the current locale to sort country names (#259)
rudyhuyn Jul 16, 2019
5b59bdc
Removed need for trimIdx and fDigitsFound, resulting in less code. (#…
Jul 16, 2019
23550f7
Make History and Memory list items context menu accessible using keyb…
rudyhuyn Jul 16, 2019
1b9d6b8
Use 2020 as the major version for the appxbundle (#586)
mcooley Jul 16, 2019
2ff7bb4
Unit Converter - Calculate the rounding precision of results based on…
rudyhuyn Jul 17, 2019
a638426
Updated Calculator diagnostic data collection per the specification (…
sanderl Jul 18, 2019
01cfe6d
Fix 32-bit build (#588)
mcooley Jul 18, 2019
aea1201
Update version of release builds to 1907 (#590)
mcooley Jul 18, 2019
bb027aa
Added Input pasted event and added to all modes (#593)
sanderl Jul 18, 2019
0722781
Modifying the title of the window to "Calculator [Dev]" (#531)
tanuja3 Jul 26, 2019
60c5c39
Fix #563: Odd dependency cycle (#570)
janisozaur Jul 26, 2019
8106691
Fixed issue where UI Responsive events were not fired (#603)
sanderl Jul 26, 2019
af83226
Restore user preferences (#456)
TurtleShip Jul 29, 2019
796d171
Always-on-Top mode implemented (#579)
greedyAI Jul 31, 2019
cc8491a
Currency rate: always display minimum 4 significant decimals or 2 tra…
rudyhuyn Aug 1, 2019
a7d668e
Fix the thumbprint of the certificate in the vcxproj file (#617)
rudyhuyn Aug 3, 2019
56aa58a
Merge branch 'master' of https://github.com/microsoft/calculator
joseartrivera Aug 6, 2019
25e2a14
Updated README to note the requirement for installing WinAppDriver (#…
HowardWolosky Aug 6, 2019
c994e49
Prevent Dev title from showing up on Store builds (#627)
HowardWolosky Aug 6, 2019
672e881
Fixes Always-on-Top crashes (#626)
greedyAI Aug 7, 2019
24d997d
Update localized strings 2019-08-08 (#636)
mcooley Aug 9, 2019
ac37a2e
Merge branch 'master' of https://github.com/microsoft/calculator
joseartrivera Aug 19, 2019
5966503
Fix regression bug with application title no longer grayed out. (#632)
rudyhuyn Aug 19, 2019
71b0104
Remove unused expression item template selector (#623)
rudyhuyn Aug 20, 2019
5b2d976
Remove colorize and fullcolor app list icons (#644)
mcooley Aug 21, 2019
eb24c08
General improvement of the title bar for Always-On-Top. (#634)
rudyhuyn Aug 23, 2019
41e2e97
Optimize BitFlipPanel to suppress flicker when users switch between b…
rudyhuyn Aug 26, 2019
c9ac7ba
Update internals package to 0.0.18 (#645)
mcooley Aug 26, 2019
c185542
Merge branch 'master' of https://github.com/microsoft/calculator
joseartrivera Aug 26, 2019
ae30322
Update documentation for communicating discovered security vulnerabil…
HowardWolosky Sep 3, 2019
fef77d2
Merge remote-tracking branch 'upstream/master'
joseartrivera Sep 4, 2019
998bdba
merge with master
joseartrivera Sep 4, 2019
7f7cd96
Fix resw files
joseartrivera Sep 5, 2019
13ace92
manual merge
joseartrivera Sep 5, 2019
2e2a8d3
More manual merging
joseartrivera Sep 5, 2019
c0c3621
Fix error
joseartrivera Sep 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ Prerequisites:

- Open [src\Calculator.sln](/src/Calculator.sln) in Visual Studio to build and run the Calculator app.
- For a general description of the Calculator project architecture see [ApplicationArchitecture.md](docs/ApplicationArchitecture.md).
- To run the UI Tests, you need to make sure that
[Windows Application Driver (WinAppDriver)](https://github.com/microsoft/WinAppDriver/releases/latest)
is installed.

## Contributing
Want to contribute? The team encourages community feedback and contributions. Please follow our [contributing guidelines](CONTRIBUTING.md).
Expand All @@ -52,25 +55,20 @@ For information regarding Windows Calculator plans and release schedule, please
Adding graphing calculator functionality [is on the project roadmap](https://github.com/Microsoft/calculator/issues/338) and we hope that this project can create a great end-user experience around graphing. To that end, the UI from the official in-box Windows Calculator is currently part of this repository, although the proprietary Microsoft-built graphing engine, which also drives graphing in Microsoft Mathematics and OneNote, is not. Community members can still be involved in the creation of the UI, however developer builds will not have graphing functionality due to the use of a [mock implementation of the engine](/src/MockGraphingImpl) built on top of a
[common graphing API](/src/GraphingInterfaces).

## Data / Telemetry
## Diagnostic Data
This project collects usage data and sends it to Microsoft to help improve our products and services.
Read our [privacy statement](https://go.microsoft.com/fwlink/?LinkId=521839) to learn more.
Telemetry is disabled in development builds by default, and can be enabled with the `SEND_TELEMETRY`
Diagnostic data is disabled in development builds by default, and can be enabled with the `SEND_DIAGNOSTICS`
build flag.

## Currency Converter
Windows Calculator includes a currency converter feature that uses mock data in developer builds. The data that
Microsoft uses for the currency converter feature (e.g., in the retail version of the application) is not licensed
for your use. The mock data will be clearly identifiable as it references planets instead of countries,
Windows Calculator includes a currency converter feature that uses mock data in developer builds. The data that
Microsoft uses for the currency converter feature (e.g., in the retail version of the application) is not licensed
for your use. The mock data will be clearly identifiable as it references planets instead of countries,
and remains static regardless of selected inputs.

## Reporting Security Issues
Security issues and bugs should be reported privately, via email, to the
Microsoft Security Response Center (MSRC) at <[secure@microsoft.com](mailto:secure@microsoft.com)>.
You should receive a response within 24 hours. If for some reason you do not, please follow up via
email to ensure we received your original message. Further information, including the
[MSRC PGP](https://technet.microsoft.com/en-us/security/dn606155) key, can be found in the
[Security TechCenter](https://technet.microsoft.com/en-us/security/default).
Please refer to [SECURITY.md](./SECURITY.md).

## License
Copyright (c) Microsoft Corporation. All rights reserved.
Expand Down
48 changes: 48 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.1 BLOCK -->

## Security

Microsoft takes the security of our software products and services seriously, which includes all
source code repositories managed through our GitHub organizations, which include
[Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure),
[DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet),
[Xamarin](https://github.com/xamarin), and [many more](https://opensource.microsoft.com/).

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets
Microsoft's [definition](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10))
of a security vulnerability, please report it to us as described below.

## Reporting Security Issues

**Please do not report security vulnerabilities through public GitHub issues.** Instead, please
report them to the Microsoft Security Response Center at [secure@microsoft.com](mailto:secure@microsoft.com).
If possible, encrypt your message with our PGP key; please download it from the
[Microsoft Security Response Center PGP Key page](https://technet.microsoft.com/en-us/security/dn606155).

You should receive a response within 24 hours. If for some reason you do not, please follow up via
email to ensure we received your original message. Additional information can be found at
[microsoft.com/msrc](https://www.microsoft.com/msrc).

Please include the requested information listed below (as much as you can provide) to help us better
understand the nature and scope of the possible issue:

* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
* Full paths of source file(s) related to the manifestation of the issue
* The location of the affected source code (tag/branch/commit or direct URL)
* Any special configuration required to reproduce the issue
* Step-by-step instructions to reproduce the issue
* Proof-of-concept or exploit code (if possible)
* Impact of the issue, including how an attacker might exploit the issue

This information will help us triage your report more quickly.

## Preferred Languages

We prefer all communications to be in English.

## Policy

Microsoft follows the principle of
[Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).

<!-- END MICROSOFT SECURITY.MD BLOCK -->
4 changes: 2 additions & 2 deletions build/pipelines/azure-pipelines.release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pr: none

variables:
versionMajor: 10
versionMinor: 1906
versionBuild: $[counter('10.1906.*', 0)]
versionMinor: 1907
versionBuild: $[counter('10.1907.*', 0)]
versionPatch: 0

name: '$(versionMajor).$(versionMinor).$(versionBuild).$(versionPatch)'
Expand Down
2 changes: 1 addition & 1 deletion build/pipelines/templates/build-app-internal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
downloadDirectory: $(Build.SourcesDirectory)
vstsFeed: WindowsApps
vstsFeedPackage: calculator-internals
vstsPackageVersion: 0.0.11
vstsPackageVersion: 0.0.18

- template: ./build-single-architecture.yaml
parameters:
Expand Down
7 changes: 5 additions & 2 deletions build/pipelines/templates/package-appxbundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ jobs:
filePath: $(Build.SourcesDirectory)\build\scripts\CreateAppxBundleMapping.ps1
arguments: '-InputPath $(Build.ArtifactStagingDirectory)\drop\Release -ProjectName Calculator -OutputFile $(Build.BinariesDirectory)\AppxBundleMapping.txt'

- script: '"C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x86\MakeAppx.exe" bundle /v /bv %BUNDLEVERSION% /f %MAPPINGFILEPATH% /p %OUTPUTPATH%'
- powershell: |
$buildVersion = [version]$Env:BUILDVERSION
$bundleVersion = "2020.$($buildVersion.Minor).$($buildVersion.Build).$($buildVersion.Revision)"
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x86\MakeAppx.exe" bundle /v /bv $bundleVersion /f $Env:MAPPINGFILEPATH /p $Env:OUTPUTPATH
displayName: Make AppxBundle
env:
BUNDLEVERSION: $(Build.BuildNumber)
BUILDVERSION: $(Build.BuildNumber)
MAPPINGFILEPATH: $(Build.BinariesDirectory)\AppxBundleMapping.txt
OUTPUTPATH: $(Build.BinariesDirectory)\Microsoft.WindowsCalculator_8wekyb3d8bbwe.appxbundle

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
downloadDirectory: $(Build.SourcesDirectory)
vstsFeed: WindowsApps
vstsFeedPackage: calculator-internals
vstsPackageVersion: 0.0.11
vstsPackageVersion: 0.0.18

- task: PkgESStoreBrokerPackage@10
displayName: Create StoreBroker Packages
Expand Down
82 changes: 81 additions & 1 deletion docs/ManualTests.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,59 @@ Steps:
2. Select “miles” as the unit type in the output field
*Expected: The output starts with is “3.106856”*

### Always-on-Top

**Test 1**
Steps:
1. Launch the "Calculator" app and navigate to "Standard" Calculator
*Expected: Always-on-Top button's tooltip says "Keep on top"*
2. Click the Always-on-Top button
*Expected: Always-on-Top button's tooltip now says "Back to full view"*
3. Launch the "Notepad" app and put it in full-screen mode
*Expected: Calculator is still on top of Notepad and in Always-on-Top mode*

**Test 2**
Steps:
1. Launch the "Calculator" app and from "Standard" Calculator, input “3”, “+”, “3” (do not press “Enter”)
2. Tab over the Always-on-Top button and press "Enter" on the keyboard
*Expected: The application title, hamburger menu, calculator type title, calculation expression (the secondary line above the main display), history button and memory buttons are no longer visible. The main display shows "3"*
2. Press “Enter”
*Expected: The main display shows "6"*
3. Press "Ctrl-H" on the keyboard
*Expected: Nothing happens (history keyboard shortcuts are disabled)*
4. Press "Ctrl-P" on the keyboard, then tab over the Always-on-Top button and press "Enter" on the keyboard again
5. Open the Memory panel
*Expected: Nothing is stored in memory (memory keyboard shortcuts are disabled in Always-on-Top mode) and "6" is in history*

**Test 3**
Steps:
1. Launch the "Calculator" app and from "Standard" Calculator, click the Always-on-Top button
2. Resize the window horizontally
*Expected: The buttons automatically expand or shrink to fit the available screen size*
3. Resize the window vertically
*Expected: The buttons automatically expand or shrink to fit the available screen size and the percent, square-root, squared and reciprocal buttons disappear when the screen height is small*
4. Click the Always-on-Top button again
*Expected: Calculator is in Standard mode and the original window layout from before Step 1 is restored*
5. Click the Always-on-Top button again
*Expected: Calculator is in Always-on-Top mode and the window size from after Step 3 is restored*
6. Close the "Calculator" app
7. Launch the "Calculator" app again and click the Always-on-Top button
*Expected: The window size from right before closing from Always-on-Top mode (ie. after Step 5) is restored*

**Test 4**
Steps:
1. Launch the "Calculator" app and from "Standard" Calculator, click the Always-on-Top button
2. Input "/", "0", “Enter” on the keyboard
*Expected: "Result is undefined" is displayed in the system default app language*
3. Click the Always-on-Top button again
*Expected: Calculator is in Standard mode and all operator (except for "CE", "C", "Delete" and "=") and memory buttons are disabled

**Test 5**
Steps:
1. Launch the "Calculator" app and navigate to "Scientific" Calculator
*Expected: The Always-on-Top button is hidden*
2. Navigate to "Standard" Calculator
*Expected: The Always-on-Top button is visible*

## Basic Verification Tests

Expand Down Expand Up @@ -278,7 +331,7 @@ Steps:
Steps:
1. Launch the "Calculator" app.

For All Applicable Modes verify the following:
For All Applicable Modes verify the following (note: only 11-15 and 20 work in Always-on-Top mode):
2. Press **Alt +1** to Enter "Standard" mode
*Expected: Move to "Standard" screen.*
3. Press **Alt +2** to Enter "Scientific" mode
Expand Down Expand Up @@ -353,3 +406,30 @@ Steps:
61. Press **|** to Select 'Or'
62. Press **~** to Select 'Not'
63. Press **&** to Select 'And'

## Localization Tests

### Always-on-Top

**Test 1**
Steps:
1. Change the system default app language to Arabic
2. Launch the "Calculator" app and from "Standard" Calculator, click the Always-on-Top button
*Expected: UI/Menu is localized (for example, the title bar buttons is in right-to-left order)*
3. Input "/", "0", “Enter” on the keyboard
*Expected: Error message is in Arabic*

## Ease of Access Tests

### Always-on-Top

**Test 1**
Steps:
1. Open the "Narrator" app
2. Launch the "Calculator" app and from "Standard" Calculator, click the Always-on-Top button
3. Tab over the Always-on-Top button
*Expected: Narrator reads the localized version of "Back to full view"*
4. Tab over the main results field
*Expected: Narrator reads the localized version of exactly what's displayed (ie. "0")*
5. Tab over the rest of the UI elements
*Expected: Narrator reads the localized version of the UI elements' contents*
11 changes: 9 additions & 2 deletions src/CalcManager/CEngine/scicomm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ int CCalcEngine::GetCurrentRadix()
return m_radix;
}

wstring CCalcEngine::GetCurrentResultForRadix(uint32_t radix, int32_t precision)
wstring CCalcEngine::GetCurrentResultForRadix(uint32_t radix, int32_t precision, bool groupDigitsPerRadix)
{
Rational rat = (m_bRecord ? m_input.ToRational(m_radix, m_precision) : m_currentVal);

Expand All @@ -964,7 +964,14 @@ wstring CCalcEngine::GetCurrentResultForRadix(uint32_t radix, int32_t precision)
ChangeConstants(m_radix, m_precision);
}

return GroupDigitsPerRadix(numberString, radix);
if (groupDigitsPerRadix)
{
return GroupDigitsPerRadix(numberString, radix);
}
else
{
return numberString;
}
}

wstring CCalcEngine::GetStringForDisplay(Rational const& rat, uint32_t radix)
Expand Down
6 changes: 4 additions & 2 deletions src/CalcManager/CalcManager.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>10.0</ApplicationTypeRevision>
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.18362.0</WindowsTargetPlatformMinVersion>
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">10.0.18362.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformMinVersion>10.0.17134.0</WindowsTargetPlatformMinVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<!-- This has to be exactly in this place for this to work -->
Expand Down Expand Up @@ -309,6 +309,7 @@
<ClInclude Include="Ratpack\CalcErr.h" />
<ClInclude Include="Ratpack\ratconst.h" />
<ClInclude Include="Ratpack\ratpak.h" />
<ClInclude Include="NumberFormattingUtils.h" />
<ClInclude Include="UnitConverter.h" />
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -349,6 +350,7 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="NumberFormattingUtils.cpp" />
<ClCompile Include="UnitConverter.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
Expand Down
4 changes: 3 additions & 1 deletion src/CalcManager/CalcManager.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<ClCompile Include="CEngine\RationalMath.cpp">
<Filter>CEngine</Filter>
</ClCompile>
<ClCompile Include="NumberFormattingUtils.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Command.h" />
Expand Down Expand Up @@ -160,5 +161,6 @@
<ClInclude Include="Header Files\RationalMath.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="NumberFormattingUtils.h" />
</ItemGroup>
</Project>
</Project>
13 changes: 2 additions & 11 deletions src/CalcManager/CalculatorManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ namespace CalculationManager
CCalcEngine::InitialOneTimeOnlySetup(*m_resourceProvider);
}

/// <summary>
/// Destructor for CalculatorManager
/// Ends two CCalcEngine
/// </summary>
CalculatorManager::~CalculatorManager()
{
this->MemorizedNumberClearAll();
}

/// <summary>
/// Call the callback function using passed in IDisplayHelper.
/// Used to set the primary display value on ViewModel
Expand Down Expand Up @@ -622,9 +613,9 @@ namespace CalculationManager
}
}

wstring CalculatorManager::GetResultForRadix(uint32_t radix, int32_t precision)
wstring CalculatorManager::GetResultForRadix(uint32_t radix, int32_t precision, bool groupDigitsPerRadix)
{
return m_currentCalculatorEngine ? m_currentCalculatorEngine->GetCurrentResultForRadix(radix, precision) : L"";
return m_currentCalculatorEngine ? m_currentCalculatorEngine->GetCurrentResultForRadix(radix, precision, groupDigitsPerRadix) : L"";
}

void CalculatorManager::SetPrecision(int32_t precision)
Expand Down
3 changes: 1 addition & 2 deletions src/CalcManager/CalculatorManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ namespace CalculationManager
void MemoryItemChanged(unsigned int indexOfMemory) override;

CalculatorManager(ICalcDisplay* displayCallback, IResourceProvider* resourceProvider);
~CalculatorManager();

void Reset(bool clearMemory = true);
void SetStandardMode();
Expand All @@ -125,7 +124,7 @@ namespace CalculationManager
}
void SetRadix(RADIX_TYPE iRadixType);
void SetMemorizedNumbersString();
std::wstring GetResultForRadix(uint32_t radix, int32_t precision);
std::wstring GetResultForRadix(uint32_t radix, int32_t precision, bool groupDigitsPerRadix);
void SetPrecision(int32_t precision);
void UpdateMaxIntDigits();
wchar_t DecimalSeparator();
Expand Down
Loading