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

Proposed fix for Issue 60217 #155

Merged
merged 6 commits into from
Sep 27, 2022
Merged

Proposed fix for Issue 60217 #155

merged 6 commits into from
Sep 27, 2022

Conversation

leginee
Copy link
Contributor

@leginee leginee commented Sep 20, 2022

I have added the if clause, with the expectation it fullfills the goal czeslav formulated in comment 9

  1. Truncated string
    It was fixed in version 3.0.0
    (cf. the attached file "juxtaVER.jpeg")

  2. A spurious colon
    ralphie, comment #4

Furthermore, if there is no database selected, there is
a spurious colon after this sentence, see:

http://www.pangea.at/%7eralph/datenbank-austauschen.png

If no database is selected, there is a colon after the "sentence".
And the program unnecessarily displays a dot character.
(cf. the attached file "Period.jpg").

the source file: changedb.cxx
http://openoffice-vm1-he-de.apache.org/xref/trunk/main/sw/source/ui/fldui/changedb.cxx?r=efeef26f#333

333 void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData)
334 {
335 String sTmp(rDBData.sDataSource);
336 String sName;
337 sTmp += '.';
338 sTmp += (String)rDBData.sCommand;
339
340 for (sal_uInt16 i = 0; i < sTmp.Len(); i++)
341 {
342 sName += sTmp.GetChar(i);
343 if (sTmp.GetChar(i) == '')
344 sName += '
';
345 }
346
347 aDocDBNameFT.SetText(sName);
348 }

Look at the lines 335 - 338
I am not a software developer...
but if the properties "sDataSource" and "sCommand" are empty
then the programm should set the "sName" variable to empty
otherwise proceed as usual.

Did not build the PR. Needs testing, but can be a base of discussion.

leginee and others added 3 commits September 21, 2022 00:17
A . is only added if both Variables are filled.
@Pilot-Pirx Pilot-Pirx self-requested a review September 22, 2022 09:55
Copy link
Member

@Pilot-Pirx Pilot-Pirx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code does not compile:

Entering /cygdrive/c/Source/openoffice/main/sw/prj

cd .. && make -s -r -j1 && make -s -r deliverlog
[ build CXX ] sw/source/ui/fldui/changedb
changedb.cxx
c:/Source/openoffice/main/sw/source/ui/fldui/changedb.cxx(337) : error C2039: 'is' : is not a member of 'rtl::OUString'
C:/Source/openoffice/main/solver/420/wntmsci12.pro/inc\rtl/ustring.hxx(71) : see declaration of 'rtl::OUString'
c:/Source/openoffice/main/sw/source/ui/fldui/changedb.cxx(337) : error C2146: syntax error : missing ')' before identifier 'and'
c:/Source/openoffice/main/sw/source/ui/fldui/changedb.cxx(337) : error C2065: 'and' : undeclared identifier
c:/Source/openoffice/main/sw/source/ui/fldui/changedb.cxx(337) : error C2146: syntax error : missing ';' before identifier 'rDBData'
c:/Source/openoffice/main/sw/source/ui/fldui/changedb.cxx(337) : error C2039: 'is' : is not a member of 'rtl::OUString'
C:/Source/openoffice/main/solver/420/wntmsci12.pro/inc\rtl/ustring.hxx(71) : see declaration of 'rtl::OUString'
c:/Source/openoffice/main/sw/source/ui/fldui/changedb.cxx(337) : error C2059: syntax error : ')'
c:/Source/openoffice/main/sw/source/ui/fldui/changedb.cxx(337) : error C2143: syntax error : missing ';' before '{'
make: *** No rule to make target '/cygdrive/c/Source/openoffice/main/solver/420/wntmsci12.pro/workdir/CxxObject/sw/source/ui/fldui/changedb.o', needed by '/cygdrive/c/Source/openoffice/main/solver/420/wntmsci12.pro/workdir/LinkTarget/Library/iswui.lib'. Stop.
dmake: Error code 2, while making 'all'

1 module(s):
sw
need(s) to be rebuilt

@leginee
Copy link
Contributor Author

leginee commented Sep 23, 2022

Compiles now on docker container. Sadly the dockerbuild crashes on my system for some (other) reason.
SO I am not able to test now.

Copy link
Member

@Pilot-Pirx Pilot-Pirx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds now and the output looks like expected.
No dot when no database is selected.

@Pilot-Pirx
Copy link
Member

If nobody else wants to review, It think we can merge this PR.

Copy link
Contributor

@ardovm ardovm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I suggest to squash these commits when merging.

@Pilot-Pirx
Copy link
Member

@leginee: Can you please "squash and merge"?

@leginee leginee merged commit b0300d3 into apache:trunk Sep 27, 2022
asfgit pushed a commit that referenced this pull request Sep 27, 2022
A dot is only added if both Variables rDBData.sDataSource and sCommand contain something. Otherwise the dot is not added

Co-authored-by: Matthias Seidel <mseidel@apache.org>
(cherry picked from commit b0300d3)
asfgit pushed a commit that referenced this pull request Sep 27, 2022
A dot is only added if both Variables rDBData.sDataSource and sCommand contain something. Otherwise the dot is not added

Co-authored-by: Matthias Seidel <mseidel@apache.org>
(cherry picked from commit b0300d3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants