[Libreoffice-commits] core.git: 3 commits - extras/source include/sfx2 include/svtools include/svx svtools/source svx/source sw/AllLangResTarget_sw.mk sw/inc sw/source sw/uiconfig sw/UIConfig_swriter.mk
Caolán McNamara
caolanm at redhat.com
Sun Aug 18 12:23:30 PDT 2013
extras/source/glade/libreoffice-catalog.xml.in | 4
include/sfx2/tabdlg.hxx | 6
include/svtools/editbrowsebox.hxx | 2
include/svx/gridctrl.hxx | 4
svtools/source/brwbox/editbrowsebox.cxx | 2
svx/source/fmcomp/gridctrl.cxx | 8
sw/AllLangResTarget_sw.mk | 1
sw/UIConfig_swriter.mk | 1
sw/inc/helpid.h | 2
sw/inc/ndgrf.hxx | 18 --
sw/inc/ndole.hxx | 9 -
sw/source/ui/fldui/flddinf.cxx | 162 +++++++++----------
sw/source/ui/fldui/flddinf.hxx | 16 -
sw/source/ui/fldui/flddinf.src | 104 ------------
sw/source/ui/fldui/fldpage.cxx | 18 +-
sw/source/ui/fldui/fldpage.hxx | 6
sw/source/ui/fldui/fldtdlg.hrc | 16 -
sw/source/ui/inc/numfmtlb.hxx | 2
sw/source/ui/utlui/numfmtlb.cxx | 28 +++
sw/uiconfig/swriter/ui/flddocinfopage.ui | 204 +++++++++++++++++++++++++
20 files changed, 369 insertions(+), 244 deletions(-)
New commits:
commit 4b42db15708aab7014ec37394ffd51430cdb5f1b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 18 16:16:53 2013 +0100
convert docinfo field page to .ui
Change-Id: Ic968fdf76f31373240ab70d45192f9716375628b
diff --git a/extras/source/glade/libreoffice-catalog.xml.in b/extras/source/glade/libreoffice-catalog.xml.in
index 64ccea3..1ac15b0 100644
--- a/extras/source/glade/libreoffice-catalog.xml.in
+++ b/extras/source/glade/libreoffice-catalog.xml.in
@@ -392,6 +392,10 @@
generic-name="PropertyControl" parent="VclComboBoxText"
icon-name="widget-gtk-comboboxtext"/>
+ <glade-widget-class title="NumFormatListBox" name="swlo-NumFormatListBox"
+ generic-name="NumFormatListBox" parent="VclComboBoxText"
+ icon-name="widget-gtk-comboboxtext"/>
+
<glade-widget-class title="Reference Button" name="foruilo-RefButton"
generic-name="Reference Button" parent="GtkButton"
icon-name="widget-gtk-button"/>
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 42c62d9..1474ad9 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -194,6 +194,12 @@ public:
{
return m_pTabCtrl->GetCurPageId();
}
+
+ SfxTabPage* GetCurTabPage() const
+ {
+ return GetTabPage(m_pTabCtrl->GetCurPageId());
+ }
+
OUString GetPageText( sal_uInt16 nPageId ) const
{
return m_pTabCtrl->GetPageText(nPageId);
diff --git a/sw/AllLangResTarget_sw.mk b/sw/AllLangResTarget_sw.mk
index 6317b49..2b096da 100644
--- a/sw/AllLangResTarget_sw.mk
+++ b/sw/AllLangResTarget_sw.mk
@@ -102,7 +102,6 @@ $(eval $(call gb_SrsTarget_add_files,sw/res,\
sw/source/ui/envelp/labfmt.src \
sw/source/ui/envelp/mailmrge.src \
sw/source/ui/fldui/flddb.src \
- sw/source/ui/fldui/flddinf.src \
sw/source/ui/fldui/flddok.src \
sw/source/ui/fldui/fldfunc.src \
sw/source/ui/fldui/fldref.src \
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 61f22dc..2351a3f 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -90,6 +90,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/envformatpage \
sw/uiconfig/swriter/ui/envprinterpage \
sw/uiconfig/swriter/ui/exchangedatabases \
+ sw/uiconfig/swriter/ui/flddocinfopage \
sw/uiconfig/swriter/ui/formatsectiondialog \
sw/uiconfig/swriter/ui/formattablepage \
sw/uiconfig/swriter/ui/footendnotedialog \
diff --git a/sw/inc/helpid.h b/sw/inc/helpid.h
index 01bdcbb..c08e11c 100644
--- a/sw/inc/helpid.h
+++ b/sw/inc/helpid.h
@@ -145,7 +145,6 @@
#define HID_COND_COLL "SW_HID_COND_COLL"
#define HID_FLD_DB "SW_HID_FLD_DB"
-#define HID_FLD_DOKINF "SW_HID_FLD_DOKINF"
#define HID_FLD_VAR "SW_HID_FLD_VAR"
#define HID_FLD_DOK "SW_HID_FLD_DOK"
#define HID_FLD_FUNC "SW_HID_FLD_FUNC"
@@ -332,7 +331,6 @@
#define HID_COND_COLL_TABLIST "SW_HID_COND_COLL_TABLIST"
#define HID_DB_SELECTION_TLB "SW_HID_DB_SELECTION_TLB"
-#define HID_FIELD_DINF_TYPE "SW_HID_FIELD_DINF_TYPE"
#define HID_SELECT_TEMPLATE "SW_HID_SELECT_TEMPLATE"
diff --git a/sw/source/ui/fldui/flddinf.cxx b/sw/source/ui/fldui/flddinf.cxx
index 68cb2a7..a5e7e62 100644
--- a/sw/source/ui/fldui/flddinf.cxx
+++ b/sw/source/ui/fldui/flddinf.cxx
@@ -48,32 +48,33 @@
using namespace nsSwDocInfoSubType;
using namespace com::sun::star;
-SwFldDokInfPage::SwFldDokInfPage(Window* pWindow, const SfxItemSet& rCoreSet ) :
- SwFldPage( pWindow, SW_RES( TP_FLD_DOKINF ), rCoreSet ),
-
- aTypeFT (this, SW_RES(FT_DOKINFTYPE)),
- aTypeTLB (this, SW_RES(TLB_DOKINFTYPE)),
- aSelectionFT(this, SW_RES(FT_DOKINFSELECTION)),
- aSelectionLB(this, SW_RES(LB_DOKINFSELECTION)),
- aFormatFT (this, SW_RES(FT_DOKINFFORMAT)),
- aFormatLB (this, SW_RES(LB_DOKINFFORMAT)),
- aFixedCB (this, SW_RES(CB_DOKINFFIXEDCONTENT)),
-
- pSelEntry (0),
- aInfoStr (SW_RES(STR_DOKINF_INFO))
+SwFldDokInfPage::SwFldDokInfPage(Window* pParent, const SfxItemSet& rCoreSet)
+ : SwFldPage(pParent, "FldDocInfoPage",
+ "modules/swriter/ui/flddocinfopage.ui", rCoreSet)
+ , pSelEntry(0)
{
- FreeResource();
-
- aTypeTLB.SetHelpId(HID_FIELD_DINF_TYPE);
- aTypeTLB.SetSelectionMode(SINGLE_SELECTION);
- aTypeTLB.SetStyle(aTypeTLB.GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
+ get(m_pTypeTLB, "type");
+ get(m_pSelection, "selectframe");
+ get(m_pFormat, "formatframe");
+ get(m_pSelectionLB, "select");
+ get(m_pFormatLB, "format");
+ get(m_pFixedCB, "fixed");
+
+ long nHeight = m_pTypeTLB->GetTextHeight() * 20;
+ m_pTypeTLB->set_height_request(nHeight);
+ m_pSelectionLB->set_height_request(nHeight);
+ m_pFormatLB->set_height_request(nHeight);
+
+ m_pTypeTLB->SetSelectionMode(SINGLE_SELECTION);
+ m_pTypeTLB->SetStyle(m_pTypeTLB->GetStyle()|WB_HASLINES|WB_CLIPCHILDREN|WB_SORT|WB_HASBUTTONS|WB_HASBUTTONSATROOT|WB_HSCROLL);
+ m_pTypeTLB->SetIndent(10);
// Don't set font, so that the control's font is adobted!
// Otherwise at wrong font bug to OV.
- aTypeTLB.SetSpaceBetweenEntries(0);
+ m_pTypeTLB->SetSpaceBetweenEntries(0);
- aTypeTLB.SetNodeDefaultImages();
+ m_pTypeTLB->SetNodeDefaultImages();
//enable 'active' language selection
- aFormatLB.SetShowLanguageControl(sal_True);
+ m_pFormatLB->SetShowLanguageControl(sal_True);
SFX_ITEMSET_ARG( &rCoreSet, pItem, SfxUnoAnyItem, SID_DOCINFO, sal_False );
if ( pItem )
@@ -89,8 +90,8 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
Init(); // general initialisation
// initialise TypeListBox
- aTypeTLB.SetUpdateMode(sal_False);
- aTypeTLB.Clear();
+ m_pTypeTLB->SetUpdateMode(sal_False);
+ m_pTypeTLB->Clear();
pSelEntry = 0;
// display SubTypes in TypeLB
@@ -108,13 +109,13 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
{
m_sOldCustomFieldName = static_cast<const SwDocInfoField*>(pCurField)->GetName();
}
- aFormatLB.SetAutomaticLanguage(pCurField->IsAutomaticLanguage());
+ m_pFormatLB->SetAutomaticLanguage(pCurField->IsAutomaticLanguage());
SwWrtShell *pSh = GetWrtShell();
if(pSh)
{
const SvNumberformat* pFormat = pSh->GetNumberFormatter()->GetEntry(pCurField->GetFormat());
if(pFormat)
- aFormatLB.SetLanguage(pFormat->GetLanguage());
+ m_pFormatLB->SetLanguage(pFormat->GetLanguage());
}
}
@@ -141,17 +142,17 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
if( rProperties.getLength() )
{
- pInfo = aTypeTLB.InsertEntry( String(SW_RES( STR_CUSTOM )) );
+ pInfo = m_pTypeTLB->InsertEntry( String(SW_RES( STR_CUSTOM )) );
pInfo->SetUserData(reinterpret_cast<void*>(USHRT_MAX));
for (sal_Int32 n=0; n < rProperties.getLength(); n++)
{
OUString sEntry = rProperties[n].Name;
- pEntry = aTypeTLB.InsertEntry(sEntry, pInfo);
+ pEntry = m_pTypeTLB->InsertEntry(sEntry, pInfo);
if(m_sOldCustomFieldName.equals( sEntry ))
{
pSelEntry = pEntry;
- aTypeTLB.Expand( pInfo );
+ m_pTypeTLB->Expand( pInfo );
}
pEntry->SetUserData(reinterpret_cast<void*>(i));
}
@@ -162,7 +163,7 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
{
if (!(IsFldDlgHtmlMode() && (i == DI_EDIT || i == DI_THEMA || i == DI_PRINT)))
{
- pEntry = aTypeTLB.InsertEntry(aLst[i]);
+ pEntry = m_pTypeTLB->InsertEntry(aLst[i]);
pEntry->SetUserData(reinterpret_cast<void*>(i));
}
}
@@ -174,12 +175,12 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
// select old Pos
if (pSelEntry != 0)
{
- aTypeTLB.Select(pSelEntry);
+ m_pTypeTLB->Select(pSelEntry);
nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
}
- else if ( aTypeTLB.GetEntry(0) )
+ else if ( m_pTypeTLB->GetEntry(0) )
{
- pSelEntry = aTypeTLB.GetEntry(0);
+ pSelEntry = m_pTypeTLB->GetEntry(0);
nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
}
@@ -187,18 +188,18 @@ void SwFldDokInfPage::Reset(const SfxItemSet& )
if ( pSelEntry )
TypeHdl();
- aTypeTLB.SetUpdateMode(sal_True);
- aTypeTLB.SetSelectHdl(LINK(this, SwFldDokInfPage, TypeHdl));
- aTypeTLB.SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl));
- aSelectionLB.SetSelectHdl(LINK(this, SwFldDokInfPage, SubTypeHdl));
- aSelectionLB.SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl));
- aFormatLB.SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl));
+ m_pTypeTLB->SetUpdateMode(sal_True);
+ m_pTypeTLB->SetSelectHdl(LINK(this, SwFldDokInfPage, TypeHdl));
+ m_pTypeTLB->SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl));
+ m_pSelectionLB->SetSelectHdl(LINK(this, SwFldDokInfPage, SubTypeHdl));
+ m_pSelectionLB->SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl));
+ m_pFormatLB->SetDoubleClickHdl(LINK(this, SwFldDokInfPage, InsertHdl));
if (IsFldEdit())
{
- nOldSel = aSelectionLB.GetSelectEntryPos();
+ nOldSel = m_pSelectionLB->GetSelectEntryPos();
nOldFormat = GetCurField()->GetFormat();
- aFixedCB.SaveValue();
+ m_pFixedCB->SaveValue();
}
}
@@ -208,12 +209,12 @@ IMPL_LINK_NOARG(SwFldDokInfPage, TypeHdl)
SvTreeListEntry* pOldEntry = pSelEntry;
// current ListBoxPos
- pSelEntry = aTypeTLB.FirstSelected();
+ pSelEntry = m_pTypeTLB->FirstSelected();
if(!pSelEntry)
{
- pSelEntry = aTypeTLB.GetEntry(0);
- aTypeTLB.Select(pSelEntry);
+ pSelEntry = m_pTypeTLB->GetEntry(0);
+ m_pTypeTLB->Select(pSelEntry);
}
else if (pOldEntry != pSelEntry)
FillSelectionLB((sal_uInt16)(sal_uLong)pSelEntry->GetUserData());
@@ -226,7 +227,7 @@ IMPL_LINK_NOARG(SwFldDokInfPage, TypeHdl)
IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
{
sal_uInt16 nSubType = (sal_uInt16)(sal_uLong)pSelEntry->GetUserData();
- sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
sal_uInt16 nExtSubType;
sal_uInt16 nNewType = 0;
@@ -234,15 +235,14 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
{
if (nPos == LISTBOX_ENTRY_NOTFOUND)
{
- if (!aSelectionLB.GetEntryCount())
+ if (!m_pSelectionLB->GetEntryCount())
{
- aFormatLB.Clear();
- aFormatLB.Enable(sal_False);
- aFormatFT.Enable(sal_False);
+ m_pFormatLB->Clear();
+ m_pFormat->Enable(sal_False);
if( nSubType == DI_CUSTOM )
{
//find out which type the custom field has - for a start set to DATE format
- OUString sName = aTypeTLB.GetEntryText(pSelEntry);
+ OUString sName = m_pTypeTLB->GetEntryText(pSelEntry);
try
{
uno::Any aVal = xCustomPropertySet->getPropertyValue( sName );
@@ -270,7 +270,7 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
nPos = 0;
}
- nExtSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
+ nExtSubType = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nPos);
}
else
nExtSubType = DI_SUB_TIME;
@@ -279,8 +279,8 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
sal_Bool bEnable = sal_False;
sal_Bool bOneArea = sal_False;
- if (aFormatLB.IsEnabled())
- nOldType = aFormatLB.GetFormatType();
+ if (m_pFormatLB->IsEnabled())
+ nOldType = m_pFormatLB->GetFormatType();
switch (nExtSubType)
{
@@ -299,14 +299,14 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
}
if (!nNewType)
{
- aFormatLB.Clear();
+ m_pFormatLB->Clear();
}
else
{
if (nOldType != nNewType)
{
- aFormatLB.SetFormatType(nNewType);
- aFormatLB.SetOneArea(bOneArea);
+ m_pFormatLB->SetFormatType(nNewType);
+ m_pFormatLB->SetOneArea(bOneArea);
}
bEnable = sal_True;
}
@@ -317,10 +317,10 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
if (IsFldEdit())
{
- nPos = aSelectionLB.GetSelectEntryPos();
+ nPos = m_pSelectionLB->GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND )
{
- nSubType = (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
+ nSubType = (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nPos);
nOldSubType &= ~DI_SUB_FIXED;
if (nOldSubType == nSubType)
@@ -331,28 +331,27 @@ IMPL_LINK_NOARG(SwFldDokInfPage, SubTypeHdl)
if(pSh)
{
SvNumberFormatter* pFormatter = pSh->GetNumberFormatter();
- LanguageType eLang = aFormatLB.GetCurLanguage();
+ LanguageType eLang = m_pFormatLB->GetCurLanguage();
if (nNewType == NUMBERFORMAT_DATE)
nFormat = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_SHORT, eLang);
else if (nNewType == NUMBERFORMAT_TIME)
nFormat = pFormatter->GetFormatIndex( NF_TIME_HHMM, eLang);
}
}
- aFormatLB.SetDefFormat(nFormat);
+ m_pFormatLB->SetDefFormat(nFormat);
}
}
else if( (nSubType == DI_CUSTOM) && (nNewType != 0) )
{
- aFormatLB.SetDefFormat(nFormat);
+ m_pFormatLB->SetDefFormat(nFormat);
}
}
- aFormatLB.Enable(bEnable);
- aFormatFT.Enable(bEnable);
+ m_pFormat->Enable(bEnable);
- if (bEnable && aFormatLB.GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND)
+ if (bEnable && m_pFormatLB->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND)
{
- aFormatLB.SelectEntryPos(0);
+ m_pFormatLB->SelectEntryPos(0);
}
return 0;
@@ -368,7 +367,7 @@ sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
if (nSubType == USHRT_MAX) // Info-Text
nSubType = DI_SUBTYPE_BEGIN;
- aSelectionLB.Clear();
+ m_pSelectionLB->Clear();
sal_uInt16 nSize = 0;
sal_uInt16 nSelPos = USHRT_MAX;
@@ -376,7 +375,7 @@ sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
if (IsFldEdit())
{
- aFixedCB.Check((nExtSubType & DI_SUB_FIXED) != 0);
+ m_pFixedCB->Check((nExtSubType & DI_SUB_FIXED) != 0);
nExtSubType = ((nExtSubType & ~DI_SUB_FIXED) >> 8) - 1;
}
@@ -389,8 +388,8 @@ sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
nSize = GetFldMgr().GetFormatCount(nTypeId, false, IsFldDlgHtmlMode());
for (sal_uInt16 i = 0; i < nSize; i++)
{
- sal_uInt16 nPos = aSelectionLB.InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
- aSelectionLB.SetEntryData(nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId(nTypeId, i)));
+ sal_uInt16 nPos = m_pSelectionLB->InsertEntry(GetFldMgr().GetFormatStr(nTypeId, i));
+ m_pSelectionLB->SetEntryData(nPos, reinterpret_cast<void*>(GetFldMgr().GetFormatId(nTypeId, i)));
if (IsFldEdit() && i == nExtSubType)
nSelPos = nPos;
}
@@ -400,14 +399,13 @@ sal_uInt16 SwFldDokInfPage::FillSelectionLB(sal_uInt16 nSubType)
if (nSize)
{
- if (!aSelectionLB.GetSelectEntryCount())
- aSelectionLB.SelectEntryPos(nSelPos == USHRT_MAX ? 0 : nSelPos);
+ if (!m_pSelectionLB->GetSelectEntryCount())
+ m_pSelectionLB->SelectEntryPos(nSelPos == USHRT_MAX ? 0 : nSelPos);
bEnable = sal_True;
}
- aSelectionFT.Enable(bEnable);
- aSelectionLB.Enable(bEnable);
+ m_pSelection->Enable(bEnable);
return nSize;
}
@@ -422,28 +420,28 @@ sal_Bool SwFldDokInfPage::FillItemSet(SfxItemSet& )
sal_uLong nFormat = 0;
- sal_uInt16 nPos = aSelectionLB.GetSelectEntryPos();
+ sal_uInt16 nPos = m_pSelectionLB->GetSelectEntryPos();
OUString aName;
if (DI_CUSTOM == nSubType)
- aName = aTypeTLB.GetEntryText(pSelEntry);
+ aName = m_pTypeTLB->GetEntryText(pSelEntry);
if (nPos != LISTBOX_ENTRY_NOTFOUND)
- nSubType |= (sal_uInt16)(sal_uLong)aSelectionLB.GetEntryData(nPos);
+ nSubType |= (sal_uInt16)(sal_uLong)m_pSelectionLB->GetEntryData(nPos);
- if (aFixedCB.IsChecked())
+ if (m_pFixedCB->IsChecked())
nSubType |= DI_SUB_FIXED;
- nPos = aFormatLB.GetSelectEntryPos();
+ nPos = m_pFormatLB->GetSelectEntryPos();
if(nPos != LISTBOX_ENTRY_NOTFOUND)
- nFormat = aFormatLB.GetFormat();
+ nFormat = m_pFormatLB->GetFormat();
- if (!IsFldEdit() || nOldSel != aSelectionLB.GetSelectEntryPos() ||
- nOldFormat != nFormat || aFixedCB.GetState() != aFixedCB.GetSavedValue()
+ if (!IsFldEdit() || nOldSel != m_pSelectionLB->GetSelectEntryPos() ||
+ nOldFormat != nFormat || m_pFixedCB->GetState() != m_pFixedCB->GetSavedValue()
|| (DI_CUSTOM == nSubType && !aName.equals( m_sOldCustomFieldName )))
{
InsertFld(nTypeId, nSubType, aName, aEmptyStr, nFormat,
- ' ', aFormatLB.IsAutomaticLanguage());
+ ' ', m_pFormatLB->IsAutomaticLanguage());
}
return sal_False;
@@ -464,7 +462,7 @@ void SwFldDokInfPage::FillUserData()
{
String sData(OUString(USER_DATA_VERSION));
sData += ';';
- SvTreeListEntry* pEntry = aTypeTLB.FirstSelected();
+ SvTreeListEntry* pEntry = m_pTypeTLB->FirstSelected();
sal_uInt16 nTypeSel = pEntry ? sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >(pEntry->GetUserData())) : USHRT_MAX;
sData += OUString::number( nTypeSel );
SetUserData(sData);
diff --git a/sw/source/ui/fldui/flddinf.hxx b/sw/source/ui/fldui/flddinf.hxx
index 71bcfb1..188c321 100644
--- a/sw/source/ui/fldui/flddinf.hxx
+++ b/sw/source/ui/fldui/flddinf.hxx
@@ -21,6 +21,7 @@
#include <sfx2/tabdlg.hxx>
#include <vcl/fixed.hxx>
+#include <vcl/layout.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/button.hxx>
#include <vcl/group.hxx>
@@ -35,19 +36,16 @@ namespace com{namespace sun{ namespace star{ namespace beans{
class SwFldDokInfPage : public SwFldPage
{
- FixedText aTypeFT;
- SvTreeListBox aTypeTLB;
- FixedText aSelectionFT;
- ListBox aSelectionLB;
- FixedText aFormatFT;
- NumFormatListBox aFormatLB;
- CheckBox aFixedCB;
+ SvTreeListBox* m_pTypeTLB;
+ VclContainer* m_pSelection;
+ ListBox* m_pSelectionLB;
+ VclContainer* m_pFormat;
+ NumFormatListBox* m_pFormatLB;
+ CheckBox* m_pFixedCB;
SvTreeListEntry* pSelEntry;
com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > xCustomPropertySet;
- String aInfoStr;
-
sal_uInt16 nOldSel;
sal_uLong nOldFormat;
OUString m_sOldCustomFieldName;
diff --git a/sw/source/ui/fldui/flddinf.src b/sw/source/ui/fldui/flddinf.src
deleted file mode 100644
index 98bd9d5..0000000
--- a/sw/source/ui/fldui/flddinf.src
+++ /dev/null
@@ -1,104 +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 "fldtdlg.hrc"
-#include "helpid.h"
-TabPage TP_FLD_DOKINF
-{
- HelpID = HID_FLD_DOKINF ;
- SVLook = TRUE ;
- Hide = TRUE ;
- Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
- FixedText FT_DOKINFTYPE
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 76 , 8 ) ;
- Text [ en-US ] = "~Type" ;
- Left = TRUE ;
- };
- Control TLB_DOKINFTYPE
- {
- Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 16 ) ;
- Size = MAP_APPFONT ( 76 , 163 ) ;
- TabStop = TRUE ;
- };
- FixedText FT_DOKINFSELECTION
- {
- Pos = MAP_APPFONT ( 88 , 3 ) ;
- Size = MAP_APPFONT ( 76 , 8 ) ;
- Text [ en-US ] = "S~elect" ;
- Left = TRUE ;
- };
- ListBox LB_DOKINFSELECTION
- {
- HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFSELECTION";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 88 , 16 ) ;
- Size = MAP_APPFONT ( 76 , 163 ) ;
- TabStop = TRUE ;
- StringList [ en-US ] =
- {
- < "Author" ; > ;
- < "Time" ; > ;
- < "Date" ; > ;
- < "Date Time Author" ; > ;
- };
- };
- FixedText FT_DOKINFFORMAT
- {
- Pos = MAP_APPFONT ( 170 , 3 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Left = TRUE ;
- Text [ en-US ] = "F~ormat" ;
- };
- ListBox LB_DOKINFFORMAT
- {
- HelpID = "sw:ListBox:TP_FLD_DOKINF:LB_DOKINFFORMAT";
- Border = TRUE ;
- Pos = MAP_APPFONT ( 170 , 16 ) ;
- Size = MAP_APPFONT ( 84 , 148 ) ;
- TabStop = TRUE ;
- AutoHScroll = TRUE ;
- };
- CheckBox CB_DOKINFFIXEDCONTENT
- {
- HelpID = "sw:CheckBox:TP_FLD_DOKINF:CB_DOKINFFIXEDCONTENT";
- Pos = MAP_APPFONT ( 170 , 170 ) ;
- Size = MAP_APPFONT ( 72 , 10 ) ;
- TabStop = TRUE ;
- Text [ en-US ] = "~Fixed content" ;
- };
- Bitmap BMP_DOKINFROOT_OPENED
- {
- File = "plus.bmp" ;
- };
- Bitmap BMP_DOKINFROOT_CLOSED
- {
- File = "minus.bmp" ;
- };
- String STR_DOKINF_INFO
- {
- Text [ en-US ] = "Info" ;
- };
- Text [ en-US ] = "DocInformation" ;
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/fldui/fldpage.cxx b/sw/source/ui/fldui/fldpage.cxx
index 6c54aa5..d36c309 100644
--- a/sw/source/ui/fldui/fldpage.cxx
+++ b/sw/source/ui/fldui/fldpage.cxx
@@ -46,7 +46,6 @@ SwFldPage::SwFldPage( Window *pParent, const ResId &rId,
:SfxTabPage (pParent, rId, rAttrSet),
m_pCurFld (0),
m_pWrtShell (0),
- m_nPageId ( static_cast< sal_uInt16 >(rId.GetId()) ),
m_nTypeSel (LISTBOX_ENTRY_NOTFOUND),
m_nSelectionSel (LISTBOX_ENTRY_NOTFOUND),
m_bFldEdit (false),
@@ -58,6 +57,21 @@ SwFldPage::SwFldPage( Window *pParent, const ResId &rId,
}
+SwFldPage::SwFldPage(Window *pParent, const OString& rID,
+ const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet)
+ : SfxTabPage(pParent, rID, rUIXMLDescription, rAttrSet)
+ , m_pCurFld(0)
+ , m_pWrtShell(0)
+ , m_nTypeSel(LISTBOX_ENTRY_NOTFOUND)
+ , m_nSelectionSel(LISTBOX_ENTRY_NOTFOUND)
+ , m_bFldEdit(false)
+ , m_bInsert(true)
+ , m_bFldDlgHtmlMode(false)
+ , m_bRefresh(false)
+ , m_bFirstHTMLInit(true)
+{
+}
+
SwFldPage::~SwFldPage()
{
}
@@ -354,7 +368,7 @@ void SwFldPage::EnableInsert(sal_Bool bEnable)
if (pDlg)
{
- if (pDlg->GetCurPageId() == m_nPageId)
+ if (pDlg->GetCurTabPage() == this)
pDlg->EnableInsert(bEnable);
}
else
diff --git a/sw/source/ui/fldui/fldpage.hxx b/sw/source/ui/fldui/fldpage.hxx
index 69813f6..40aa937 100644
--- a/sw/source/ui/fldui/fldpage.hxx
+++ b/sw/source/ui/fldui/fldpage.hxx
@@ -32,7 +32,6 @@ class SwFldPage : public SfxTabPage
SwFldMgr m_aMgr;
SwField *m_pCurFld;
SwWrtShell* m_pWrtShell;
- sal_uInt16 m_nPageId;
sal_uInt16 m_nTypeSel;
sal_uInt16 m_nSelectionSel;
bool m_bFldEdit;
@@ -80,7 +79,10 @@ public:
const ResId &rId,
const SfxItemSet &rAttrSet );
- virtual ~SwFldPage();
+ SwFldPage(Window *pParent, const OString& rID,
+ const OUString& rUIXMLDescription, const SfxItemSet &rAttrSet);
+
+ virtual ~SwFldPage();
virtual void ActivatePage();
diff --git a/sw/source/ui/fldui/fldtdlg.hrc b/sw/source/ui/fldui/fldtdlg.hrc
index b26318b..55586ff 100644
--- a/sw/source/ui/fldui/fldtdlg.hrc
+++ b/sw/source/ui/fldui/fldtdlg.hrc
@@ -42,22 +42,8 @@
#define FT_ADDDB (RC_TP_DB_START + 16)
#define PB_ADDDB (RC_TP_DB_START + 17)
-// Documentinfo-TabPage:
-#define RC_TP_DOCINF_START (RC_TP_DB_END)
-#define FT_DOKINFTYPE (RC_TP_DOCINF_START + 1)
-#define TLB_DOKINFTYPE (RC_TP_DOCINF_START + 2)
-#define FT_DOKINFSELECTION (RC_TP_DOCINF_START + 3)
-#define LB_DOKINFSELECTION (RC_TP_DOCINF_START + 4)
-#define FT_DOKINFFORMAT (RC_TP_DOCINF_START + 5)
-#define LB_DOKINFFORMAT (RC_TP_DOCINF_START + 6)
-#define CB_DOKINFFIXEDCONTENT (RC_TP_DOCINF_START + 7)
-#define BMP_DOKINFROOT_OPENED (RC_TP_DOCINF_START + 8)
-#define BMP_DOKINFROOT_CLOSED (RC_TP_DOCINF_START + 9)
-#define STR_DOKINF_INFO (RC_TP_DOCINF_START + 10)
-#define RC_TP_DOCINF_END (RC_TP_DOCINF_START + 11)
-
// Variable-TabPage:
-#define RC_TP_VAR_START (RC_TP_DOCINF_END)
+#define RC_TP_VAR_START (RC_TP_DB_END)
#define FT_VARTYPE (RC_TP_VAR_START + 1)
#define LB_VARTYPE (RC_TP_VAR_START + 2)
#define FT_VARSELECTION (RC_TP_VAR_START + 3)
diff --git a/sw/source/ui/inc/numfmtlb.hxx b/sw/source/ui/inc/numfmtlb.hxx
index d1dafdf..28cfd6e 100644
--- a/sw/source/ui/inc/numfmtlb.hxx
+++ b/sw/source/ui/inc/numfmtlb.hxx
@@ -45,6 +45,8 @@ class SW_DLLPUBLIC NumFormatListBox : public ListBox
SW_DLLPRIVATE SwView* GetView();
public:
+ NumFormatListBox(Window* pWin, WinBits nStyle);
+
NumFormatListBox( Window* pWin, const ResId& rResId,
short nFormatType = NUMBERFORMAT_NUMBER, sal_uLong nDefFmt = 0,
sal_Bool bUsrFmts = sal_True );
diff --git a/sw/source/ui/utlui/numfmtlb.cxx b/sw/source/ui/utlui/numfmtlb.cxx
index 58926e6..f3e8de2 100644
--- a/sw/source/ui/utlui/numfmtlb.cxx
+++ b/sw/source/ui/utlui/numfmtlb.cxx
@@ -70,6 +70,34 @@ NumFormatListBox::NumFormatListBox( Window* pWin, const ResId& rResId,
Init(nFormatType, bUsrFmts);
}
+NumFormatListBox::NumFormatListBox(Window* pWin, WinBits nStyle) :
+ ListBox ( pWin, nStyle ),
+ nCurrFormatType (-1),
+ nStdEntry (0),
+ bOneArea (sal_False),
+ nDefFormat (0),
+ pVw (0),
+ pOwnFormatter (0),
+ bShowLanguageControl(sal_False),
+ bUseAutomaticLanguage(sal_True)
+{
+ Init(NUMBERFORMAT_NUMBER, true);
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeNumFormatListBox(Window *pParent, VclBuilder::stringmap &rMap)
+{
+ WinBits nBits = WB_LEFT|WB_VCENTER|WB_3DLOOK;
+
+ bool bDropdown = VclBuilder::extractDropdown(rMap);
+
+ if (bDropdown)
+ nBits |= WB_DROPDOWN;
+ else
+ nBits |= WB_BORDER;
+
+ return new NumFormatListBox(pParent, nBits|WB_SIMPLEMODE);
+}
+
NumFormatListBox::NumFormatListBox( Window* pWin, SwView* pView,
const ResId& rResId, short nFormatType,
sal_uLong nDefFmt, sal_Bool bUsrFmts ) :
diff --git a/sw/uiconfig/swriter/ui/flddocinfopage.ui b/sw/uiconfig/swriter/ui/flddocinfopage.ui
new file mode 100644
index 0000000..a6cdd31
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/flddocinfopage.ui
@@ -0,0 +1,204 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkBox" id="FldDocInfoPage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="spacing">12</property>
+ <property name="homogeneous">True</property>
+ <child>
+ <object class="GtkFrame" id="typeframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <child>
+ <object class="svtlo-SvTreeListBox" id="type:border">
+ <property name="visible">True</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>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Type</property>
+ <property name="use_underline">True</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="selectframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <child>
+ <object class="GtkTreeView" id="select:border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="model">liststore1</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="treeview-selection3"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">S_elect</property>
+ <property name="use_underline">True</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="formatframe">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="swlo-NumFormatListBox" id="format:border">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="dropdown">False</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="fixed">
+ <property name="label" translatable="yes">_Fixed content</property>
+ <property name="visible">True</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>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">F_ormat</property>
+ <property name="use_underline">True</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Author</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Time</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Date</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Date Time Author</col>
+ </row>
+ </data>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <property name="mode">both</property>
+ <widgets>
+ <widget name="type:border"/>
+ <widget name="select:border"/>
+ <widget name="format:border"/>
+ </widgets>
+ </object>
+</interface>
commit 81aa4049d1b3109dc792ee3ef06d07ac535dd755
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Aug 18 16:15:25 2013 +0100
XubString->OUString
Change-Id: I0b7c2753fd6974e0db88cc47156156a37cd92987
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index c9299d3..6add6f7 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -578,7 +578,7 @@ namespace svt
// inserting columns
// if you don't set a width, this will be calculated automatically
// if the id isn't set the smallest unused will do it ...
- virtual sal_uInt16 AppendColumn(const String& rName, sal_uInt16 nWidth = 0, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = (sal_uInt16)-1);
+ virtual sal_uInt16 AppendColumn(const OUString& rName, sal_uInt16 nWidth = 0, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = (sal_uInt16)-1);
// called whenever (Shift)Tab or Enter is pressed. If true is returned, these keys
// result in traveling to the next or to th previous cell
diff --git a/include/svx/gridctrl.hxx b/include/svx/gridctrl.hxx
index 147683a..86ff77f 100644
--- a/include/svx/gridctrl.hxx
+++ b/include/svx/gridctrl.hxx
@@ -321,7 +321,7 @@ protected:
virtual sal_Bool SaveModified();
virtual sal_Bool IsModified() const;
- virtual sal_uInt16 AppendColumn(const String& rName, sal_uInt16 nWidth = 0, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = (sal_uInt16)-1);
+ virtual sal_uInt16 AppendColumn(const OUString& rName, sal_uInt16 nWidth = 0, sal_uInt16 nPos = HEADERBAR_APPEND, sal_uInt16 nId = (sal_uInt16)-1);
virtual void RemoveColumn(sal_uInt16 nId);
virtual DbGridColumn* CreateColumn(sal_uInt16 nId) const;
virtual void ColumnMoved(sal_uInt16 nId);
@@ -557,7 +557,7 @@ protected:
sal_Int32 AlignSeekCursor();
sal_Bool SetCurrent(long nNewRow);
- String GetCurrentRowCellText(DbGridColumn* pCol,const DbGridRowRef& _rRow) const;
+ OUString GetCurrentRowCellText(DbGridColumn* pCol,const DbGridRowRef& _rRow) const;
virtual void DeleteSelectedRows();
sal_Bool IsValid(const DbGridRowRef& _xRow) const {return _xRow && _xRow->IsValid();}
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 9e0ab71..252eed7 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -1145,7 +1145,7 @@ namespace svt
}
//------------------------------------------------------------------------------
- sal_uInt16 EditBrowseBox::AppendColumn(const String& rName, sal_uInt16 nWidth, sal_uInt16 nPos, sal_uInt16 nId)
+ sal_uInt16 EditBrowseBox::AppendColumn(const OUString& rName, sal_uInt16 nWidth, sal_uInt16 nPos, sal_uInt16 nId)
{
if (nId == BROWSER_INVALIDID)
{
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 20b707b..3cfaf85 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -466,7 +466,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls()
// Controls Groessen und Positionen setzen
//
- XubString aText = m_aRecordText.GetText();
+ OUString aText = m_aRecordText.GetText();
long nTextWidth = m_aRecordText.GetTextWidth(aText);
m_aRecordText.SetPosPixel(Point(nX,nY));
m_aRecordText.SetSizePixel(Size(nTextWidth,nH));
@@ -1653,7 +1653,7 @@ DbGridColumn* DbGridControl::CreateColumn(sal_uInt16 nId) const
}
//------------------------------------------------------------------------------
-sal_uInt16 DbGridControl::AppendColumn(const XubString& rName, sal_uInt16 nWidth, sal_uInt16 nModelPos, sal_uInt16 nId)
+sal_uInt16 DbGridControl::AppendColumn(const OUString& rName, sal_uInt16 nWidth, sal_uInt16 nModelPos, sal_uInt16 nId)
{
DBG_ASSERT(nId == BROWSER_INVALIDID, "DbGridControl::AppendColumn : I want to set the ID myself ...");
sal_uInt16 nRealPos = nModelPos;
@@ -2705,10 +2705,10 @@ OUString DbGridControl::GetCellText(long _nRow, sal_uInt16 _nColId) const
return sRet;
}
//------------------------------------------------------------------------------
-XubString DbGridControl::GetCurrentRowCellText(DbGridColumn* pColumn,const DbGridRowRef& _rRow) const
+OUString DbGridControl::GetCurrentRowCellText(DbGridColumn* pColumn,const DbGridRowRef& _rRow) const
{
// Ausgabe des Textes fuer eine Zelle
- XubString aText;
+ OUString aText;
if ( pColumn && IsValid(_rRow) )
aText = pColumn->GetCellText(_rRow, m_xFormatter);
return aText;
commit af1bbf10230a031702a6a9d5dc9a1458b48c3b2b
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sat Aug 17 11:16:14 2013 +0200
_FESHVIEW_ONLY_INLINE_NEEDED is never defined
Change-Id: I3706675aa18d4a2f6ecdcfef1e36da8c87adafac
diff --git a/sw/inc/ndgrf.hxx b/sw/inc/ndgrf.hxx
index e970615..ca2367a 100644
--- a/sw/inc/ndgrf.hxx
+++ b/sw/inc/ndgrf.hxx
@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _NDGRF_HXX
-#define _NDGRF_HXX
+#ifndef NDGRF_HXX
+#define NDGRF_HXX
#include <sfx2/lnkbase.hxx>
#include <svtools/grfmgr.hxx>
#include <ndnotxt.hxx>
@@ -147,7 +147,6 @@ public:
void onGraphicChanged();
virtual Size GetTwipSize() const;
-#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
void SetTwipSize( const Size& rSz );
sal_Bool IsTransparent() const;
@@ -166,10 +165,9 @@ public:
inline sal_Bool IsScaleImageMap() const { return bScaleImageMap; }
inline void SetScaleImageMap( sal_Bool b ) { bScaleImageMap = b; }
-#endif
- /// in ndcopy.cxx
+
+ /// in ndcopy.cxx
virtual SwCntntNode* MakeCopy( SwDoc*, const SwNodeIndex& ) const;
-#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
/** Re-read in case graphic was not OK. The current one
gets replaced by the new one. */
@@ -186,14 +184,11 @@ public:
void SetNewStreamName( const String& r ) { aNewStrmName = r; }
/// Is this node selected by any shell?
sal_Bool IsSelected() const;
-#endif
/// Communicate to graphic that node is in Undo-range.
virtual sal_Bool SavePersistentData();
virtual sal_Bool RestorePersistentData();
-#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
-
/// Query link-data.
bool IsGrfLink() const { return refLink.Is(); }
inline bool IsLinkedFile() const;
@@ -209,7 +204,6 @@ public:
/// Returns the with our graphic attributes filled Graphic-Attr-Structure.
GraphicAttr& GetGraphicAttr( GraphicAttr&, const SwFrm* pFrm ) const;
-#endif
boost::weak_ptr< SwAsyncRetrieveInputStreamThreadConsumer > GetThreadConsumer();
bool IsLinkedInputStreamReady() const;
void TriggerAsyncRetrieveInputStream();
@@ -226,21 +220,21 @@ inline SwGrfNode *SwNode::GetGrfNode()
{
return ND_GRFNODE == nNodeType ? (SwGrfNode*)this : 0;
}
+
inline const SwGrfNode *SwNode::GetGrfNode() const
{
return ND_GRFNODE == nNodeType ? (const SwGrfNode*)this : 0;
}
-#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
inline bool SwGrfNode::IsLinkedFile() const
{
return refLink.Is() && OBJECT_CLIENT_GRF == refLink->GetObjType();
}
+
inline bool SwGrfNode::IsLinkedDDE() const
{
return refLink.Is() && OBJECT_CLIENT_DDE == refLink->GetObjType();
}
-#endif
#endif
diff --git a/sw/inc/ndole.hxx b/sw/inc/ndole.hxx
index 9596d4b..3a80cea 100644
--- a/sw/inc/ndole.hxx
+++ b/sw/inc/ndole.hxx
@@ -16,8 +16,8 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _NDOLE_HXX
-#define _NDOLE_HXX
+#ifndef NDOLE_HXX
+#define NDOLE_HXX
#include <ndnotxt.hxx>
@@ -58,12 +58,10 @@ public:
String GetDescription();
-#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
const com::sun::star::uno::Reference < com::sun::star::embed::XEmbeddedObject > GetOleRef();
svt::EmbeddedObjectRef& GetObject();
const String& GetCurrentPersistName() const { return aName; }
sal_Bool IsOleRef() const; ///< To avoid unneccessary loading of object.
-#endif
};
@@ -139,11 +137,8 @@ public:
// #i99665#
bool IsChart() const;
-
-#ifndef _FESHVIEW_ONLY_INLINE_NEEDED
const String& GetChartTblName() const { return sChartTblName; }
void SetChartTblName( const String& rNm ) { sChartTblName = rNm; }
-#endif
};
More information about the Libreoffice-commits
mailing list