summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-09 10:43:28 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-09 11:59:51 +0000
commit1fac71668ac8a32633a7ee31698c0f4fe78e4d31 (patch)
tree693506d9d22197000f5d13e22090dcda61f02083 /sw/source/ui
parent110f77c52186aaf5539759292a8bfcadccdd9e47 (diff)
Resolves: fdo#88933 Labeling of images impossible without category
Change-Id: I8b618d5cd6b3e9d5e42e04e215592a7b748dbb9f
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/frmdlg/cption.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx
index 2f9bac874105..ff754b6af4d9 100644
--- a/sw/source/ui/frmdlg/cption.cxx
+++ b/sw/source/ui/frmdlg/cption.cxx
@@ -85,7 +85,7 @@ OUString SwCaptionDialog::our_aSepTextSave(": "); // Caption separator text
//Resolves: fdo#47427 disallow typing *or* pasting content into the category box
OUString TextFilterAutoConvert::filter(const OUString &rText)
{
- if (!SwCalc::IsValidVarName(rText))
+ if (rText != m_sNone && !SwCalc::IsValidVarName(rText))
return m_sLastGoodText;
m_sLastGoodText = rText;
return rText;
@@ -94,6 +94,7 @@ OUString TextFilterAutoConvert::filter(const OUString &rText)
SwCaptionDialog::SwCaptionDialog( vcl::Window *pParent, SwView &rV ) :
SvxStandardDialog( pParent, "InsertCaptionDialog", "modules/swriter/ui/insertcaption.ui" ),
m_sNone( SW_RESSTR(SW_STR_NONE) ),
+ m_aTextFilter(m_sNone),
rView( rV ),
pMgr( new SwFldMgr(rView.GetWrtShellPtr()) ),
bCopyAttributes( false ),
@@ -282,7 +283,7 @@ IMPL_LINK_INLINE_START( SwCaptionDialog, OptionHdl, Button*, pButton )
{
OUString sFldTypeName = m_pCategoryBox->GetText();
if(sFldTypeName == m_sNone)
- sFldTypeName.clear();
+ sFldTypeName = OUString();
SwSequenceOptionDialog aDlg( pButton, rView, sFldTypeName );
aDlg.SetApplyBorderAndShadow(bCopyAttributes);
aDlg.SetCharacterStyle( sCharacterStyle );
@@ -318,6 +319,8 @@ IMPL_LINK_NOARG(SwCaptionDialog, ModifyHdl)
SwFieldType* pType = (bCorrectFldName && !bNone)
? rSh.GetFldType( RES_SETEXPFLD, sFldTypeName )
: 0;
+ fprintf(stderr, "pType is %p\n", pType);
+ fprintf(stderr, "bCorrectFldName is %d\n", bCorrectFldName);
m_pOKButton->Enable( bCorrectFldName &&
(!pType ||
static_cast<SwSetExpFieldType*>(pType)->GetType() == nsSwGetSetExpType::GSE_SEQ) );