summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-08-23 11:01:35 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-08-23 11:22:53 +0100
commit6243704ca068a9c2e3ae4c743bdf98630eb831e8 (patch)
tree9c5d1522a32ecfc6ddc5a2144dc3bc3c65c09baa /sw
parent209ca76f0eacce10378bdc44e41e7cb69bd612e0 (diff)
convert condition page to .ui
Change-Id: Ifd05bdb46cd0cbbce09bd91a3fbf78d6eac0d8c5
Diffstat (limited to 'sw')
-rw-r--r--sw/AllLangResTarget_sw.mk1
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/inc/globals.hrc1
-rw-r--r--sw/inc/helpid.h4
-rw-r--r--sw/source/ui/chrdlg/ccoll.cxx1
-rw-r--r--sw/source/ui/chrdlg/ccoll.hrc43
-rw-r--r--sw/source/ui/chrdlg/ccoll.src157
-rw-r--r--sw/source/ui/chrdlg/swuiccoll.cxx178
-rw-r--r--sw/source/ui/inc/swuiccoll.hxx22
-rw-r--r--sw/uiconfig/swriter/ui/conditionpage.ui266
10 files changed, 366 insertions, 308 deletions
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 14cbfdda4202..5305e4d1b788 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -67,7 +67,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/app/app.src \
sw/source/ui/app/error.src \
sw/source/ui/app/mn.src \
- sw/source/ui/chrdlg/ccoll.src \
sw/source/ui/chrdlg/chrdlg.src \
sw/source/ui/config/mailconfigpage.src \
sw/source/ui/config/optcomp.src \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 8dfb01ae68b5..9daa0a30ffdb 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -76,6 +76,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/columndialog \
sw/uiconfig/swriter/ui/columnpage \
sw/uiconfig/swriter/ui/columnwidth \
+ sw/uiconfig/swriter/ui/conditionpage \
sw/uiconfig/swriter/ui/converttexttable \
sw/uiconfig/swriter/ui/createauthorentry \
sw/uiconfig/swriter/ui/createautomarkdialog \
diff --git a/sw/inc/globals.hrc b/sw/inc/globals.hrc
index a65c7b5a4153..122514e01838 100644
--- a/sw/inc/globals.hrc
+++ b/sw/inc/globals.hrc
@@ -129,7 +129,6 @@
#define TP_CONTENT_OPT (RC_GLOBALS_BEGIN + 45)
#define TP_STD_FONT (RC_GLOBALS_BEGIN + 47)
-#define TP_CONDCOLL (RC_GLOBALS_BEGIN + 48)
#define TP_NUMBER (RC_GLOBALS_BEGIN + 57)
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 8fc895ae46c5..e8c86d2b9743 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -136,8 +136,6 @@
// TabPage Help-IDs
-#define HID_COND_COLL "SW_HID_COND_COLL"
-
#define HID_REDLINE_CTRL "SW_HID_REDLINE_CTRL"
#define HID_OPTCAPTION_PAGE "SW_HID_OPTCAPTION_PAGE"
#define HID_TP_TOX_SELECT "SW_HID_TP_TOX_SELECT"
@@ -307,8 +305,6 @@
#define HID_CALC_TOOLBOX "SW_HID_CALC_TOOLBOX"
#define HID_PVIEW_TOOLBOX "SW_HID_PVIEW_TOOLBOX"
-#define HID_COND_COLL_TABLIST "SW_HID_COND_COLL_TABLIST"
-
#define HID_SELECT_TEMPLATE "SW_HID_SELECT_TEMPLATE"
#define HID_AP_INSERT_DB_SEL "SW_HID_AP_INSERT_DB_SEL"
diff --git a/sw/source/ui/chrdlg/ccoll.cxx b/sw/source/ui/chrdlg/ccoll.cxx
index 7968527f30e3..403949511fa1 100644
--- a/sw/source/ui/chrdlg/ccoll.cxx
+++ b/sw/source/ui/chrdlg/ccoll.cxx
@@ -36,7 +36,6 @@
#include "hints.hxx"
#include "chrdlg.hrc"
-#include "ccoll.hrc"
#include <vcl/svapp.hxx>
#include <unomid.h>
diff --git a/sw/source/ui/chrdlg/ccoll.hrc b/sw/source/ui/chrdlg/ccoll.hrc
deleted file mode 100644
index 605fc8e9cddb..000000000000
--- a/sw/source/ui/chrdlg/ccoll.hrc
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _CCOLL_HRC
-#define _CCOLL_HRC
-
-// #define ******************************************************************
-
-#define CB_CONDITION 1
-#define FL_CONDITION 2
-#define FT_CONTEXT 3
-#define FT_USED 4
-#define TB_CONDCOLLS 5
-#define FT_STYLE 6
-#define LB_STYLE 7
-#define LB_FILTER 8
-#define PB_REMOVE 9
-#define PB_ASSIGN 10
-#define STR_REGIONS 11
-#define STR_NOTEMPL 12
-
-
-// ********************************************************************** EOF
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/ccoll.src b/sw/source/ui/chrdlg/ccoll.src
deleted file mode 100644
index 8c78cc777478..000000000000
--- a/sw/source/ui/chrdlg/ccoll.src
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "globals.hrc"
-#include "chrdlg.hrc"
-#include "ccoll.hrc"
-#include "helpid.h"
- // TabPage ******************************************************************
-TabPage TP_CONDCOLL
-{
- HelpID = HID_COND_COLL ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- Hide = TRUE ;
- FixedLine FL_CONDITION
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 248 , 8 ) ;
- Text [ en-US ] = "Options";
- };
- CheckBox CB_CONDITION
- {
- HelpID = "sw:CheckBox:TP_CONDCOLL:CB_CONDITION";
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 100 , 10 ) ;
- TabStop = TRUE ;
- Disable = TRUE ;
- Text [ en-US ] = "~Conditional Style" ;
- };
- FixedText FT_CONTEXT
- {
- Pos = MAP_APPFONT ( 12 , 28 ) ;
- Size = MAP_APPFONT ( 50 , 8 ) ;
- Disable = TRUE ;
- Text [ en-US ] = "Conte~xt" ;
- };
- FixedText FT_USED
- {
- Pos = MAP_APPFONT ( 100 , 28 ) ;
- Size = MAP_APPFONT ( 80 , 8 ) ;
- Disable = TRUE ;
- Text [ en-US ] = "Applied Styles" ;
- };
- Control TB_CONDCOLLS
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 12 , 39 ) ;
- Size = MAP_APPFONT ( 173 , 123 ) ;
- TabStop = TRUE ;
- ClipChildren = TRUE ;
- Disable = TRUE ;
- Border = TRUE ;
- };
- FixedText FT_STYLE
- {
- Pos = MAP_APPFONT ( 190 , 28 ) ;
- Size = MAP_APPFONT ( 58 , 8 ) ;
- Disable = TRUE ;
- Text [ en-US ] = "~Paragraph Styles" ;
- };
- ListBox LB_STYLE
- {
- HelpID = "sw:ListBox:TP_CONDCOLL:LB_STYLE";
- Pos = MAP_APPFONT ( 188 , 39 ) ;
- Size = MAP_APPFONT ( 60 , 108 ) ;
- TabStop = TRUE ;
- Border = TRUE ;
- Sort = TRUE ;
- Disable = TRUE ;
- HScroll = TRUE ;
- };
- ListBox LB_FILTER
- {
- HelpID = "sw:ListBox:TP_CONDCOLL:LB_FILTER";
- Pos = MAP_APPFONT ( 188 , 150 ) ;
- Size = MAP_APPFONT ( 60 , 50 ) ;
- DropDown = TRUE ;
- TabStop = TRUE ;
- Border = TRUE ;
- Disable = TRUE ;
- HScroll = TRUE ;
- };
- PushButton PB_REMOVE
- {
- HelpID = "sw:PushButton:TP_CONDCOLL:PB_REMOVE";
- Pos = MAP_APPFONT ( 129 , 165 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Disable = TRUE ;
- Text [ en-US ] = "Re~move" ;
- };
- PushButton PB_ASSIGN
- {
- HelpID = "sw:PushButton:TP_CONDCOLL:PB_ASSIGN";
- Pos = MAP_APPFONT ( 185 , 165 ) ;
- Size = MAP_APPFONT ( 50 , 12 ) ;
- TabStop = TRUE ;
- Disable = TRUE ;
- Text [ en-US ] = "~Apply" ;
- };
- StringArray STR_REGIONS
- {
- ItemList [ en-US ] =
- {
- < "Table Header" ; > ;
- < "Table" ; > ;
- < "Frame" ; > ;
- < "Section" ; > ;
- < "Footnote" ; > ;
- < "Endnote" ; > ;
- < "Header" ; > ;
- < "Footer" ; > ;
- < " 1st Outline Level" ; > ;
- < " 2nd Outline Level" ; > ;
- < " 3rd Outline Level" ; > ;
- < " 4th Outline Level" ; > ;
- < " 5th Outline Level" ; > ;
- < " 6th Outline Level" ; > ;
- < " 7th Outline Level" ; > ;
- < " 8th Outline Level" ; > ;
- < " 9th Outline Level" ; > ;
- < "10th Outline Level" ; > ;
- < " 1st Numbering Level" ; > ;
- < " 2nd Numbering Level" ; > ;
- < " 3rd Numbering Level" ; > ;
- < " 4th Numbering Level" ; > ;
- < " 5th Numbering Level" ; > ;
- < " 6th Numbering Level" ; > ;
- < " 7th Numbering Level" ; > ;
- < " 8th Numbering Level" ; > ;
- < " 9th Numbering Level" ; > ;
- < "10th Numbering Level" ; > ;
- };
- };
- String STR_NOTEMPL
- {
- Text [ en-US ] = "<none>" ;
- };
-};
- // ********************************************************************** EOF
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/chrdlg/swuiccoll.cxx b/sw/source/ui/chrdlg/swuiccoll.cxx
index 994ccb2aeac6..6a85de83f4ef 100644
--- a/sw/source/ui/chrdlg/swuiccoll.cxx
+++ b/sw/source/ui/chrdlg/swuiccoll.cxx
@@ -35,7 +35,6 @@
#include "hints.hxx"
#include "chrdlg.hrc"
-#include "ccoll.hrc"
#include <vcl/svapp.hxx>
#include "swuiccoll.hxx"
@@ -52,49 +51,50 @@ static long nTabs[] =
};
SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
-
- : SfxTabPage(pParent, SW_RES(TP_CONDCOLL), rSet),
- aConditionFL( this, SW_RES( FL_CONDITION )),
- aConditionCB( this, SW_RES( CB_CONDITION ) ),
- aContextFT ( this, SW_RES( FT_CONTEXT ) ),
- aUsedFT ( this, SW_RES( FT_USED ) ),
- aTbLinks( this, SW_RES( TB_CONDCOLLS ) ),
- aStyleFT ( this, SW_RES( FT_STYLE ) ),
- aStyleLB ( this, SW_RES( LB_STYLE ) ),
- aFilterLB ( this, SW_RES( LB_FILTER ) ),
- aRemovePB ( this, SW_RES( PB_REMOVE ) ),
- aAssignPB ( this, SW_RES( PB_ASSIGN ) ),
- sNoTmpl ( SW_RES( STR_NOTEMPL ) ),
- aStrArr ( SW_RES( STR_REGIONS ) ),
+ : SfxTabPage(pParent, "ConditionPage",
+ "modules/swriter/ui/conditionpage.ui", rSet)
+ ,
rSh(::GetActiveView()->GetWrtShell()),
pCmds( SwCondCollItem::GetCmds() ),
pFmt(0),
bNewTemplate(sal_False)
{
- FreeResource();
- SetExchangeSupport();
+ get(m_pConditionCB, "condstyle");
+ get(m_pContextFT, "contextft");
+ get(m_pUsedFT, "usedft");
+ get(m_pStyleFT, "styleft");
+ get(m_pTbLinks, "links");
+ get(m_pStyleLB, "styles");
+ m_pStyleLB->SetStyle(m_pStyleLB->GetStyle() | WB_SORT);
+ m_pStyleLB->SetDropDownLineCount(12);
+ m_pTbLinks->set_height_request(m_pStyleLB->GetOptimalSize().Height());
+ get(m_pFilterLB, "filter");
+ get(m_pRemovePB, "remove");
+ get(m_pAssignPB, "apply");
+
+ sal_uInt16 nStrCount = m_pFilterLB->GetEntryCount();
+ for (sal_uInt16 i = 0; i < nStrCount; ++i)
+ m_aStrArr.push_back(m_pFilterLB->GetEntry(i));
+ m_pFilterLB->Clear();
- aRemovePB.SetAccessibleRelationMemberOf(&aConditionFL);
- aAssignPB.SetAccessibleRelationMemberOf(&aConditionFL);
- aTbLinks.SetAccessibleRelationLabeledBy(&aConditionCB);
+ SetExchangeSupport();
// Install handlers
- aConditionCB.SetClickHdl( LINK(this, SwCondCollPage, OnOffHdl));
- aTbLinks.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
- aStyleLB.SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
- aRemovePB.SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
- aAssignPB.SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
- aTbLinks.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl));
- aStyleLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl));
- aFilterLB.SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl));
-
- aTbLinks.SetStyle(aTbLinks.GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN);
- aTbLinks.SetSelectionMode( SINGLE_SELECTION );
- aTbLinks.SetTabs( &nTabs[0], MAP_APPFONT );
- aTbLinks.Resize(); // OS: Hack for the right selection
- aTbLinks.SetSpaceBetweenEntries( 0 );
- aTbLinks.SetHelpId(HID_COND_COLL_TABLIST);
+ m_pConditionCB->SetClickHdl( LINK(this, SwCondCollPage, OnOffHdl));
+ m_pTbLinks->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
+ m_pStyleLB->SetDoubleClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
+ m_pRemovePB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
+ m_pAssignPB->SetClickHdl( LINK(this, SwCondCollPage, AssignRemoveHdl ));
+ m_pTbLinks->SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl));
+ m_pStyleLB->SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl));
+ m_pFilterLB->SetSelectHdl( LINK(this, SwCondCollPage, SelectHdl));
+
+ m_pTbLinks->SetStyle(m_pTbLinks->GetStyle()|WB_HSCROLL|WB_CLIPCHILDREN);
+ m_pTbLinks->SetSelectionMode( SINGLE_SELECTION );
+ m_pTbLinks->SetTabs( &nTabs[0], MAP_APPFONT );
+ m_pTbLinks->Resize(); // OS: Hack for the right selection
+ m_pTbLinks->SetSpaceBetweenEntries( 0 );
SfxStyleFamilies aFamilies(SW_RES(DLG_STYLE_DESIGNER));
const SfxStyleFamilyItem* pFamilyItem = 0;
@@ -109,13 +109,13 @@ SwCondCollPage::SwCondCollPage(Window *pParent, const SfxItemSet &rSet)
const SfxStyleFilter& rFilterList = pFamilyItem->GetFilterList();
for( size_t i = 0; i < rFilterList.size(); ++i )
{
- aFilterLB.InsertEntry( rFilterList[ i ]->aName);
+ m_pFilterLB->InsertEntry( rFilterList[ i ]->aName);
sal_uInt16* pFilter = new sal_uInt16(rFilterList[i]->nFlags);
- aFilterLB.SetEntryData(i, pFilter);
+ m_pFilterLB->SetEntryData(i, pFilter);
}
- aFilterLB.SelectEntryPos(1);
+ m_pFilterLB->SelectEntryPos(1);
- aTbLinks.Show();
+ m_pTbLinks->Show();
}
@@ -126,8 +126,8 @@ Page: Dtor
SwCondCollPage::~SwCondCollPage()
{
- for(sal_uInt16 i = 0; i < aFilterLB.GetEntryCount(); ++i)
- delete (sal_uInt16*)aFilterLB.GetEntryData(i);
+ for(sal_uInt16 i = 0; i < m_pFilterLB->GetEntryCount(); ++i)
+ delete (sal_uInt16*)m_pFilterLB->GetEntryData(i);
}
@@ -159,9 +159,9 @@ sal_Bool SwCondCollPage::FillItemSet(SfxItemSet &rSet)
{
sal_Bool bModified = sal_True;
SwCondCollItem aCondItem;
- for(sal_uInt16 i = 0; i < aStrArr.Count(); i++)
+ for (size_t i = 0; i < m_aStrArr.size(); ++i)
{
- OUString sEntry = aTbLinks.GetEntryText(i, 1);
+ OUString sEntry = m_pTbLinks->GetEntryText(i, 1);
aCondItem.SetStyle( &sEntry, i);
}
rSet.Put(aCondItem);
@@ -176,28 +176,28 @@ Page: Reset-Overload
void SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
{
if(bNewTemplate)
- aConditionCB.Enable();
+ m_pConditionCB->Enable();
if(RES_CONDTXTFMTCOLL == pFmt->Which())
- aConditionCB.Check();
- OnOffHdl(&aConditionCB);
+ m_pConditionCB->Check();
+ OnOffHdl(m_pConditionCB);
- aTbLinks.Clear();
+ m_pTbLinks->Clear();
SfxStyleSheetBasePool* pPool = rSh.GetView().GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_PARA, SFXSTYLEBIT_ALL);
- aStyleLB.Clear();
+ m_pStyleLB->Clear();
const SfxStyleSheetBase* pBase = pPool->First();
while( pBase )
{
if(!pFmt || pBase->GetName() != pFmt->GetName())
- aStyleLB.InsertEntry(pBase->GetName());
+ m_pStyleLB->InsertEntry(pBase->GetName());
pBase = pPool->Next();
}
- aStyleLB.SelectEntryPos(0);
+ m_pStyleLB->SelectEntryPos(0);
- for( sal_uInt16 n = 0; n < aStrArr.Count(); n++)
+ for (size_t n = 0; n < m_aStrArr.size(); ++n)
{
- OUString aEntry( aStrArr.GetString(n) + "\t" );
+ OUString aEntry( m_aStrArr[n] + "\t" );
const SwCollCondition* pCond = 0;
if( pFmt && RES_CONDTXTFMTCOLL == pFmt->Which() &&
@@ -208,9 +208,9 @@ void SwCondCollPage::Reset(const SfxItemSet &/*rSet*/)
aEntry += pCond->GetTxtFmtColl()->GetName();
}
- SvTreeListEntry* pE = aTbLinks.InsertEntryToColumn( aEntry, n );
+ SvTreeListEntry* pE = m_pTbLinks->InsertEntryToColumn( aEntry, n );
if(0 == n)
- aTbLinks.Select(pE);
+ m_pTbLinks->Select(pE);
}
}
@@ -223,14 +223,14 @@ sal_uInt16* SwCondCollPage::GetRanges()
IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
{
const sal_Bool bEnable = pBox->IsChecked();
- aContextFT.Enable( bEnable );
- aUsedFT .Enable( bEnable );
- aTbLinks .EnableList( bEnable != sal_False );
- aStyleFT .Enable( bEnable );
- aStyleLB .Enable( bEnable );
- aFilterLB .Enable( bEnable );
- aRemovePB .Enable( bEnable );
- aAssignPB .Enable( bEnable );
+ m_pContextFT->Enable( bEnable );
+ m_pUsedFT->Enable( bEnable );
+ m_pTbLinks->EnableList( bEnable != sal_False );
+ m_pStyleFT->Enable( bEnable );
+ m_pStyleLB->Enable( bEnable );
+ m_pFilterLB->Enable( bEnable );
+ m_pRemovePB->Enable( bEnable );
+ m_pAssignPB->Enable( bEnable );
if( bEnable )
SelectHdl(0);
return 0;
@@ -238,40 +238,40 @@ IMPL_LINK( SwCondCollPage, OnOffHdl, CheckBox*, pBox )
IMPL_LINK( SwCondCollPage, AssignRemoveHdl, PushButton*, pBtn)
{
- SvTreeListEntry* pE = aTbLinks.FirstSelected();
+ SvTreeListEntry* pE = m_pTbLinks->FirstSelected();
sal_uLong nPos;
if( !pE || LISTBOX_ENTRY_NOTFOUND ==
- ( nPos = aTbLinks.GetModel()->GetAbsPos( pE ) ) )
+ ( nPos = m_pTbLinks->GetModel()->GetAbsPos( pE ) ) )
{
OSL_ENSURE( pE, "where's the empty entry from?" );
return 0;
}
- String sSel = aStrArr.GetString( sal_uInt16(nPos) );
- sSel += '\t';
+ OUString sSel = m_aStrArr[nPos];
+ sSel += "\t";
- const sal_Bool bAssEnabled = pBtn != &aRemovePB && aAssignPB.IsEnabled();
- aAssignPB.Enable( !bAssEnabled );
- aRemovePB.Enable( bAssEnabled );
+ const sal_Bool bAssEnabled = pBtn != m_pRemovePB && m_pAssignPB->IsEnabled();
+ m_pAssignPB->Enable( !bAssEnabled );
+ m_pRemovePB->Enable( bAssEnabled );
if ( bAssEnabled )
- sSel += aStyleLB.GetSelectEntry();
-
- aTbLinks.SetUpdateMode(sal_False);
- aTbLinks.GetModel()->Remove(pE);
- pE = aTbLinks.InsertEntryToColumn(sSel, nPos);
- aTbLinks.Select(pE);
- aTbLinks.MakeVisible(pE);
- aTbLinks.SetUpdateMode(sal_True);
+ sSel += m_pStyleLB->GetSelectEntry();
+
+ m_pTbLinks->SetUpdateMode(sal_False);
+ m_pTbLinks->GetModel()->Remove(pE);
+ pE = m_pTbLinks->InsertEntryToColumn(sSel, nPos);
+ m_pTbLinks->Select(pE);
+ m_pTbLinks->MakeVisible(pE);
+ m_pTbLinks->SetUpdateMode(sal_True);
return 0;
}
IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
{
- if(pBox == &aFilterLB)
+ if (pBox == m_pFilterLB)
{
- aStyleLB.Clear();
+ m_pStyleLB->Clear();
sal_uInt16 nSearchFlags = pBox->GetSelectEntryPos();
- nSearchFlags = *(sal_uInt16*)aFilterLB.GetEntryData(nSearchFlags);
+ nSearchFlags = *(sal_uInt16*)m_pFilterLB->GetEntryData(nSearchFlags);
SfxStyleSheetBasePool* pPool = rSh.GetView().GetDocShell()->GetStyleSheetPool();
pPool->SetSearchMask(SFX_STYLE_FAMILY_PARA, nSearchFlags);
const SfxStyleSheetBase* pBase = pPool->First();
@@ -279,26 +279,26 @@ IMPL_LINK( SwCondCollPage, SelectHdl, ListBox*, pBox)
while( pBase )
{
if(!pFmt || pBase->GetName() != pFmt->GetName())
- aStyleLB.InsertEntry(pBase->GetName());
+ m_pStyleLB->InsertEntry(pBase->GetName());
pBase = pPool->Next();
}
- aStyleLB.SelectEntryPos(0);
- SelectHdl(&aStyleLB);
+ m_pStyleLB->SelectEntryPos(0);
+ SelectHdl(m_pStyleLB);
}
else
{
String sTbEntry;
- SvTreeListEntry* pE = aTbLinks.FirstSelected();
+ SvTreeListEntry* pE = m_pTbLinks->FirstSelected();
if(pE)
- sTbEntry = aTbLinks.GetEntryText(pE);
+ sTbEntry = m_pTbLinks->GetEntryText(pE);
sTbEntry = sTbEntry.GetToken(1, '\t');
- String sStyle = aStyleLB.GetSelectEntry();
+ String sStyle = m_pStyleLB->GetSelectEntry();
- aAssignPB.Enable( sStyle != sTbEntry && aConditionCB.IsChecked() );
+ m_pAssignPB->Enable( sStyle != sTbEntry && m_pConditionCB->IsChecked() );
- if(pBox != &aStyleLB)
- aRemovePB.Enable( aConditionCB.IsChecked() && sTbEntry.Len() );
+ if(pBox != m_pStyleLB)
+ m_pRemovePB->Enable( m_pConditionCB->IsChecked() && sTbEntry.Len() );
}
return 0;
}
diff --git a/sw/source/ui/inc/swuiccoll.hxx b/sw/source/ui/inc/swuiccoll.hxx
index 58d920daa130..56113de8134d 100644
--- a/sw/source/ui/inc/swuiccoll.hxx
+++ b/sw/source/ui/inc/swuiccoll.hxx
@@ -26,22 +26,20 @@ class SwFmt;
class SwCondCollPage : public SfxTabPage
{
- FixedLine aConditionFL;
- CheckBox aConditionCB;
+ CheckBox* m_pConditionCB;
- FixedText aContextFT;
- FixedText aUsedFT;
- SvTabListBox aTbLinks;
+ FixedText* m_pContextFT;
+ FixedText* m_pUsedFT;
+ SvTabListBox* m_pTbLinks;
- FixedText aStyleFT;
- ListBox aStyleLB;
- ListBox aFilterLB;
+ FixedText* m_pStyleFT;
+ ListBox* m_pStyleLB;
+ ListBox* m_pFilterLB;
- PushButton aRemovePB;
- PushButton aAssignPB;
+ PushButton* m_pRemovePB;
+ PushButton* m_pAssignPB;
- String sNoTmpl;
- ResStringArray aStrArr;
+ std::vector<OUString> m_aStrArr;
SwWrtShell &rSh;
const CommandStruct*pCmds;
diff --git a/sw/uiconfig/swriter/ui/conditionpage.ui b/sw/uiconfig/swriter/ui/conditionpage.ui
new file mode 100644
index 000000000000..f357c89fd69e
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/conditionpage.ui
@@ -0,0 +1,266 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkGrid" id="ConditionPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="border_width">6</property>
+ <property name="row_spacing">18</property>
+ <child>
+ <object class="GtkFrame" id="frame4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkCheckButton" id="condstyle">
+ <property name="label" translatable="yes">_Conditional Style</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <accessibility>
+ <relation type="label-for" target="links:border"/>
+ </accessibility>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">3</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="contextft">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Conte_xt</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="usedft">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Applied Styles</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="styleft">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Paragraph Styles</property>
+ <property name="use_underline">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="svtlo-SvTabListBox" id="links:border">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <accessibility>
+ <relation type="labelled-by" target="condstyle"/>
+ </accessibility>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Tab List-selection1"/>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">2</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox" id="buttonbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="spacing">12</property>
+ <property name="layout_style">start</property>
+ <child>
+ <object class="GtkButton" id="remove">
+ <property name="label">gtk-remove</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="apply">
+ <property name="label">gtk-apply</property>
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">3</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkTreeView" id="styles:border">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection1"/>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="filter">
+ <property name="visible">True</property>
+ <property name="sensitive">False</property>
+ <property name="can_focus">False</property>
+ <property name="entry_text_column">0</property>
+ <property name="id_column">1</property>
+ <items>
+ <item translatable="yes">Table Header</item>
+ <item translatable="yes">Table</item>
+ <item translatable="yes">Frame</item>
+ <item translatable="yes">Section</item>
+ <item translatable="yes">Footnote</item>
+ <item translatable="yes">Endnote</item>
+ <item translatable="yes">Header</item>
+ <item translatable="yes">Footer</item>
+ <item translatable="yes"> 1st Outline Level</item>
+ <item translatable="yes"> 2nd Outline Level</item>
+ <item translatable="yes"> 3rd Outline Level</item>
+ <item translatable="yes"> 4th Outline Level</item>
+ <item translatable="yes"> 5th Outline Level</item>
+ <item translatable="yes"> 6th Outline Level</item>
+ <item translatable="yes"> 7th Outline Level</item>
+ <item translatable="yes"> 8th Outline Level</item>
+ <item translatable="yes"> 9th Outline Level</item>
+ <item translatable="yes">10th Outline Level</item>
+ <item translatable="yes"> 1st Numbering Level</item>
+ <item translatable="yes"> 2nd Numbering Level</item>
+ <item translatable="yes"> 3rd Numbering Level</item>
+ <item translatable="yes"> 4th Numbering Level</item>
+ <item translatable="yes"> 5th Numbering Level</item>
+ <item translatable="yes"> 6th Numbering Level</item>
+ <item translatable="yes"> 7th Numbering Level</item>
+ <item translatable="yes"> 8th Numbering Level</item>
+ <item translatable="yes"> 9th Numbering Level</item>
+ <item translatable="yes">10th Numbering Level</item>
+ </items>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+</interface>