[ooo-build-commit] .: sw/source

Andras Timar timar at kemper.freedesktop.org
Sat Oct 2 00:33:13 PDT 2010


 sw/source/core/doc/doclay.cxx  |    5 ++++-
 sw/source/ui/frmdlg/cption.cxx |    8 ++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 00d2d7b05252b0aea97efcdb519d85e373e3b30f
Author: Andras Timar <timar at fsf.hu>
Date:   Sat Oct 2 09:31:24 2010 +0200

    Omit caption separator, if caption text is empty, #i110287#

diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index b42b5f8..021bb55 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -1474,7 +1474,10 @@ SwFlyFrmFmt* SwDoc::InsertLabel( const SwLabelType eType, const String &rTxt, co
                 aTxt += ' ';
         }
         xub_StrLen nIdx = aTxt.Len();
-        aTxt += rSeparator;
+        if ( rTxt.Len() > 0 )
+        {
+            aTxt += rSeparator;
+        }
         xub_StrLen nSepIdx = aTxt.Len();
         aTxt += rTxt;
 
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 5e7167b..158f5e3 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -382,6 +382,7 @@ IMPL_LINK(SwCaptionDialog, CaptionHdl, PushButton*, EMPTYARG)
 void SwCaptionDialog::DrawSample()
 {
     String aStr;
+    String sCaption = aTextEdit.GetText();
 
     // Nummer
     String sFldTypeName = aCategoryBox.GetText();
@@ -436,9 +437,12 @@ void SwCaptionDialog::DrawSample()
             }
 
         }
-        aStr += aSepEdit.GetText();
+        if( sCaption.Len() > 0 )
+        {
+            aStr += aSepEdit.GetText();
+        }
     }
-    aStr += aTextEdit.GetText();
+    aStr += sCaption;
     // do preview!
     aPrevWin.SetPreviewText( aStr );
 }


More information about the ooo-build-commit mailing list