Fixes#140.
Added a one-liner description about the date calculation functionality
Description of the changes:
* This change maintains consistency by writing it after the description of the programmer calculator so that it matches the order of the positions of these functionalities in the hamburger menu of the calculator.
* Just like the other descriptions, this is also a one-liner
* This description covers both the functionality under "date calculation" i.e. the difference between the dates and adding/subtracting a date from another.
Co-Authored-By: sonali9696 <sonali9696@gmail.com>
* Modify the height of RowDltrUnits when UnitConverter is in LandscapeLayout mode
* clean
* Use the same layout than the existing one while fixing the issue
* Refactor SupplementaryItemsControl to improve performance, not rely on parents and not force the parent element to be HorizonAlignment="stretch"
* take feedback into account
* add HorizontalNoOverflowStackPanel to vcproj.filters
* format conditionals
* replace max by std::max
See also #353.
In the internal build environment, there's an auto-injected component governance task which needs to run once during the build. This task doesn't need to run during the unit test, package, and internal release jobs.
Description of the changes:
Disable Windows-provided min/max macros using the NOMINMAX flag. Add the flag to each project's pch to disable the macros across the solution.
How changes were validated:
Project builds.
Unit tests pass.
Smoke tests.
Fixes#362.
The .resw files for all languages are expected to be checked into the repo (this used to not the the case). Let's remove the conditions in the project file which ignore them if they don't exist.
Additionally removes pseudo-loc resource references from the build as pseudo-loc resources aren't currently being generated.
Templatize the copyright string and use a build variable to set the year for use across the entire app.
How changes were validated:
Tested with English and French and with different dates.
Update the localization build so that it sends strings to our internal localization system on a nightly basis and produces a patch file which we can use to check translations back into the repo.
Internally, a "component detection" task is automatically injected into builds to make sure we're not using any components with known security vulnerabilities. Because this task runs during the main app builds, it doesn't also need to run in the pipeline which hands off strings to the localization system.
I have no idea if it is required to be `sealed`, I have seen no `^`
operator which makes me think it could be a regular C++ code, barring
the concurrency stuff.
* Fix auto-scaling of CalculationResult when the current locale displays symbols at the right
* Formatting
* add padding
* modify padding of ValueContainer
Description of the changes:
Hide the History button when in Programmer mode via VisualState
How changes were validated:
Open Standard mode
Switch to Programmer mode
Verify that the History button isn't visible
Fixes#326
The ViewModel wrongly assumed that non-breaking spaces were only used between the value and the symbol. It's not the case of all locales using non-breaking spaces as a thousand delimiter (French for example).
When it was the case, the function only replaced the first thousand delimiter found and kept the extra space at the end of the string, generating 2 issues:
Extra space at the end: #240
Bad formatting of the number: #232
Description of the changes:
Replace currencyResult.find(L'\u00a0') by a regex only removing spaces at the end of the string.
Fixes#240 and #232
Fixing some nested if() statements and reducing indentation levels.
Making some sections less verbose, e.g:
if (a == 1)
{
b = true;
}
else
{
b = false;
}
↓
b = (a == 1)
The application uses local time to calculate the number of days between 2 dates. If a Daylight Saving Time takes place during this period of time (only Clocks Forward 2am->3am), the application will miss 1 day and fail to calculate the number of days/weeks/months between the 2 dates.
image
Description of the changes:
DateCalculationEngine uses local time to modify dates, however, AddDays, AddWeeks,... won't add 24 hours or 7 days if DST happens between the 2 dates, but instead add ~23.9/24.1 hours or ~6.9/7.1 days (depends if it's the DST clock backward or clock forward). When the DST is clock forward, DateCalculationEngine will miss one day.
Solution
use UTC dates to calculate date difference.
Extra Fix:
use calendar->FirstPeriodInThisDay and calendar->FirstHourInThisPeriod in ClipTime (else it will set the time to 12PM (noon) in some regions.
replace OBSERVABLE_PROPERTY_RW by OBSERVABLE_PROPERTY_R when possible.
remove the definition of CheckClipTimeSameDay (implementation missing)
How changes were validated:
Tested manually with different regions (FR, US, ES, JP).
Fixes#178
Fixes#52
Description of the changes:
Added support for pasting of prefix currency symbols supported by the Windows keyboard.
yen or yuan (¥)
unspecified currency sign (¤)
Ghanaian cedi (₵)
dollar or peso ($)
colón (₡)
won (₩)
shekel (₪)
naira (₦)
Indian rupee (₹)
pound (£)
euro (€)
How changes were validated:
Manually tested each prefix currency symbol supported by the Windows keyboard and ran unit tests.
Optimize how we build the result of GetDateDiffString and GetDateDiffStringInDays, using std::wstring (mutuable) instead of Platform::String (immutable)
Fixed comments that were inconsistent with the style guidelines described in C++ core guidelines and the modern C++/WinRT language projections and removed trailing whitespace.
Inserted a space after the beginning of the comment so the text wasn't touching the // on all occurrences.
Removed all occurrences of trailing whitespace
If we allow users to select texts, the application will feel more like a "Desktop app", will be easier to use on a tablet and users will be more prompt to use Ctrl+C to use the result in another app.
Saved 301 KB out of 9.2 MB. 15.8% per file on average (up to 82.2%)
Fixes #.
Saves 301 KB (although not all files are included in the build)
Description of the changes:
For PNG files: used a combination of Pngcrush, OxiPNG, AdvPNG, PNGOUT and Zopfli
For GIF files: used Gifsicle
How changes were validated:
No changes to behaviour or source code.
Previewed the changed files to make sure they still work
This change makes the 73 variables in ratconst.h actually
inline const, which allows them to move from the mutable .data
section of the executable, and into the read-only .rdata
section instead.
Moving data to the .rdata section has a number of benefits,
such as preventing possible corruption due to stray writes,
or other memory corruption.
Additionally, the initialization at run-time start-up is no
longer needed, so there is also a reduction in the .text
(code) section as well.
As a result the overall size of the Calculator.exe binary
(on x64 Release builds) decreases by 1,536 bytes (or ~1.5 KB)
with no change in behavior other than a small performance benefit.
#225 accidentally added a duplicate .editorconfig to the repo as well as to the solution.
#257 removed the duplicate .editorconfig, but not its entry in the solution.
This update removes the extra .editorconfig reference to a version that #257 already removed from the repo.
### Description of the changes:
There are currently 11 copies of the `EMPTY_UNIT` object in the
`Calculator.exe` binary, which not only wastes space/footprint in the
binary itself, but also means that each copy must be separately
initialized, which effects performance.
The reason for this is that the object is defined in a shared header
file, which then is included by multiple .cpp files, causing each
translation unit (.obj) to get a full complete copy of the object.
By marking the object as `inline` we can
instruct the linker to define the object once, as we do
not need to have 11 unique versions of the EMPTY_UNIT object,
we only need 1.
The net result is that the `Calculator.exe` binary size is reduced by
2,560 bytes (or 2.5 KB) with no change in behavior, other than
the small performance benefit of not initializing 10 redundant copies
of the object.
### How changes were validated:
- Manually tested.
CopyPasteManager unit tests were not fully run, the first item of arrays were never tested. (Luckily, the not-tested values were ok).
Updated from using a pre-decrement while loop to using a standard for loop with an iterator.