Download it now!
Bug 76181 - cleanup constructors in ucalc.cxx
Summary: cleanup constructors in ucalc.cxx
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Manas
URL:
Whiteboard: target:4.3.0
Keywords: difficultyBeginner, easyHack, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2014-03-14 16:15 UTC by Michael Meeks
Modified: 2015-12-16 00:09 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2014-03-14 16:15:38 UTC
The calc unit tests pre-date the pretty new string constructors, so we have lots of this sort of thing:

    m_pDoc->InsertTab(0, OUString("Sheet1"));

Where the 'OUString()' is not needed - and should be removed in favour of a plain "Sheet1".

Similarly we have a number of:

    OUString aTabName("TestTab");
    m_pDoc->InsertTab(0, aTabName);

Where there is no need for a local variable; we can axe the OUString line and pass "TestTab" directly in many cases.

Thanks !
Comment 1 Michael Meeks 2014-03-14 16:16:19 UTC
Ah - and the code path is sc/qa/unit/ucalc.cxx =)
Comment 2 Lakmal Muthugama 2014-03-15 15:19:41 UTC
I will take this bug - changed the assigned to
Comment 3 Manas 2014-03-15 17:10:35 UTC
I have already completed the patch for the bug. Will put it onboard in few hours
Comment 4 Manas 2014-03-16 07:51:19 UTC
Bug fixed. Mail sent to mailing list with patch :)
Comment 5 Michael Meeks 2014-03-17 19:49:50 UTC
Thanks; pushed to master ! =)
Comment 6 Commit Notification 2014-03-17 19:50:29 UTC
Manas Joshi committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=de226dcfaeedf7f77de4f0242a713bc7e4462a0a

fdo#76181 - cleanup OUString constructors



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Robinson Tryon (qubit) 2015-12-16 00:09:32 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp TopicCleanup )
[NinjaEdit]