[Libreoffice-commits] .: sw/source

Norbert Thiebaud nthiebaud at kemper.freedesktop.org
Thu Jun 9 00:16:01 PDT 2011


 sw/source/ui/frmdlg/cption.cxx |    4 ++++
 sw/source/ui/inc/cption.hxx    |    1 +
 2 files changed, 5 insertions(+)

New commits:
commit 0bcdd6e4ea40a57aa2a6370a88298354a54a09a7
Author: Jeff Aigner <jaigner at setnine.com>
Date:   Thu Jun 9 00:56:04 2011 -0500

    Resolves Bug 35938: Saves caption separator text in caption dialog.
    
    A static String member was added to the SwCaptionDialog class to save the value of the separator text edit between uses.

diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index e6deb8c..12f6af7 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -112,6 +112,8 @@ public:
     String  GetCharacterStyle() const;
 };
 
+String SwCaptionDialog::our_aSepTextSave = String::CreateFromAscii(": "); // Caption separator text
+
 SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
 
     SvxStandardDialog( pParent, SW_RES(DLG_CAPTION) ),
@@ -282,6 +284,7 @@ SwCaptionDialog::SwCaptionDialog( Window *pParent, SwView &rV ) :
     FreeResource();
 
     CheckButtonWidth();
+    aSepEdit.SetText(our_aSepTextSave);
     aTextEdit.GrabFocus();
     DrawSample();
 }
@@ -308,6 +311,7 @@ void SwCaptionDialog::Apply()
     aOpt.CopyAttributes() = bCopyAttributes;
     aOpt.SetCharacterStyle( sCharacterStyle );
     rView.InsertCaption( &aOpt );
+    our_aSepTextSave = aSepEdit.GetText();
 }
 
 IMPL_LINK_INLINE_START( SwCaptionDialog, OptionHdl, Button*, pButton )
diff --git a/sw/source/ui/inc/cption.hxx b/sw/source/ui/inc/cption.hxx
index f23f4be..144f05c 100644
--- a/sw/source/ui/inc/cption.hxx
+++ b/sw/source/ui/inc/cption.hxx
@@ -118,6 +118,7 @@ class SwCaptionDialog : public SvxStandardDialog
     void    CheckButtonWidth();
     void    ApplyCaptionOrder(); //#i61007# order of captions 
 
+    static String our_aSepTextSave; // Save caption separator text
 public:
      SwCaptionDialog( Window *pParent, SwView &rV );
     ~SwCaptionDialog();


More information about the Libreoffice-commits mailing list