diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-20 21:49:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-28 08:48:04 +0100 |
commit | fba5febdf60b37be69d2ffc66445d3e324826346 (patch) | |
tree | 6f1d3ac37104e1c0648600f4154c6dae763da4b2 /sw/source | |
parent | 919048ba44db04e3be5ee477602923c77a58a6f5 (diff) |
need to think about the toplevel dialog resize
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/ui/dialog/wordcountdialog.cxx | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index dcefea6b803c..8adfb1fc0270 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -40,8 +40,6 @@ #include <wrtsh.hxx> //TODO, add asian/non-asian word count to UI when CJK mode is enabled. -const int nWCSpacing = 50; - SwWordCountDialog::SwWordCountDialog(Dialog* pParent) : dialog_vbox1(pParent) , box1(&dialog_vbox1) @@ -49,26 +47,26 @@ SwWordCountDialog::SwWordCountDialog(Dialog* pParent) , aCurrentSelectionText(&aCurrentSelection, SW_RES(FT_CURRENT)) , aCurrentSelectionLine(&aCurrentSelection, SW_RES(FL_CURRENT)) , aSelectionBox(&box1, false, 7) - , aSelectionRow1(&aSelectionBox, false, nWCSpacing) + , aSelectionRow1(&aSelectionBox) , aCurrentWordFT(&aSelectionRow1, SW_RES(FT_CURRENTWORD)) , aCurrentWordFI(&aSelectionRow1, SW_RES(FI_CURRENTWORD)) - , aSelectionRow2(&aSelectionBox, false, nWCSpacing) + , aSelectionRow2(&aSelectionBox) , aCurrentCharacterFT(&aSelectionRow2, SW_RES(FT_CURRENTCHARACTER)) , aCurrentCharacterFI(&aSelectionRow2, SW_RES(FI_CURRENTCHARACTER)) - , aSelectionRow3(&aSelectionBox, false, nWCSpacing) + , aSelectionRow3(&aSelectionBox) , aCurrentCharacterExcludingSpacesFT(&aSelectionRow3, SW_RES(FT_CURRENTCHARACTEREXCLUDINGSPACES)) , aCurrentCharacterExcludingSpacesFI(&aSelectionRow3, SW_RES(FI_CURRENTCHARACTEREXCLUDINGSPACES)) , aDoc(&box1, false, 3) , aDocText(&aDoc, SW_RES(FT_DOC)) , aDocLine(&aDoc, SW_RES(FL_DOC)) , aDocBox(&box1, false, 7) - , aDocRow1(&aDocBox, false, nWCSpacing) + , aDocRow1(&aDocBox) , aDocWordFT(&aDocRow1, SW_RES(FT_DOCWORD)) , aDocWordFI(&aDocRow1, SW_RES(FI_DOCWORD)) - , aDocRow2(&aDocBox, false, nWCSpacing) + , aDocRow2(&aDocBox) , aDocCharacterFT(&aDocRow2, SW_RES(FT_DOCCHARACTER)) , aDocCharacterFI(&aDocRow2, SW_RES(FI_DOCCHARACTER)) - , aDocRow3(&aDocBox, false, nWCSpacing) + , aDocRow3(&aDocBox) , aDocCharacterExcludingSpacesFT(&aDocRow3, SW_RES(FT_DOCCHARACTEREXCLUDINGSPACES)) , aDocCharacterExcludingSpacesFI(&aDocRow3, SW_RES(FI_DOCCHARACTEREXCLUDINGSPACES)) , aBottomFL(&dialog_vbox1, SW_RES(FL_BOTTOM)) @@ -78,6 +76,14 @@ SwWordCountDialog::SwWordCountDialog(Dialog* pParent) { Size aSize; + rtl::OUString sForceInitialSize(RTL_CONSTASCII_USTRINGPARAM("00000000")); + aCurrentWordFI.SetText(sForceInitialSize); + aCurrentCharacterFI.SetText(sForceInitialSize); + aCurrentCharacterExcludingSpacesFI.SetText(sForceInitialSize); + aDocWordFI.SetText(sForceInitialSize); + aDocCharacterFI.SetText(sForceInitialSize); + aDocCharacterExcludingSpacesFI.SetText(sForceInitialSize); + rtl::OString sFill(RTL_CONSTASCII_STRINGPARAM("fill")); rtl::OString sExpand(RTL_CONSTASCII_STRINGPARAM("expand")); rtl::OString sPackType(RTL_CONSTASCII_STRINGPARAM("pack-type")); @@ -170,6 +176,11 @@ SwWordCountDialog::SwWordCountDialog(Dialog* pParent) fprintf(stderr, "dialog_vbox1 is is %p\n", &dialog_vbox1); pParent->SetMinOutputSizePixel(dialog_vbox1.GetOptimalSize(WINDOWSIZE_PREFERRED)); + +#if OSL_DEBUG_LEVEL > 2 + aDocCharacterExcludingSpacesFT.SetControlBackground(Color(180,0,0)); + aDocCharacterExcludingSpacesFI.SetControlBackground(Color(0,180,0)); +#endif } IMPL_LINK_NOARG(SwWordCountDialog, OkHdl) |