weld DataSourceTabPage
Change-Id: I99b7c2ec397829c2f7ceb7ec18ae24195b9781e2 Reviewed-on: https://gerrit.libreoffice.org/61800 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -125,7 +125,6 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
|
|||||||
chart2/source/controller/dialogs/tp_AxisPositions \
|
chart2/source/controller/dialogs/tp_AxisPositions \
|
||||||
chart2/source/controller/dialogs/tp_ChartType \
|
chart2/source/controller/dialogs/tp_ChartType \
|
||||||
chart2/source/controller/dialogs/tp_DataLabel \
|
chart2/source/controller/dialogs/tp_DataLabel \
|
||||||
chart2/source/controller/dialogs/tp_DataSourceControls \
|
|
||||||
chart2/source/controller/dialogs/tp_DataSource \
|
chart2/source/controller/dialogs/tp_DataSource \
|
||||||
chart2/source/controller/dialogs/tp_ErrorBars \
|
chart2/source/controller/dialogs/tp_ErrorBars \
|
||||||
chart2/source/controller/dialogs/tp_LegendPosition \
|
chart2/source/controller/dialogs/tp_LegendPosition \
|
||||||
|
@@ -138,7 +138,7 @@ DataSourceDialog::DataSourceDialog(vcl::Window * pParent,
|
|||||||
|
|
||||||
m_pRangeChooserTabPage = VclPtr<RangeChooserTabPage>::Create(TabPageParent(m_pTabControl), *(m_apDialogModel.get()),
|
m_pRangeChooserTabPage = VclPtr<RangeChooserTabPage>::Create(TabPageParent(m_pTabControl), *(m_apDialogModel.get()),
|
||||||
m_apDocTemplateProvider.get(), this, true /* bHideDescription */ );
|
m_apDocTemplateProvider.get(), this, true /* bHideDescription */ );
|
||||||
m_pDataSourceTabPage = VclPtr<DataSourceTabPage>::Create(m_pTabControl, *(m_apDialogModel.get()),
|
m_pDataSourceTabPage = VclPtr<DataSourceTabPage>::Create(TabPageParent(m_pTabControl), *(m_apDialogModel.get()),
|
||||||
m_apDocTemplateProvider.get(), this, true /* bHideDescription */ );
|
m_apDocTemplateProvider.get(), this, true /* bHideDescription */ );
|
||||||
|
|
||||||
m_pTabControl->InsertPage( TP_RANGECHOOSER, SchResId(STR_PAGE_DATA_RANGE) );
|
m_pTabControl->InsertPage( TP_RANGECHOOSER, SchResId(STR_PAGE_DATA_RANGE) );
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
#include "ChartTypeTemplateProvider.hxx"
|
#include "ChartTypeTemplateProvider.hxx"
|
||||||
#include <RangeSelectionHelper.hxx>
|
#include <RangeSelectionHelper.hxx>
|
||||||
#include <DataSeriesHelper.hxx>
|
#include <DataSeriesHelper.hxx>
|
||||||
#include "tp_DataSourceControls.hxx"
|
|
||||||
#include <ControllerLockGuard.hxx>
|
#include <ControllerLockGuard.hxx>
|
||||||
#include <DataSourceHelper.hxx>
|
#include <DataSourceHelper.hxx>
|
||||||
#include "DialogModel.hxx"
|
#include "DialogModel.hxx"
|
||||||
@@ -55,84 +54,72 @@ namespace
|
|||||||
|
|
||||||
const OUString lcl_aLabelRole( "label" );
|
const OUString lcl_aLabelRole( "label" );
|
||||||
|
|
||||||
OUString lcl_GetRoleLBEntry(
|
void lcl_UpdateCurrentRange(weld::TreeView& rOutListBox, const OUString & rRole,
|
||||||
const OUString & rRole, const OUString & rRange )
|
const OUString& rRange)
|
||||||
{
|
{
|
||||||
OUStringBuffer aEntry( rRole );
|
int nEntry = rOutListBox.get_selected_index();
|
||||||
aEntry.append( "\t" );
|
if (nEntry != -1)
|
||||||
aEntry.append(
|
{
|
||||||
::chart::DialogModel::ConvertRoleFromInternalToUI( rRole ) );
|
rOutListBox.set_text(nEntry, ::chart::DialogModel::ConvertRoleFromInternalToUI(rRole), 0);
|
||||||
aEntry.append( "\t" );
|
rOutListBox.set_text(nEntry, rRange, 1);
|
||||||
aEntry.append( rRange );
|
::chart::SeriesEntry* pEntry = reinterpret_cast<::chart::SeriesEntry*>(rOutListBox.get_id(nEntry).toInt64());
|
||||||
|
pEntry->m_sRole = rRole;
|
||||||
OUString sFoo = aEntry.makeStringAndClear();
|
}
|
||||||
return sFoo;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcl_UpdateCurrentRange(
|
bool lcl_UpdateCurrentSeriesName(weld::TreeView& rOutListBox)
|
||||||
SvTabListBox & rOutListBox,
|
|
||||||
const OUString & rRole, const OUString & rRange )
|
|
||||||
{
|
{
|
||||||
SvTreeListEntry * pEntry = rOutListBox.FirstSelected();
|
int nEntry = rOutListBox.get_selected_index();
|
||||||
if( pEntry )
|
if (nEntry == -1)
|
||||||
rOutListBox.SetEntryText( lcl_GetRoleLBEntry( rRole, rRange ), pEntry );
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
bool lcl_UpdateCurrentSeriesName(
|
|
||||||
SvTreeListBox & rOutListBox )
|
|
||||||
{
|
|
||||||
bool bResult = false;
|
bool bResult = false;
|
||||||
::chart::SeriesEntry * pEntry = dynamic_cast< ::chart::SeriesEntry * >( rOutListBox.FirstSelected());
|
::chart::SeriesEntry * pEntry = reinterpret_cast<::chart::SeriesEntry*>(rOutListBox.get_id(nEntry).toInt64());
|
||||||
if( pEntry &&
|
if (pEntry->m_xDataSeries.is() && pEntry->m_xChartType.is())
|
||||||
pEntry->m_xDataSeries.is() &&
|
|
||||||
pEntry->m_xChartType.is())
|
|
||||||
{
|
{
|
||||||
OUString aLabel(::chart::DataSeriesHelper::getDataSeriesLabel(
|
OUString aLabel(::chart::DataSeriesHelper::getDataSeriesLabel(
|
||||||
pEntry->m_xDataSeries,
|
pEntry->m_xDataSeries,
|
||||||
pEntry->m_xChartType->getRoleOfSequenceForSeriesLabel()));
|
pEntry->m_xChartType->getRoleOfSequenceForSeriesLabel()));
|
||||||
if (!aLabel.isEmpty())
|
if (!aLabel.isEmpty())
|
||||||
{
|
{
|
||||||
rOutListBox.SetEntryText( pEntry, aLabel );
|
rOutListBox.set_text(nEntry, aLabel);
|
||||||
bResult = true;
|
bResult = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString lcl_GetSelectedRole( const SvTabListBox & rRoleListBox, bool bUITranslated = false )
|
OUString lcl_GetSelectedRole(const weld::TreeView& rRoleListBox, bool bUITranslated = false)
|
||||||
{
|
{
|
||||||
OUString aResult;
|
OUString aResult;
|
||||||
SvTreeListEntry * pEntry = rRoleListBox.FirstSelected();
|
int nEntry = rRoleListBox.get_selected_index();
|
||||||
if( pEntry )
|
if (nEntry != -1)
|
||||||
aResult = SvTabListBox::GetEntryText( pEntry, bUITranslated ? 1 : 0 );
|
{
|
||||||
|
if (bUITranslated)
|
||||||
|
return rRoleListBox.get_text(nEntry);
|
||||||
|
::chart::SeriesEntry* pEntry = reinterpret_cast<::chart::SeriesEntry*>(rRoleListBox.get_id(nEntry).toInt64());
|
||||||
|
return pEntry->m_sRole;
|
||||||
|
}
|
||||||
return aResult;
|
return aResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString lcl_GetSelectedRolesRange( const SvTabListBox & rRoleListBox )
|
OUString lcl_GetSelectedRolesRange( const weld::TreeView& rRoleListBox )
|
||||||
{
|
{
|
||||||
OUString aResult;
|
OUString aResult;
|
||||||
SvTreeListEntry * pEntry = rRoleListBox.FirstSelected();
|
int nEntry = rRoleListBox.get_selected_index();
|
||||||
if( pEntry )
|
if (nEntry != -1)
|
||||||
aResult = SvTabListBox::GetEntryText( pEntry, 2 );
|
aResult = rRoleListBox.get_text(nEntry, 1);
|
||||||
return aResult;
|
return aResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
OUString lcl_GetSequenceNameForLabel( ::chart::SeriesEntry const * pEntry )
|
OUString lcl_GetSequenceNameForLabel(const ::chart::SeriesEntry* pEntry)
|
||||||
{
|
{
|
||||||
OUString aResult("values-y");
|
OUString aResult("values-y");
|
||||||
if( pEntry &&
|
if (pEntry && pEntry->m_xChartType.is())
|
||||||
pEntry->m_xChartType.is())
|
|
||||||
{
|
|
||||||
aResult = pEntry->m_xChartType->getRoleOfSequenceForSeriesLabel();
|
aResult = pEntry->m_xChartType->getRoleOfSequenceForSeriesLabel();
|
||||||
}
|
|
||||||
return aResult;
|
return aResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long lcl_pRoleListBoxTabs[] =
|
|
||||||
{
|
|
||||||
0, 0, 75
|
|
||||||
};
|
|
||||||
|
|
||||||
void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog )
|
void lcl_enableRangeChoosing( bool bEnable, Dialog * pDialog )
|
||||||
{
|
{
|
||||||
if( pDialog )
|
if( pDialog )
|
||||||
@@ -181,94 +168,81 @@ Reference< chart2::data::XLabeledDataSequence > lcl_findLSequenceWithOnlyLabel(
|
|||||||
namespace chart
|
namespace chart
|
||||||
{
|
{
|
||||||
|
|
||||||
DataSourceTabPage::DataSourceTabPage(
|
DataSourceTabPage::DataSourceTabPage(TabPageParent pParent, DialogModel & rDialogModel,
|
||||||
vcl::Window * pParent,
|
|
||||||
DialogModel & rDialogModel,
|
|
||||||
ChartTypeTemplateProvider* pTemplateProvider,
|
ChartTypeTemplateProvider* pTemplateProvider,
|
||||||
Dialog * pParentDialog,
|
Dialog * pParentDialog,
|
||||||
bool bHideDescription /* = false */ ) :
|
bool bHideDescription /* = false */)
|
||||||
::svt::OWizardPage( pParent
|
: ::svt::OWizardPage(pParent, "modules/schart/ui/tp_DataSource.ui", "tp_DataSource")
|
||||||
,"tp_DataSource"
|
, m_pTemplateProvider(pTemplateProvider)
|
||||||
,"modules/schart/ui/tp_DataSource.ui"),
|
, m_rDialogModel(rDialogModel)
|
||||||
m_pTemplateProvider( pTemplateProvider ),
|
, m_pCurrentRangeChoosingField( nullptr )
|
||||||
m_rDialogModel( rDialogModel ),
|
, m_bIsDirty( false )
|
||||||
|
, m_pParentDialog( pParentDialog )
|
||||||
m_pCurrentRangeChoosingField( nullptr ),
|
, m_pTabPageNotifiable( dynamic_cast< TabPageNotifiable * >( pParentDialog ))
|
||||||
m_bIsDirty( false ),
|
, m_xFT_CAPTION(m_xBuilder->weld_label("FT_CAPTION_FOR_WIZARD"))
|
||||||
m_pParentDialog( pParentDialog ),
|
, m_xFT_SERIES(m_xBuilder->weld_label("FT_SERIES"))
|
||||||
m_pTabPageNotifiable( dynamic_cast< TabPageNotifiable * >( pParentDialog ))
|
, m_xLB_SERIES(m_xBuilder->weld_tree_view("LB_SERIES"))
|
||||||
|
, m_xBTN_ADD(m_xBuilder->weld_button("BTN_ADD"))
|
||||||
|
, m_xBTN_REMOVE(m_xBuilder->weld_button("BTN_REMOVE"))
|
||||||
|
, m_xBTN_UP(m_xBuilder->weld_button("BTN_UP"))
|
||||||
|
, m_xBTN_DOWN(m_xBuilder->weld_button("BTN_DOWN"))
|
||||||
|
, m_xFT_ROLE(m_xBuilder->weld_label("FT_ROLE"))
|
||||||
|
, m_xLB_ROLE(m_xBuilder->weld_tree_view("LB_ROLE"))
|
||||||
|
, m_xFT_RANGE(m_xBuilder->weld_label("FT_RANGE"))
|
||||||
|
, m_xEDT_RANGE(m_xBuilder->weld_entry("EDT_RANGE"))
|
||||||
|
, m_xIMB_RANGE_MAIN(m_xBuilder->weld_button("IMB_RANGE_MAIN"))
|
||||||
|
, m_xFT_CATEGORIES(m_xBuilder->weld_label("FT_CATEGORIES"))
|
||||||
|
, m_xFT_DATALABELS(m_xBuilder->weld_label("FT_DATALABELS"))
|
||||||
|
, m_xEDT_CATEGORIES(m_xBuilder->weld_entry("EDT_CATEGORIES"))
|
||||||
|
, m_xIMB_RANGE_CAT(m_xBuilder->weld_button("IMB_RANGE_CAT"))
|
||||||
{
|
{
|
||||||
|
m_xLB_SERIES->set_size_request(m_xLB_SERIES->get_approximate_digit_width() * 25,
|
||||||
|
m_xLB_SERIES->get_height_rows(10));
|
||||||
|
m_xLB_ROLE->set_size_request(m_xLB_ROLE->get_approximate_digit_width() * 60,
|
||||||
|
m_xLB_ROLE->get_height_rows(5));
|
||||||
|
m_xFT_CAPTION->show(!bHideDescription);
|
||||||
|
|
||||||
get(m_pFT_CAPTION ,"FT_CAPTION_FOR_WIZARD");
|
m_aFixedTextRange = m_xFT_RANGE->get_label();
|
||||||
get(m_pFT_SERIES ,"FT_SERIES");
|
|
||||||
|
|
||||||
get(m_pLB_SERIES ,"LB_SERIES");
|
|
||||||
|
|
||||||
get(m_pBTN_ADD ,"BTN_ADD");
|
|
||||||
get(m_pBTN_REMOVE ,"BTN_REMOVE");
|
|
||||||
get(m_pBTN_UP ,"BTN_UP");
|
|
||||||
get(m_pBTN_DOWN ,"BTN_DOWN");
|
|
||||||
get(m_pFT_ROLE ,"FT_ROLE");
|
|
||||||
get(m_pLB_ROLE ,"LB_ROLE");
|
|
||||||
get(m_pFT_RANGE ,"FT_RANGE");
|
|
||||||
get(m_pEDT_RANGE ,"EDT_RANGE");
|
|
||||||
get(m_pIMB_RANGE_MAIN ,"IMB_RANGE_MAIN");
|
|
||||||
get(m_pFT_CATEGORIES ,"FT_CATEGORIES");
|
|
||||||
get(m_pFT_DATALABELS ,"FT_DATALABELS");
|
|
||||||
get(m_pEDT_CATEGORIES ,"EDT_CATEGORIES");
|
|
||||||
get(m_pIMB_RANGE_CAT ,"IMB_RANGE_CAT");
|
|
||||||
|
|
||||||
m_pFT_CAPTION->Show(!bHideDescription);
|
|
||||||
|
|
||||||
m_aFixedTextRange = m_pFT_RANGE->GetText();
|
|
||||||
SetText( SchResId( STR_OBJECT_DATASERIES_PLURAL ) );
|
SetText( SchResId( STR_OBJECT_DATASERIES_PLURAL ) );
|
||||||
|
|
||||||
// set handlers
|
// set handlers
|
||||||
m_pLB_SERIES->SetSelectHdl( LINK( this, DataSourceTabPage, SeriesSelectionChangedHdl ));
|
m_xLB_SERIES->connect_changed(LINK(this, DataSourceTabPage, SeriesSelectionChangedHdl));
|
||||||
|
m_xLB_ROLE->connect_changed(LINK(this, DataSourceTabPage, RoleSelectionChangedHdl));
|
||||||
|
|
||||||
m_pLB_ROLE->SetSelectHdl( LINK( this, DataSourceTabPage, RoleSelectionChangedHdl ));
|
m_xIMB_RANGE_MAIN->connect_clicked(LINK(this, DataSourceTabPage, MainRangeButtonClickedHdl));
|
||||||
|
m_xIMB_RANGE_CAT->connect_clicked(LINK(this, DataSourceTabPage, CategoriesRangeButtonClickedHdl));
|
||||||
|
|
||||||
m_pIMB_RANGE_MAIN->SetClickHdl( LINK( this, DataSourceTabPage, MainRangeButtonClickedHdl ));
|
m_xBTN_ADD->connect_clicked(LINK(this, DataSourceTabPage, AddButtonClickedHdl));
|
||||||
m_pIMB_RANGE_CAT->SetClickHdl( LINK( this, DataSourceTabPage, CategoriesRangeButtonClickedHdl ));
|
m_xBTN_REMOVE->connect_clicked(LINK(this, DataSourceTabPage, RemoveButtonClickedHdl));
|
||||||
|
|
||||||
m_pBTN_ADD->SetClickHdl( LINK( this, DataSourceTabPage, AddButtonClickedHdl ));
|
m_xBTN_UP->connect_clicked(LINK(this, DataSourceTabPage, UpButtonClickedHdl));
|
||||||
m_pBTN_REMOVE->SetClickHdl( LINK( this, DataSourceTabPage, RemoveButtonClickedHdl ));
|
m_xBTN_DOWN->connect_clicked(LINK(this, DataSourceTabPage, DownButtonClickedHdl));
|
||||||
|
|
||||||
m_pBTN_UP->SetClickHdl( LINK( this, DataSourceTabPage, UpButtonClickedHdl ));
|
m_xEDT_RANGE->connect_changed(LINK(this, DataSourceTabPage, RangeModifiedHdl));
|
||||||
m_pBTN_DOWN->SetClickHdl( LINK( this, DataSourceTabPage, DownButtonClickedHdl ));
|
m_xEDT_CATEGORIES->connect_changed(LINK( this, DataSourceTabPage, RangeModifiedHdl));
|
||||||
|
|
||||||
m_pEDT_RANGE->SetModifyHdl( LINK( this, DataSourceTabPage, RangeModifiedHdl ));
|
|
||||||
m_pEDT_CATEGORIES->SetModifyHdl( LINK( this, DataSourceTabPage, RangeModifiedHdl ));
|
|
||||||
m_pEDT_RANGE->SetUpdateDataHdl( LINK( this, DataSourceTabPage, RangeUpdateDataHdl ));
|
|
||||||
m_pEDT_CATEGORIES->SetUpdateDataHdl( LINK( this, DataSourceTabPage, RangeUpdateDataHdl ));
|
|
||||||
|
|
||||||
// #i75179# enable setting the background to a different color
|
|
||||||
m_pEDT_RANGE->SetForceControlBackground(true);
|
|
||||||
m_pEDT_CATEGORIES->SetForceControlBackground(true);
|
|
||||||
|
|
||||||
// set symbol font for arrows
|
|
||||||
// note: StarSymbol is substituted to OpenSymbol for OOo
|
|
||||||
vcl::Font aSymbolFont( m_pBTN_UP->GetFont());
|
|
||||||
aSymbolFont.SetFamilyName( "StarSymbol" );
|
|
||||||
m_pBTN_UP->SetControlFont( aSymbolFont );
|
|
||||||
m_pBTN_DOWN->SetControlFont( aSymbolFont );
|
|
||||||
|
|
||||||
// set button text
|
|
||||||
sal_Unicode const cBlackUpPointingTriangle( 0x25b2 );
|
|
||||||
sal_Unicode const cBlackDownPointingTriangle( 0x25bc );
|
|
||||||
m_pBTN_UP->SetText( OUString( cBlackUpPointingTriangle ));
|
|
||||||
m_pBTN_DOWN->SetText( OUString( cBlackDownPointingTriangle ));
|
|
||||||
|
|
||||||
// init controls
|
// init controls
|
||||||
m_pLB_ROLE->SetTabs( SAL_N_ELEMENTS(lcl_pRoleListBoxTabs), lcl_pRoleListBoxTabs );
|
std::vector<int> aWidths;
|
||||||
m_pLB_ROLE->Show();
|
aWidths.push_back(m_xLB_ROLE->get_approximate_digit_width() * 20);
|
||||||
|
m_xLB_ROLE->set_column_fixed_widths(aWidths);
|
||||||
|
m_xLB_ROLE->show();
|
||||||
|
|
||||||
updateControlsFromDialogModel();
|
updateControlsFromDialogModel();
|
||||||
|
|
||||||
// select first series
|
// select first series
|
||||||
if( m_pLB_SERIES->First())
|
if (m_xLB_SERIES->n_children())
|
||||||
m_pLB_SERIES->Select( m_pLB_SERIES->First());
|
m_xLB_SERIES->select(0);
|
||||||
m_pLB_SERIES->GrabFocus();
|
m_xLB_SERIES->grab_focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DataSourceTabPage::InsertRoleLBEntry(const OUString& rRole, const OUString& rRange)
|
||||||
|
{
|
||||||
|
m_aEntries.emplace_back(new SeriesEntry);
|
||||||
|
SeriesEntry* pEntry = m_aEntries.back().get();
|
||||||
|
pEntry->m_sRole = rRole;
|
||||||
|
m_xLB_ROLE->append(OUString::number(reinterpret_cast<sal_Int64>(pEntry)),
|
||||||
|
::chart::DialogModel::ConvertRoleFromInternalToUI(rRole));
|
||||||
|
m_xLB_ROLE->set_text(m_xLB_ROLE->n_children() - 1, rRange, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
DataSourceTabPage::~DataSourceTabPage()
|
DataSourceTabPage::~DataSourceTabPage()
|
||||||
@@ -278,23 +252,6 @@ DataSourceTabPage::~DataSourceTabPage()
|
|||||||
|
|
||||||
void DataSourceTabPage::dispose()
|
void DataSourceTabPage::dispose()
|
||||||
{
|
{
|
||||||
m_pFT_CAPTION.clear();
|
|
||||||
m_pFT_SERIES.clear();
|
|
||||||
m_pLB_SERIES.clear();
|
|
||||||
m_pBTN_ADD.clear();
|
|
||||||
m_pBTN_REMOVE.clear();
|
|
||||||
m_pBTN_UP.clear();
|
|
||||||
m_pBTN_DOWN.clear();
|
|
||||||
m_pFT_ROLE.clear();
|
|
||||||
m_pLB_ROLE.clear();
|
|
||||||
m_pFT_RANGE.clear();
|
|
||||||
m_pEDT_RANGE.clear();
|
|
||||||
m_pIMB_RANGE_MAIN.clear();
|
|
||||||
m_pFT_CATEGORIES.clear();
|
|
||||||
m_pFT_DATALABELS.clear();
|
|
||||||
m_pEDT_CATEGORIES.clear();
|
|
||||||
m_pIMB_RANGE_CAT.clear();
|
|
||||||
m_pCurrentRangeChoosingField.clear();
|
|
||||||
m_pParentDialog.clear();
|
m_pParentDialog.clear();
|
||||||
::svt::OWizardPage::dispose();
|
::svt::OWizardPage::dispose();
|
||||||
}
|
}
|
||||||
@@ -332,23 +289,12 @@ bool DataSourceTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*eReas
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DataSourceTabPage::isRangeFieldContentValid( Edit & rEdit )
|
bool DataSourceTabPage::isRangeFieldContentValid(weld::Entry& rEdit )
|
||||||
{
|
{
|
||||||
OUString aRange( rEdit.GetText());
|
OUString aRange(rEdit.get_text());
|
||||||
bool bIsValid = ( aRange.isEmpty() ) ||
|
bool bIsValid = aRange.isEmpty() ||
|
||||||
m_rDialogModel.getRangeSelectionHelper()->verifyCellRange(aRange);
|
m_rDialogModel.getRangeSelectionHelper()->verifyCellRange(aRange);
|
||||||
|
rEdit.set_error(!bIsValid);
|
||||||
if( bIsValid )
|
|
||||||
{
|
|
||||||
rEdit.SetControlForeground();
|
|
||||||
rEdit.SetControlBackground();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rEdit.SetControlBackground( RANGE_SELECTION_INVALID_RANGE_BACKGROUND_COLOR );
|
|
||||||
rEdit.SetControlForeground( RANGE_SELECTION_INVALID_RANGE_FOREGROUND_COLOR );
|
|
||||||
}
|
|
||||||
|
|
||||||
return bIsValid;
|
return bIsValid;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,12 +302,12 @@ bool DataSourceTabPage::isValid()
|
|||||||
{
|
{
|
||||||
bool bRoleRangeValid = true;
|
bool bRoleRangeValid = true;
|
||||||
bool bCategoriesRangeValid = true;
|
bool bCategoriesRangeValid = true;
|
||||||
bool bHasSelectedEntry = (m_pLB_SERIES->FirstSelected() != nullptr);
|
bool bHasSelectedEntry = (m_xLB_SERIES->get_selected_index() != -1);
|
||||||
|
|
||||||
if (bHasSelectedEntry)
|
if (bHasSelectedEntry)
|
||||||
bRoleRangeValid = isRangeFieldContentValid( *m_pEDT_RANGE );
|
bRoleRangeValid = isRangeFieldContentValid(*m_xEDT_RANGE);
|
||||||
if( m_pEDT_CATEGORIES->IsEnabled() )
|
if (m_xEDT_CATEGORIES->get_sensitive())
|
||||||
bCategoriesRangeValid = isRangeFieldContentValid( *m_pEDT_CATEGORIES );
|
bCategoriesRangeValid = isRangeFieldContentValid( *m_xEDT_CATEGORIES );
|
||||||
bool bValid = ( bRoleRangeValid && bCategoriesRangeValid );
|
bool bValid = ( bRoleRangeValid && bCategoriesRangeValid );
|
||||||
|
|
||||||
if( m_pTabPageNotifiable )
|
if( m_pTabPageNotifiable )
|
||||||
@@ -384,31 +330,36 @@ void DataSourceTabPage::updateControlsFromDialogModel()
|
|||||||
{
|
{
|
||||||
// series
|
// series
|
||||||
fillSeriesListBox();
|
fillSeriesListBox();
|
||||||
SeriesSelectionChangedHdl( nullptr );
|
SeriesSelectionChangedHdl(*m_xLB_SERIES);
|
||||||
|
|
||||||
// categories
|
// categories
|
||||||
m_pEDT_CATEGORIES->SetText( m_rDialogModel.getCategoriesRange() );
|
m_xEDT_CATEGORIES->set_text(m_rDialogModel.getCategoriesRange());
|
||||||
|
|
||||||
updateControlState();
|
updateControlState();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataSourceTabPage::fillSeriesListBox()
|
void DataSourceTabPage::fillSeriesListBox()
|
||||||
{
|
{
|
||||||
m_pLB_SERIES->SetUpdateMode( false );
|
m_xLB_SERIES->freeze();
|
||||||
|
|
||||||
Reference< XDataSeries > xSelected;
|
Reference< XDataSeries > xSelected;
|
||||||
SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected());
|
SeriesEntry* pEntry = nullptr;
|
||||||
if( pEntry )
|
int nEntry = m_xLB_SERIES->get_selected_index();
|
||||||
|
if (nEntry != -1)
|
||||||
|
{
|
||||||
|
pEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
|
||||||
xSelected.set(pEntry->m_xDataSeries);
|
xSelected.set(pEntry->m_xDataSeries);
|
||||||
|
}
|
||||||
|
|
||||||
bool bHasSelectedEntry = (pEntry != nullptr);
|
bool bHasSelectedEntry = (pEntry != nullptr);
|
||||||
SvTreeListEntry * pSelectedEntry = nullptr;
|
int nSelectedEntry = -1;
|
||||||
m_pLB_SERIES->Clear();
|
m_xLB_SERIES->clear();
|
||||||
|
|
||||||
std::vector< DialogModel::tSeriesWithChartTypeByName > aSeries(
|
std::vector< DialogModel::tSeriesWithChartTypeByName > aSeries(
|
||||||
m_rDialogModel.getAllDataSeriesWithLabel() );
|
m_rDialogModel.getAllDataSeriesWithLabel() );
|
||||||
|
|
||||||
sal_Int32 nUnnamedSeriesIndex = 1;
|
sal_Int32 nUnnamedSeriesIndex = 1;
|
||||||
|
nEntry = 0;
|
||||||
for (auto const& series : aSeries)
|
for (auto const& series : aSeries)
|
||||||
{
|
{
|
||||||
OUString aLabel(series.first);
|
OUString aLabel(series.first);
|
||||||
@@ -431,33 +382,32 @@ void DataSourceTabPage::fillSeriesListBox()
|
|||||||
|
|
||||||
++nUnnamedSeriesIndex;
|
++nUnnamedSeriesIndex;
|
||||||
}
|
}
|
||||||
pEntry = dynamic_cast< SeriesEntry * >(
|
|
||||||
m_pLB_SERIES->InsertEntry( aLabel ));
|
m_aEntries.emplace_back(new SeriesEntry);
|
||||||
if( pEntry )
|
pEntry = m_aEntries.back().get();
|
||||||
{
|
|
||||||
pEntry->m_xDataSeries.set(series.second.first);
|
pEntry->m_xDataSeries.set(series.second.first);
|
||||||
pEntry->m_xChartType.set(series.second.second);
|
pEntry->m_xChartType.set(series.second.second);
|
||||||
if( bHasSelectedEntry && (series.second.first == xSelected))
|
m_xLB_SERIES->append(OUString::number(reinterpret_cast<sal_Int64>(pEntry)), aLabel);
|
||||||
pSelectedEntry = pEntry;
|
if (bHasSelectedEntry && series.second.first == xSelected)
|
||||||
}
|
nSelectedEntry = nEntry;
|
||||||
|
++nEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bHasSelectedEntry && pSelectedEntry )
|
m_xLB_SERIES->thaw();
|
||||||
m_pLB_SERIES->Select( pSelectedEntry );
|
|
||||||
|
|
||||||
m_pLB_SERIES->SetUpdateMode( true );
|
if (bHasSelectedEntry && nSelectedEntry != -1)
|
||||||
|
m_xLB_SERIES->select(nSelectedEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataSourceTabPage::fillRoleListBox()
|
void DataSourceTabPage::fillRoleListBox()
|
||||||
{
|
{
|
||||||
SeriesEntry * pSeriesEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected());
|
int nSeriesEntry = m_xLB_SERIES->get_selected_index();
|
||||||
|
SeriesEntry* pSeriesEntry = nullptr;
|
||||||
|
if (nSeriesEntry != -1)
|
||||||
|
pSeriesEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nSeriesEntry).toInt64());
|
||||||
bool bHasSelectedEntry = (pSeriesEntry != nullptr);
|
bool bHasSelectedEntry = (pSeriesEntry != nullptr);
|
||||||
|
|
||||||
SvTreeListEntry * pRoleEntry = m_pLB_ROLE->FirstSelected();
|
int nRoleIndex = m_xLB_ROLE->get_selected_index();
|
||||||
sal_uLong nRoleIndex = SAL_MAX_UINT32;
|
|
||||||
if( pRoleEntry )
|
|
||||||
nRoleIndex = m_pLB_ROLE->GetModel()->GetAbsPos( pRoleEntry );
|
|
||||||
|
|
||||||
if (bHasSelectedEntry)
|
if (bHasSelectedEntry)
|
||||||
{
|
{
|
||||||
DialogModel::tRolesWithRanges aRoles(
|
DialogModel::tRolesWithRanges aRoles(
|
||||||
@@ -467,117 +417,116 @@ void DataSourceTabPage::fillRoleListBox()
|
|||||||
pSeriesEntry->m_xChartType ));
|
pSeriesEntry->m_xChartType ));
|
||||||
|
|
||||||
// fill role list
|
// fill role list
|
||||||
m_pLB_ROLE->SetUpdateMode( false );
|
m_xLB_ROLE->freeze();
|
||||||
m_pLB_ROLE->Clear();
|
m_xLB_ROLE->clear();
|
||||||
m_pLB_ROLE->RemoveSelection();
|
|
||||||
|
|
||||||
for (auto const& elemRole : aRoles)
|
for (auto const& elemRole : aRoles)
|
||||||
{
|
{
|
||||||
m_pLB_ROLE->InsertEntry( lcl_GetRoleLBEntry(elemRole.first, elemRole.second));
|
InsertRoleLBEntry(elemRole.first, elemRole.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_xLB_ROLE->thaw();
|
||||||
|
|
||||||
// series may contain no roles, check listbox size before selecting entries
|
// series may contain no roles, check listbox size before selecting entries
|
||||||
if( m_pLB_ROLE->GetEntryCount() > 0 )
|
if (m_xLB_ROLE->n_children() > 0)
|
||||||
{
|
{
|
||||||
if( nRoleIndex >= m_pLB_ROLE->GetEntryCount())
|
if (nRoleIndex == -1 || nRoleIndex >= m_xLB_ROLE->n_children())
|
||||||
nRoleIndex = 0;
|
nRoleIndex = 0;
|
||||||
m_pLB_ROLE->Select( m_pLB_ROLE->GetEntry( nRoleIndex ));
|
m_xLB_ROLE->select(nRoleIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pLB_ROLE->SetUpdateMode( true );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DataSourceTabPage::updateControlState()
|
void DataSourceTabPage::updateControlState()
|
||||||
{
|
{
|
||||||
SvTreeListEntry * pSeriesEntry = m_pLB_SERIES->FirstSelected();
|
int nSeriesEntry = m_xLB_SERIES->get_selected_index();
|
||||||
bool bHasSelectedSeries = (pSeriesEntry != nullptr);
|
bool bHasSelectedSeries = nSeriesEntry != -1;
|
||||||
bool bHasValidRole = false;
|
bool bHasValidRole = false;
|
||||||
bool bHasRangeChooser = m_rDialogModel.getRangeSelectionHelper()->hasRangeSelection();
|
bool bHasRangeChooser = m_rDialogModel.getRangeSelectionHelper()->hasRangeSelection();
|
||||||
|
|
||||||
if( bHasSelectedSeries )
|
if( bHasSelectedSeries )
|
||||||
{
|
{
|
||||||
SvTreeListEntry * pRoleEntry = m_pLB_ROLE->FirstSelected();
|
int nRoleEntry = m_xLB_ROLE->get_selected_index();
|
||||||
bHasValidRole = (pRoleEntry != nullptr);
|
bHasValidRole = nRoleEntry != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pBTN_ADD->Enable();
|
m_xBTN_ADD->set_sensitive(true);
|
||||||
m_pBTN_REMOVE->Enable( bHasSelectedSeries );
|
m_xBTN_REMOVE->set_sensitive(bHasSelectedSeries);
|
||||||
|
|
||||||
m_pBTN_UP->Enable( bHasSelectedSeries && (pSeriesEntry != m_pLB_SERIES->First()));
|
m_xBTN_UP->set_sensitive(bHasSelectedSeries && (nSeriesEntry != 0));
|
||||||
m_pBTN_DOWN->Enable( bHasSelectedSeries && (pSeriesEntry != m_pLB_SERIES->Last()));
|
m_xBTN_DOWN->set_sensitive(bHasSelectedSeries && (nSeriesEntry != m_xLB_SERIES->n_children() - 1));
|
||||||
|
|
||||||
bool bHasCategories = m_rDialogModel.isCategoryDiagram();
|
bool bHasCategories = m_rDialogModel.isCategoryDiagram();
|
||||||
|
|
||||||
m_pFT_DATALABELS->Show(!bHasCategories);
|
m_xFT_DATALABELS->show(!bHasCategories);
|
||||||
m_pFT_CATEGORIES->Show( bHasCategories);
|
m_xFT_CATEGORIES->show( bHasCategories);
|
||||||
bool bShowIB = bHasRangeChooser;
|
bool bShowIB = bHasRangeChooser;
|
||||||
|
|
||||||
m_pIMB_RANGE_CAT->Show(bShowIB);
|
m_xIMB_RANGE_CAT->show(bShowIB);
|
||||||
|
|
||||||
m_pFT_SERIES->Enable();
|
m_xFT_SERIES->set_sensitive(true);
|
||||||
m_pLB_SERIES->Enable();
|
m_xLB_SERIES->set_sensitive(true);
|
||||||
|
|
||||||
m_pFT_ROLE->Enable( bHasSelectedSeries );
|
m_xFT_ROLE->set_sensitive(bHasSelectedSeries);
|
||||||
m_pLB_ROLE->Enable( bHasSelectedSeries );
|
m_xLB_ROLE->set_sensitive(bHasSelectedSeries);
|
||||||
|
|
||||||
m_pFT_RANGE->Enable( bHasValidRole );
|
m_xFT_RANGE->set_sensitive(bHasValidRole);
|
||||||
m_pEDT_RANGE->Enable( bHasValidRole );
|
m_xEDT_RANGE->set_sensitive(bHasValidRole);
|
||||||
|
|
||||||
m_pIMB_RANGE_MAIN->Show(bShowIB);
|
m_xIMB_RANGE_MAIN->show(bShowIB);
|
||||||
|
|
||||||
isValid();
|
isValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(DataSourceTabPage, SeriesSelectionChangedHdl, SvTreeListBox*, void)
|
IMPL_LINK_NOARG(DataSourceTabPage, SeriesSelectionChangedHdl, weld::TreeView&, void)
|
||||||
{
|
{
|
||||||
m_rDialogModel.startControllerLockTimer();
|
m_rDialogModel.startControllerLockTimer();
|
||||||
if( m_pLB_SERIES->FirstSelected())
|
if (m_xLB_SERIES->get_selected_index() != -1)
|
||||||
{
|
{
|
||||||
fillRoleListBox();
|
fillRoleListBox();
|
||||||
RoleSelectionChangedHdl( nullptr );
|
RoleSelectionChangedHdl(*m_xLB_ROLE);
|
||||||
}
|
}
|
||||||
updateControlState();
|
updateControlState();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(DataSourceTabPage, RoleSelectionChangedHdl, SvTreeListBox*, void)
|
IMPL_LINK_NOARG(DataSourceTabPage, RoleSelectionChangedHdl, weld::TreeView&, void)
|
||||||
{
|
{
|
||||||
m_rDialogModel.startControllerLockTimer();
|
m_rDialogModel.startControllerLockTimer();
|
||||||
SvTreeListEntry * pEntry = m_pLB_ROLE->FirstSelected();
|
int nEntry = m_xLB_ROLE->get_selected_index();
|
||||||
if( pEntry )
|
if (nEntry != -1)
|
||||||
{
|
{
|
||||||
OUString aSelectedRoleUI = lcl_GetSelectedRole( *m_pLB_ROLE, true );
|
OUString aSelectedRoleUI = lcl_GetSelectedRole( *m_xLB_ROLE, true );
|
||||||
OUString aSelectedRange = lcl_GetSelectedRolesRange( *m_pLB_ROLE );
|
OUString aSelectedRange = lcl_GetSelectedRolesRange( *m_xLB_ROLE );
|
||||||
|
|
||||||
// replace role in fixed text label
|
// replace role in fixed text label
|
||||||
const OUString aReplacementStr( "%VALUETYPE" );
|
const OUString aReplacementStr( "%VALUETYPE" );
|
||||||
sal_Int32 nIndex = m_aFixedTextRange.indexOf( aReplacementStr );
|
sal_Int32 nIndex = m_aFixedTextRange.indexOf( aReplacementStr );
|
||||||
if( nIndex != -1 )
|
if( nIndex != -1 )
|
||||||
{
|
{
|
||||||
m_pFT_RANGE->SetText(
|
m_xFT_RANGE->set_label(
|
||||||
m_aFixedTextRange.replaceAt(
|
m_aFixedTextRange.replaceAt(
|
||||||
nIndex, aReplacementStr.getLength(), aSelectedRoleUI ));
|
nIndex, aReplacementStr.getLength(), aSelectedRoleUI ));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_pEDT_RANGE->SetText( aSelectedRange );
|
m_xEDT_RANGE->set_text(aSelectedRange);
|
||||||
isValid();
|
isValid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, void)
|
IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, weld::Button&, void)
|
||||||
{
|
{
|
||||||
OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr );
|
OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr );
|
||||||
m_pCurrentRangeChoosingField = m_pEDT_RANGE;
|
m_pCurrentRangeChoosingField = m_xEDT_RANGE.get();
|
||||||
if( !m_pEDT_RANGE->GetText().isEmpty() &&
|
if (!m_xEDT_RANGE->get_text().isEmpty() &&
|
||||||
!updateModelFromControl( m_pCurrentRangeChoosingField))
|
!updateModelFromControl( m_pCurrentRangeChoosingField))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected());
|
int nEntry = m_xLB_SERIES->get_selected_index();
|
||||||
bool bHasSelectedEntry = (pEntry != nullptr);
|
bool bHasSelectedEntry = (nEntry != -1);
|
||||||
|
|
||||||
OUString aSelectedRolesRange = lcl_GetSelectedRolesRange( *m_pLB_ROLE );
|
OUString aSelectedRolesRange = lcl_GetSelectedRolesRange(*m_xLB_ROLE);
|
||||||
|
|
||||||
if( bHasSelectedEntry && (m_pLB_ROLE->FirstSelected() != nullptr))
|
if (bHasSelectedEntry && (m_xLB_ROLE->get_selected_index() != -1))
|
||||||
{
|
{
|
||||||
OUString aUIStr(SchResId(STR_DATA_SELECT_RANGE_FOR_SERIES));
|
OUString aUIStr(SchResId(STR_DATA_SELECT_RANGE_FOR_SERIES));
|
||||||
|
|
||||||
@@ -587,7 +536,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, void)
|
|||||||
if( nIndex != -1 )
|
if( nIndex != -1 )
|
||||||
{
|
{
|
||||||
aUIStr = aUIStr.replaceAt( nIndex, aReplacement.getLength(),
|
aUIStr = aUIStr.replaceAt( nIndex, aReplacement.getLength(),
|
||||||
lcl_GetSelectedRole( *m_pLB_ROLE, true ));
|
lcl_GetSelectedRole( *m_xLB_ROLE, true ));
|
||||||
}
|
}
|
||||||
// replace series name
|
// replace series name
|
||||||
aReplacement = "%SERIESNAME";
|
aReplacement = "%SERIESNAME";
|
||||||
@@ -595,7 +544,7 @@ IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, void)
|
|||||||
if( nIndex != -1 )
|
if( nIndex != -1 )
|
||||||
{
|
{
|
||||||
aUIStr = aUIStr.replaceAt(nIndex, aReplacement.getLength(),
|
aUIStr = aUIStr.replaceAt(nIndex, aReplacement.getLength(),
|
||||||
m_pLB_SERIES->GetEntryText( pEntry ));
|
m_xLB_SERIES->get_text(nEntry));
|
||||||
}
|
}
|
||||||
|
|
||||||
lcl_enableRangeChoosing( true, m_pParentDialog );
|
lcl_enableRangeChoosing( true, m_pParentDialog );
|
||||||
@@ -605,31 +554,32 @@ IMPL_LINK_NOARG(DataSourceTabPage, MainRangeButtonClickedHdl, Button*, void)
|
|||||||
m_pCurrentRangeChoosingField = nullptr;
|
m_pCurrentRangeChoosingField = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(DataSourceTabPage, CategoriesRangeButtonClickedHdl, Button*, void)
|
IMPL_LINK_NOARG(DataSourceTabPage, CategoriesRangeButtonClickedHdl, weld::Button&, void)
|
||||||
{
|
{
|
||||||
OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr );
|
OSL_ASSERT( m_pCurrentRangeChoosingField == nullptr );
|
||||||
m_pCurrentRangeChoosingField = m_pEDT_CATEGORIES;
|
m_pCurrentRangeChoosingField = m_xEDT_CATEGORIES.get();
|
||||||
if( !m_pEDT_CATEGORIES->GetText().isEmpty() &&
|
if( !m_xEDT_CATEGORIES->get_text().isEmpty() &&
|
||||||
! updateModelFromControl( m_pCurrentRangeChoosingField ))
|
! updateModelFromControl( m_pCurrentRangeChoosingField ))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
OUString aStr( SchResId( m_pFT_CATEGORIES->IsVisible() ? STR_DATA_SELECT_RANGE_FOR_CATEGORIES : STR_DATA_SELECT_RANGE_FOR_DATALABELS ));
|
OUString aStr(SchResId(m_xFT_CATEGORIES->get_visible() ? STR_DATA_SELECT_RANGE_FOR_CATEGORIES : STR_DATA_SELECT_RANGE_FOR_DATALABELS));
|
||||||
lcl_enableRangeChoosing(true, m_pParentDialog);
|
lcl_enableRangeChoosing(true, m_pParentDialog);
|
||||||
m_rDialogModel.getRangeSelectionHelper()->chooseRange(
|
m_rDialogModel.getRangeSelectionHelper()->chooseRange(
|
||||||
m_rDialogModel.getCategoriesRange(), aStr, *this );
|
m_rDialogModel.getCategoriesRange(), aStr, *this );
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(DataSourceTabPage, AddButtonClickedHdl, Button*, void)
|
IMPL_LINK_NOARG(DataSourceTabPage, AddButtonClickedHdl, weld::Button&, void)
|
||||||
{
|
{
|
||||||
m_rDialogModel.startControllerLockTimer();
|
m_rDialogModel.startControllerLockTimer();
|
||||||
SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected());
|
int nEntry = m_xLB_SERIES->get_selected_index();
|
||||||
Reference< XDataSeries > xSeriesToInsertAfter;
|
Reference< XDataSeries > xSeriesToInsertAfter;
|
||||||
Reference< XChartType > xChartTypeForNewSeries;
|
Reference< XChartType > xChartTypeForNewSeries;
|
||||||
if( m_pTemplateProvider )
|
if( m_pTemplateProvider )
|
||||||
m_rDialogModel.setTemplate( m_pTemplateProvider->getCurrentTemplate());
|
m_rDialogModel.setTemplate( m_pTemplateProvider->getCurrentTemplate());
|
||||||
|
|
||||||
if( pEntry )
|
if (nEntry != -1)
|
||||||
{
|
{
|
||||||
|
::chart::SeriesEntry* pEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
|
||||||
xSeriesToInsertAfter.set(pEntry->m_xDataSeries);
|
xSeriesToInsertAfter.set(pEntry->m_xDataSeries);
|
||||||
xChartTypeForNewSeries.set(pEntry->m_xChartType);
|
xChartTypeForNewSeries.set(pEntry->m_xChartType);
|
||||||
}
|
}
|
||||||
@@ -646,63 +596,66 @@ IMPL_LINK_NOARG(DataSourceTabPage, AddButtonClickedHdl, Button*, void)
|
|||||||
setDirty();
|
setDirty();
|
||||||
|
|
||||||
fillSeriesListBox();
|
fillSeriesListBox();
|
||||||
// note the box was cleared and refilled, so pEntry is invalid now
|
// note the box was cleared and refilled, so nEntry is invalid now
|
||||||
SvTreeListEntry * pSelEntry = m_pLB_SERIES->FirstSelected();
|
|
||||||
if( pSelEntry )
|
int nSelEntry = m_xLB_SERIES->get_selected_index();
|
||||||
|
if (nSelEntry != -1)
|
||||||
{
|
{
|
||||||
SvTreeListEntry * pNextEntry = m_pLB_SERIES->Next( pSelEntry );
|
++nSelEntry;
|
||||||
if( pNextEntry )
|
if (nSelEntry < m_xLB_SERIES->n_children())
|
||||||
m_pLB_SERIES->Select( pNextEntry );
|
m_xLB_SERIES->select(nSelEntry);
|
||||||
}
|
}
|
||||||
SeriesSelectionChangedHdl( nullptr );
|
SeriesSelectionChangedHdl(*m_xLB_SERIES);
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(DataSourceTabPage, RemoveButtonClickedHdl, Button*, void)
|
IMPL_LINK_NOARG(DataSourceTabPage, RemoveButtonClickedHdl, weld::Button&, void)
|
||||||
{
|
{
|
||||||
m_rDialogModel.startControllerLockTimer();
|
m_rDialogModel.startControllerLockTimer();
|
||||||
SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected());
|
int nEntry = m_xLB_SERIES->get_selected_index();
|
||||||
if( pEntry )
|
if (nEntry != -1)
|
||||||
{
|
{
|
||||||
|
SeriesEntry* pEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
|
||||||
Reference< XDataSeries > xNewSelSeries;
|
Reference< XDataSeries > xNewSelSeries;
|
||||||
SeriesEntry * pNewSelEntry = dynamic_cast< SeriesEntry * >(m_pLB_SERIES->Next( pEntry ));
|
SeriesEntry * pNewSelEntry = nullptr;
|
||||||
|
if (nEntry + 1 < m_xLB_SERIES->n_children())
|
||||||
|
pNewSelEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry + 1).toInt64());
|
||||||
|
else if (nEntry > 0)
|
||||||
|
pNewSelEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(nEntry - 1).toInt64());
|
||||||
if (pNewSelEntry)
|
if (pNewSelEntry)
|
||||||
xNewSelSeries.set(pNewSelEntry->m_xDataSeries);
|
xNewSelSeries.set(pNewSelEntry->m_xDataSeries);
|
||||||
else
|
|
||||||
{
|
|
||||||
pNewSelEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->Prev( pEntry ));
|
|
||||||
if( pNewSelEntry )
|
|
||||||
xNewSelSeries.set( pNewSelEntry->m_xDataSeries );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_rDialogModel.deleteSeries( pEntry->m_xDataSeries, pEntry->m_xChartType );
|
m_rDialogModel.deleteSeries( pEntry->m_xDataSeries, pEntry->m_xChartType );
|
||||||
setDirty();
|
setDirty();
|
||||||
|
|
||||||
m_pLB_SERIES->RemoveSelection();
|
m_xLB_SERIES->remove(nEntry);
|
||||||
fillSeriesListBox();
|
fillSeriesListBox();
|
||||||
|
|
||||||
// select previous or next series
|
// select previous or next series
|
||||||
//@improve: see methods GetModel()->GetAbsPos()/GetEntry() for absolute list positions
|
|
||||||
if (xNewSelSeries.is())
|
if (xNewSelSeries.is())
|
||||||
{
|
{
|
||||||
pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->First());
|
for (int i = 0; i < m_xLB_SERIES->n_children(); ++i)
|
||||||
while( pEntry )
|
|
||||||
{
|
{
|
||||||
|
pEntry = reinterpret_cast<::chart::SeriesEntry*>(m_xLB_SERIES->get_id(i).toInt64());
|
||||||
if (pEntry->m_xDataSeries == xNewSelSeries)
|
if (pEntry->m_xDataSeries == xNewSelSeries)
|
||||||
{
|
{
|
||||||
m_pLB_SERIES->Select( pEntry );
|
m_xLB_SERIES->select(i);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->Next( pEntry ));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SeriesSelectionChangedHdl( nullptr );
|
SeriesSelectionChangedHdl(*m_xLB_SERIES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(DataSourceTabPage, UpButtonClickedHdl, Button*, void)
|
IMPL_LINK_NOARG(DataSourceTabPage, UpButtonClickedHdl, weld::Button&, void)
|
||||||
{
|
{
|
||||||
m_rDialogModel.startControllerLockTimer();
|
m_rDialogModel.startControllerLockTimer();
|
||||||
SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected());
|
|
||||||
|
int nEntry = m_xLB_SERIES->get_selected_index();
|
||||||
|
SeriesEntry* pEntry = nullptr;
|
||||||
|
if (nEntry != -1)
|
||||||
|
pEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
|
||||||
|
|
||||||
bool bHasSelectedEntry = (pEntry != nullptr);
|
bool bHasSelectedEntry = (pEntry != nullptr);
|
||||||
|
|
||||||
if (bHasSelectedEntry)
|
if (bHasSelectedEntry)
|
||||||
@@ -710,14 +663,19 @@ IMPL_LINK_NOARG(DataSourceTabPage, UpButtonClickedHdl, Button*, void)
|
|||||||
m_rDialogModel.moveSeries( pEntry->m_xDataSeries, DialogModel::MOVE_UP );
|
m_rDialogModel.moveSeries( pEntry->m_xDataSeries, DialogModel::MOVE_UP );
|
||||||
setDirty();
|
setDirty();
|
||||||
fillSeriesListBox();
|
fillSeriesListBox();
|
||||||
SeriesSelectionChangedHdl(nullptr);
|
SeriesSelectionChangedHdl(*m_xLB_SERIES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK_NOARG(DataSourceTabPage, DownButtonClickedHdl, Button*, void)
|
IMPL_LINK_NOARG(DataSourceTabPage, DownButtonClickedHdl, weld::Button&, void)
|
||||||
{
|
{
|
||||||
m_rDialogModel.startControllerLockTimer();
|
m_rDialogModel.startControllerLockTimer();
|
||||||
SeriesEntry * pEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected());
|
|
||||||
|
int nEntry = m_xLB_SERIES->get_selected_index();
|
||||||
|
SeriesEntry* pEntry = nullptr;
|
||||||
|
if (nEntry != -1)
|
||||||
|
pEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nEntry).toInt64());
|
||||||
|
|
||||||
bool bHasSelectedEntry = (pEntry != nullptr);
|
bool bHasSelectedEntry = (pEntry != nullptr);
|
||||||
|
|
||||||
if (bHasSelectedEntry)
|
if (bHasSelectedEntry)
|
||||||
@@ -725,20 +683,20 @@ IMPL_LINK_NOARG(DataSourceTabPage, DownButtonClickedHdl, Button*, void)
|
|||||||
m_rDialogModel.moveSeries( pEntry->m_xDataSeries, DialogModel::MOVE_DOWN );
|
m_rDialogModel.moveSeries( pEntry->m_xDataSeries, DialogModel::MOVE_DOWN );
|
||||||
setDirty();
|
setDirty();
|
||||||
fillSeriesListBox();
|
fillSeriesListBox();
|
||||||
SeriesSelectionChangedHdl(nullptr);
|
SeriesSelectionChangedHdl(*m_xLB_SERIES);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK( DataSourceTabPage, RangeModifiedHdl, Edit&, rEdit, void )
|
IMPL_LINK(DataSourceTabPage, RangeModifiedHdl, weld::Entry&, rEdit, void)
|
||||||
{
|
{
|
||||||
// note: isValid sets the color of the edit field
|
// note: isValid sets the color of the edit field
|
||||||
if( isRangeFieldContentValid( rEdit ))
|
if( isRangeFieldContentValid( rEdit ))
|
||||||
{
|
{
|
||||||
setDirty();
|
setDirty();
|
||||||
updateModelFromControl( &rEdit );
|
updateModelFromControl( &rEdit );
|
||||||
if( &rEdit == m_pEDT_RANGE )
|
if (&rEdit == m_xEDT_RANGE.get())
|
||||||
{
|
{
|
||||||
if( ! lcl_UpdateCurrentSeriesName( *m_pLB_SERIES ))
|
if( ! lcl_UpdateCurrentSeriesName( *m_xLB_SERIES ))
|
||||||
fillSeriesListBox();
|
fillSeriesListBox();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -747,23 +705,6 @@ IMPL_LINK( DataSourceTabPage, RangeModifiedHdl, Edit&, rEdit, void )
|
|||||||
isValid();
|
isValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_LINK( DataSourceTabPage, RangeUpdateDataHdl, Edit&, rEdit, void )
|
|
||||||
{
|
|
||||||
// note: isValid sets the color of the edit field
|
|
||||||
if( isRangeFieldContentValid( rEdit ))
|
|
||||||
{
|
|
||||||
setDirty();
|
|
||||||
updateModelFromControl( &rEdit );
|
|
||||||
if( &rEdit == m_pEDT_RANGE )
|
|
||||||
{
|
|
||||||
if( ! lcl_UpdateCurrentSeriesName( *m_pLB_SERIES ))
|
|
||||||
fillSeriesListBox();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// enable/disable OK button
|
|
||||||
isValid();
|
|
||||||
}
|
|
||||||
|
|
||||||
void DataSourceTabPage::listeningFinished(
|
void DataSourceTabPage::listeningFinished(
|
||||||
const OUString & rNewRange )
|
const OUString & rNewRange )
|
||||||
{
|
{
|
||||||
@@ -780,23 +721,23 @@ void DataSourceTabPage::listeningFinished(
|
|||||||
GrabFocus();
|
GrabFocus();
|
||||||
if( m_pCurrentRangeChoosingField )
|
if( m_pCurrentRangeChoosingField )
|
||||||
{
|
{
|
||||||
m_pCurrentRangeChoosingField->SetText( aRange );
|
m_pCurrentRangeChoosingField->set_text(aRange);
|
||||||
m_pCurrentRangeChoosingField->GrabFocus();
|
m_pCurrentRangeChoosingField->grab_focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( m_pCurrentRangeChoosingField == m_pEDT_RANGE )
|
if (m_pCurrentRangeChoosingField == m_xEDT_RANGE.get())
|
||||||
{
|
{
|
||||||
m_pEDT_RANGE->SetText( aRange );
|
m_xEDT_RANGE->set_text(aRange);
|
||||||
setDirty();
|
setDirty();
|
||||||
}
|
}
|
||||||
else if( m_pCurrentRangeChoosingField == m_pEDT_CATEGORIES )
|
else if (m_pCurrentRangeChoosingField == m_xEDT_CATEGORIES.get())
|
||||||
{
|
{
|
||||||
m_pEDT_CATEGORIES->SetText( aRange );
|
m_xEDT_CATEGORIES->set_text(aRange);
|
||||||
setDirty();
|
setDirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
updateModelFromControl(m_pCurrentRangeChoosingField);
|
updateModelFromControl(m_pCurrentRangeChoosingField);
|
||||||
if( ! lcl_UpdateCurrentSeriesName( *m_pLB_SERIES ))
|
if (!lcl_UpdateCurrentSeriesName(*m_xLB_SERIES))
|
||||||
fillSeriesListBox();
|
fillSeriesListBox();
|
||||||
|
|
||||||
m_pCurrentRangeChoosingField = nullptr;
|
m_pCurrentRangeChoosingField = nullptr;
|
||||||
@@ -810,7 +751,7 @@ void DataSourceTabPage::disposingRangeSelection()
|
|||||||
m_rDialogModel.getRangeSelectionHelper()->stopRangeListening( false );
|
m_rDialogModel.getRangeSelectionHelper()->stopRangeListening( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DataSourceTabPage::updateModelFromControl( Edit * pField )
|
bool DataSourceTabPage::updateModelFromControl(weld::Entry* pField)
|
||||||
{
|
{
|
||||||
if (!m_bIsDirty)
|
if (!m_bIsDirty)
|
||||||
return true;
|
return true;
|
||||||
@@ -822,12 +763,12 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
|
|||||||
bool bAll = (pField == nullptr);
|
bool bAll = (pField == nullptr);
|
||||||
Reference< data::XDataProvider > xDataProvider( m_rDialogModel.getDataProvider());
|
Reference< data::XDataProvider > xDataProvider( m_rDialogModel.getDataProvider());
|
||||||
|
|
||||||
if( bAll || (pField == m_pEDT_CATEGORIES) )
|
if (bAll || (pField == m_xEDT_CATEGORIES.get()))
|
||||||
{
|
{
|
||||||
Reference< data::XLabeledDataSequence > xLabeledSeq( m_rDialogModel.getCategories() );
|
Reference< data::XLabeledDataSequence > xLabeledSeq( m_rDialogModel.getCategories() );
|
||||||
if( xDataProvider.is())
|
if( xDataProvider.is())
|
||||||
{
|
{
|
||||||
OUString aRange( m_pEDT_CATEGORIES->GetText());
|
OUString aRange(m_xEDT_CATEGORIES->get_text());
|
||||||
if (!aRange.isEmpty())
|
if (!aRange.isEmpty())
|
||||||
{
|
{
|
||||||
// create or change categories
|
// create or change categories
|
||||||
@@ -855,17 +796,20 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SeriesEntry * pSeriesEntry = dynamic_cast< SeriesEntry * >( m_pLB_SERIES->FirstSelected());
|
int nSeriesEntry = m_xLB_SERIES->get_selected_index();
|
||||||
|
SeriesEntry* pSeriesEntry = nullptr;
|
||||||
|
if (nSeriesEntry != -1)
|
||||||
|
pSeriesEntry = reinterpret_cast<SeriesEntry*>(m_xLB_SERIES->get_id(nSeriesEntry).toInt64());
|
||||||
bool bHasSelectedEntry = (pSeriesEntry != nullptr);
|
bool bHasSelectedEntry = (pSeriesEntry != nullptr);
|
||||||
|
|
||||||
if( bHasSelectedEntry )
|
if( bHasSelectedEntry )
|
||||||
{
|
{
|
||||||
if( bAll || (pField == m_pEDT_RANGE) )
|
if( bAll || (pField == m_xEDT_RANGE.get()) )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
OUString aSelectedRole = lcl_GetSelectedRole( *m_pLB_ROLE );
|
OUString aSelectedRole = lcl_GetSelectedRole( *m_xLB_ROLE );
|
||||||
OUString aRange( m_pEDT_RANGE->GetText());
|
OUString aRange(m_xEDT_RANGE->get_text());
|
||||||
OUString aSequenceRole( aSelectedRole );
|
OUString aSequenceRole( aSelectedRole );
|
||||||
bool bIsLabel = (aSequenceRole == lcl_aLabelRole );
|
bool bIsLabel = (aSequenceRole == lcl_aLabelRole );
|
||||||
OUString aSequenceNameForLabel( lcl_GetSequenceNameForLabel( pSeriesEntry ));
|
OUString aSequenceNameForLabel( lcl_GetSequenceNameForLabel( pSeriesEntry ));
|
||||||
@@ -962,7 +906,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
lcl_UpdateCurrentRange( *m_pLB_ROLE, aSelectedRole, aRange );
|
lcl_UpdateCurrentRange( *m_xLB_ROLE, aSelectedRole, aRange );
|
||||||
}
|
}
|
||||||
catch( const uno::Exception & )
|
catch( const uno::Exception & )
|
||||||
{
|
{
|
||||||
|
@@ -27,6 +27,9 @@
|
|||||||
|
|
||||||
#include <RangeSelectionListener.hxx>
|
#include <RangeSelectionListener.hxx>
|
||||||
|
|
||||||
|
namespace com { namespace sun { namespace star { namespace chart2 { class XChartType; } } } }
|
||||||
|
namespace com { namespace sun { namespace star { namespace chart2 { class XDataSeries; } } } }
|
||||||
|
|
||||||
namespace chart { class TabPageNotifiable; }
|
namespace chart { class TabPageNotifiable; }
|
||||||
|
|
||||||
namespace chart
|
namespace chart
|
||||||
@@ -35,25 +38,36 @@ namespace chart
|
|||||||
class ChartTypeTemplateProvider;
|
class ChartTypeTemplateProvider;
|
||||||
class DialogModel;
|
class DialogModel;
|
||||||
|
|
||||||
|
class SeriesEntry
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
OUString m_sRole;
|
||||||
|
|
||||||
|
/// the corresponding data series
|
||||||
|
css::uno::Reference< css::chart2::XDataSeries > m_xDataSeries;
|
||||||
|
|
||||||
|
/// the chart type that contains the series (via XDataSeriesContainer)
|
||||||
|
css::uno::Reference< css::chart2::XChartType > m_xChartType;
|
||||||
|
};
|
||||||
|
|
||||||
class DataSourceTabPage final :
|
class DataSourceTabPage final :
|
||||||
public ::svt::OWizardPage,
|
public ::svt::OWizardPage,
|
||||||
public RangeSelectionListenerParent
|
public RangeSelectionListenerParent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit DataSourceTabPage(
|
explicit DataSourceTabPage(TabPageParent pParent,
|
||||||
vcl::Window * pParent,
|
|
||||||
DialogModel & rDialogModel,
|
DialogModel & rDialogModel,
|
||||||
ChartTypeTemplateProvider* pTemplateProvider,
|
ChartTypeTemplateProvider* pTemplateProvider,
|
||||||
Dialog * pParentDialog,
|
Dialog * pParentDialog,
|
||||||
bool bHideDescription = false);
|
bool bHideDescription = false);
|
||||||
virtual ~DataSourceTabPage() override;
|
virtual ~DataSourceTabPage() override;
|
||||||
virtual void dispose() override;
|
|
||||||
|
|
||||||
void commitPage();
|
void commitPage();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// OWizardPage
|
// OWizardPage
|
||||||
virtual void ActivatePage() override;
|
virtual void ActivatePage() override;
|
||||||
|
virtual void dispose() override;
|
||||||
virtual bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ) override;
|
virtual bool commitPage( ::svt::WizardTypes::CommitPageReason eReason ) override;
|
||||||
|
|
||||||
//TabPage
|
//TabPage
|
||||||
@@ -61,21 +75,22 @@ private:
|
|||||||
|
|
||||||
virtual void initializePage() override;
|
virtual void initializePage() override;
|
||||||
|
|
||||||
DECL_LINK( SeriesSelectionChangedHdl, SvTreeListBox*, void );
|
DECL_LINK( SeriesSelectionChangedHdl, weld::TreeView&, void );
|
||||||
DECL_LINK( RoleSelectionChangedHdl, SvTreeListBox*, void );
|
DECL_LINK( RoleSelectionChangedHdl, weld::TreeView&, void );
|
||||||
DECL_LINK( MainRangeButtonClickedHdl, Button*, void );
|
DECL_LINK( MainRangeButtonClickedHdl, weld::Button&, void );
|
||||||
DECL_LINK( CategoriesRangeButtonClickedHdl, Button*, void );
|
DECL_LINK( CategoriesRangeButtonClickedHdl, weld::Button&, void );
|
||||||
DECL_LINK( AddButtonClickedHdl, Button*, void );
|
DECL_LINK( AddButtonClickedHdl, weld::Button&, void );
|
||||||
DECL_LINK( RemoveButtonClickedHdl, Button*, void );
|
DECL_LINK( RemoveButtonClickedHdl, weld::Button&, void );
|
||||||
DECL_LINK( RangeModifiedHdl, Edit&, void );
|
DECL_LINK( RangeModifiedHdl, weld::Entry&, void );
|
||||||
DECL_LINK( RangeUpdateDataHdl, Edit&, void );
|
DECL_LINK( UpButtonClickedHdl, weld::Button&, void );
|
||||||
DECL_LINK( UpButtonClickedHdl, Button*, void );
|
DECL_LINK( DownButtonClickedHdl, weld::Button&, void );
|
||||||
DECL_LINK( DownButtonClickedHdl, Button*, void );
|
|
||||||
|
|
||||||
// ____ RangeSelectionListenerParent ____
|
// ____ RangeSelectionListenerParent ____
|
||||||
virtual void listeningFinished( const OUString & rNewRange ) override;
|
virtual void listeningFinished( const OUString & rNewRange ) override;
|
||||||
virtual void disposingRangeSelection() override;
|
virtual void disposingRangeSelection() override;
|
||||||
|
|
||||||
|
void InsertRoleLBEntry(const OUString& rRole, const OUString& rRange);
|
||||||
|
|
||||||
void updateControlState();
|
void updateControlState();
|
||||||
|
|
||||||
/** updates the internal data according to the content of the given edit
|
/** updates the internal data according to the content of the given edit
|
||||||
@@ -85,12 +100,12 @@ private:
|
|||||||
<TRUE/> if the text from the field is a valid format to the internal
|
<TRUE/> if the text from the field is a valid format to the internal
|
||||||
data was valid
|
data was valid
|
||||||
*/
|
*/
|
||||||
bool updateModelFromControl( Edit * pField = nullptr );
|
bool updateModelFromControl(weld::Entry* pField = nullptr);
|
||||||
|
|
||||||
/** @return </sal_True>, if the edit field contains a valid range entry. If no
|
/** @return </sal_True>, if the edit field contains a valid range entry. If no
|
||||||
XCellRangesAccess can be obtained, </sal_False> is returned.
|
XCellRangesAccess can be obtained, </sal_False> is returned.
|
||||||
*/
|
*/
|
||||||
bool isRangeFieldContentValid( Edit & rEdit );
|
bool isRangeFieldContentValid(weld::Entry& rEdit);
|
||||||
|
|
||||||
/** @return </sal_True>, if the tab-page is in a consistent (commitable) state
|
/** @return </sal_True>, if the tab-page is in a consistent (commitable) state
|
||||||
*/
|
*/
|
||||||
@@ -102,34 +117,34 @@ private:
|
|||||||
void fillSeriesListBox();
|
void fillSeriesListBox();
|
||||||
void fillRoleListBox();
|
void fillRoleListBox();
|
||||||
|
|
||||||
VclPtr<FixedText> m_pFT_CAPTION;
|
std::vector<std::unique_ptr<SeriesEntry>> m_aEntries;
|
||||||
VclPtr<FixedText> m_pFT_SERIES;
|
|
||||||
VclPtr<SvTreeListBox> m_pLB_SERIES;
|
|
||||||
VclPtr<PushButton> m_pBTN_ADD;
|
|
||||||
VclPtr<PushButton> m_pBTN_REMOVE;
|
|
||||||
VclPtr<PushButton> m_pBTN_UP;
|
|
||||||
VclPtr<PushButton> m_pBTN_DOWN;
|
|
||||||
|
|
||||||
VclPtr<FixedText> m_pFT_ROLE;
|
|
||||||
VclPtr<SvTabListBox> m_pLB_ROLE;
|
|
||||||
VclPtr<FixedText> m_pFT_RANGE;
|
|
||||||
VclPtr<Edit> m_pEDT_RANGE;
|
|
||||||
VclPtr<PushButton> m_pIMB_RANGE_MAIN;
|
|
||||||
|
|
||||||
VclPtr<FixedText> m_pFT_CATEGORIES;
|
|
||||||
VclPtr<FixedText> m_pFT_DATALABELS;//used for xy charts
|
|
||||||
VclPtr<Edit> m_pEDT_CATEGORIES;
|
|
||||||
VclPtr<PushButton> m_pIMB_RANGE_CAT;
|
|
||||||
|
|
||||||
OUString m_aFixedTextRange;
|
OUString m_aFixedTextRange;
|
||||||
|
|
||||||
ChartTypeTemplateProvider * m_pTemplateProvider;
|
ChartTypeTemplateProvider * m_pTemplateProvider;
|
||||||
DialogModel & m_rDialogModel;
|
DialogModel & m_rDialogModel;
|
||||||
VclPtr<Edit> m_pCurrentRangeChoosingField;
|
weld::Entry* m_pCurrentRangeChoosingField;
|
||||||
bool m_bIsDirty;
|
bool m_bIsDirty;
|
||||||
|
|
||||||
VclPtr<Dialog> m_pParentDialog;
|
VclPtr<Dialog> m_pParentDialog;
|
||||||
TabPageNotifiable * m_pTabPageNotifiable;
|
TabPageNotifiable * m_pTabPageNotifiable;
|
||||||
|
|
||||||
|
std::unique_ptr<weld::Label> m_xFT_CAPTION;
|
||||||
|
std::unique_ptr<weld::Label> m_xFT_SERIES;
|
||||||
|
std::unique_ptr<weld::TreeView> m_xLB_SERIES;
|
||||||
|
std::unique_ptr<weld::Button> m_xBTN_ADD;
|
||||||
|
std::unique_ptr<weld::Button> m_xBTN_REMOVE;
|
||||||
|
std::unique_ptr<weld::Button> m_xBTN_UP;
|
||||||
|
std::unique_ptr<weld::Button> m_xBTN_DOWN;
|
||||||
|
std::unique_ptr<weld::Label> m_xFT_ROLE;
|
||||||
|
std::unique_ptr<weld::TreeView> m_xLB_ROLE;
|
||||||
|
std::unique_ptr<weld::Label> m_xFT_RANGE;
|
||||||
|
std::unique_ptr<weld::Entry> m_xEDT_RANGE;
|
||||||
|
std::unique_ptr<weld::Button> m_xIMB_RANGE_MAIN;
|
||||||
|
std::unique_ptr<weld::Label> m_xFT_CATEGORIES;
|
||||||
|
std::unique_ptr<weld::Label> m_xFT_DATALABELS;//used for xy charts
|
||||||
|
std::unique_ptr<weld::Entry> m_xEDT_CATEGORIES;
|
||||||
|
std::unique_ptr<weld::Button> m_xIMB_RANGE_CAT;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chart
|
} // namespace chart
|
||||||
|
@@ -1,44 +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 <vcl/builderfactory.hxx>
|
|
||||||
#include "tp_DataSourceControls.hxx"
|
|
||||||
|
|
||||||
using namespace ::com::sun::star;
|
|
||||||
|
|
||||||
namespace chart
|
|
||||||
{
|
|
||||||
|
|
||||||
SeriesEntry::~SeriesEntry()
|
|
||||||
{}
|
|
||||||
|
|
||||||
SeriesListBox::SeriesListBox(vcl::Window* pParent, WinBits nStyle)
|
|
||||||
: SvTreeListBox(pParent, nStyle)
|
|
||||||
{}
|
|
||||||
|
|
||||||
VCL_BUILDER_FACTORY_CONSTRUCTOR(SeriesListBox, 0)
|
|
||||||
|
|
||||||
SvTreeListEntry* SeriesListBox::CreateEntry() const
|
|
||||||
{
|
|
||||||
return new SeriesEntry;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace chart
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
@@ -1,56 +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 INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_DATASOURCECONTROLS_HXX
|
|
||||||
#define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_DATASOURCECONTROLS_HXX
|
|
||||||
|
|
||||||
#include <vcl/treelistbox.hxx>
|
|
||||||
#include <vcl/treelistentry.hxx>
|
|
||||||
|
|
||||||
namespace com { namespace sun { namespace star { namespace chart2 { class XChartType; } } } }
|
|
||||||
namespace com { namespace sun { namespace star { namespace chart2 { class XDataSeries; } } } }
|
|
||||||
|
|
||||||
namespace chart
|
|
||||||
{
|
|
||||||
|
|
||||||
class SeriesEntry : public ::SvTreeListEntry
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
virtual ~SeriesEntry() override;
|
|
||||||
|
|
||||||
/// the corresponding data series
|
|
||||||
css::uno::Reference< css::chart2::XDataSeries > m_xDataSeries;
|
|
||||||
|
|
||||||
/// the chart type that contains the series (via XDataSeriesContainer)
|
|
||||||
css::uno::Reference< css::chart2::XChartType > m_xChartType;
|
|
||||||
};
|
|
||||||
|
|
||||||
class SeriesListBox : public ::SvTreeListBox
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
explicit SeriesListBox(vcl::Window* pParent, WinBits nStyle);
|
|
||||||
|
|
||||||
virtual SvTreeListEntry* CreateEntry() const override;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace chart
|
|
||||||
|
|
||||||
// INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_DATASOURCECONTROLS_HXX
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
@@ -1,19 +1,46 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.20.0 -->
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface domain="chart">
|
<interface domain="chart">
|
||||||
<requires lib="gtk+" version="3.18"/>
|
<requires lib="gtk+" version="3.18"/>
|
||||||
<requires lib="LibreOffice" version="1.0"/>
|
<object class="GtkImage" id="image1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-go-up</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkImage" id="image2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="stock">gtk-go-down</property>
|
||||||
|
</object>
|
||||||
<object class="GtkImage" id="imageIMB_RANGE_CAT">
|
<object class="GtkImage" id="imageIMB_RANGE_CAT">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="tooltip_text" translatable="yes" context="tp_DataSource|imageIMB_RANGE_CAT|tooltip_text">Select data range</property>
|
<property name="tooltip_text" translatable="yes" context="tp_DataSource|imageIMB_RANGE_CAT|tooltip_text">Select data range</property>
|
||||||
<property name="pixbuf">chart2/res/selectrange.png</property>
|
<property name="icon_name">chart2/res/selectrange.png</property>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkImage" id="imageIMB_RANGE_MAIN">
|
<object class="GtkImage" id="imageIMB_RANGE_MAIN">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="tooltip_text" translatable="yes" context="tp_DataSource|imageIMB_RANGE_MAIN|tooltip_text">Select data range</property>
|
<property name="tooltip_text" translatable="yes" context="tp_DataSource|imageIMB_RANGE_MAIN|tooltip_text">Select data range</property>
|
||||||
<property name="pixbuf">chart2/res/selectrange.png</property>
|
<property name="icon_name">chart2/res/selectrange.png</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkTreeStore" id="liststore1">
|
||||||
|
<columns>
|
||||||
|
<!-- column-name text -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
<!-- column-name id -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
</columns>
|
||||||
|
</object>
|
||||||
|
<object class="GtkTreeStore" id="liststore2">
|
||||||
|
<columns>
|
||||||
|
<!-- column-name text -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
<!-- column-name text2 -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
<!-- column-name id -->
|
||||||
|
<column type="gchararray"/>
|
||||||
|
</columns>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkBox" id="tp_DataSource">
|
<object class="GtkBox" id="tp_DataSource">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -57,7 +84,7 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes" context="tp_DataSource|FT_SERIES">Data _series:</property>
|
<property name="label" translatable="yes" context="tp_DataSource|FT_SERIES">Data _series:</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="mnemonic_widget">LB_SERIES:border</property>
|
<property name="mnemonic_widget">LB_SERIES</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -67,14 +94,37 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="chartcontrollerlo-SeriesListBox" id="LB_SERIES:border">
|
<object class="GtkScrolledWindow">
|
||||||
<property name="width_request">200</property>
|
|
||||||
<property name="height_request">200</property>
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
<property name="vexpand">True</property>
|
<property name="vexpand">True</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="LB_SERIES">
|
||||||
|
<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>
|
||||||
|
<property name="headers_visible">False</property>
|
||||||
|
<property name="headers_clickable">False</property>
|
||||||
|
<property name="search_column">0</property>
|
||||||
|
<property name="show_expanders">False</property>
|
||||||
<child internal-child="selection">
|
<child internal-child="selection">
|
||||||
<object class="GtkTreeSelection" id="Chart Series ListBox-selection1"/>
|
<object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="text">0</attribute>
|
||||||
|
</attributes>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -108,6 +158,7 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">image1</property>
|
||||||
<property name="always_show_image">True</property>
|
<property name="always_show_image">True</property>
|
||||||
<child internal-child="accessible">
|
<child internal-child="accessible">
|
||||||
<object class="AtkObject" id="BTN_UP-atkobject">
|
<object class="AtkObject" id="BTN_UP-atkobject">
|
||||||
@@ -139,6 +190,8 @@
|
|||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="receives_default">True</property>
|
<property name="receives_default">True</property>
|
||||||
|
<property name="image">image2</property>
|
||||||
|
<property name="always_show_image">True</property>
|
||||||
<child internal-child="accessible">
|
<child internal-child="accessible">
|
||||||
<object class="AtkObject" id="BTN_DOWN-atkobject">
|
<object class="AtkObject" id="BTN_DOWN-atkobject">
|
||||||
<property name="AtkObject::accessible-name" translatable="yes" context="tp_DataSource|BTN_DOWN-atkobject">Down</property>
|
<property name="AtkObject::accessible-name" translatable="yes" context="tp_DataSource|BTN_DOWN-atkobject">Down</property>
|
||||||
@@ -178,7 +231,7 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes" context="tp_DataSource|FT_ROLE">_Data ranges:</property>
|
<property name="label" translatable="yes" context="tp_DataSource|FT_ROLE">_Data ranges:</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<property name="mnemonic_widget">LB_ROLE:border</property>
|
<property name="mnemonic_widget">LB_ROLE</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -187,15 +240,47 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="vcllo-SvTabListBox" id="LB_ROLE:border">
|
<object class="GtkScrolledWindow">
|
||||||
<property name="width_request">440</property>
|
<property name="visible">True</property>
|
||||||
<property name="height_request">100</property>
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeView" id="LB_ROLE">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="vexpand">True</property>
|
<property name="vexpand">True</property>
|
||||||
|
<property name="model">liststore2</property>
|
||||||
|
<property name="headers_visible">False</property>
|
||||||
|
<property name="headers_clickable">False</property>
|
||||||
|
<property name="search_column">0</property>
|
||||||
|
<property name="show_expanders">False</property>
|
||||||
<child internal-child="selection">
|
<child internal-child="selection">
|
||||||
<object class="GtkTreeSelection" id="Tab List-selection"/>
|
<object class="GtkTreeSelection" id="treeview-selection2"/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererText" id="cellrenderertext2"/>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="text">0</attribute>
|
||||||
|
</attributes>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererText" id="cellrenderertext3"/>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="text">1</attribute>
|
||||||
|
</attributes>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@@ -294,9 +294,6 @@
|
|||||||
</properties>
|
</properties>
|
||||||
</glade-widget-class>
|
</glade-widget-class>
|
||||||
|
|
||||||
<glade-widget-class title="Chart Series ListBox" name="chartcontrollerlo-SeriesListBox"
|
|
||||||
generic-name="Chart Series ListBox" parent="vcllo-SvTreeListBox"
|
|
||||||
icon-name="widget-gtk-treeview"/>
|
|
||||||
<glade-widget-class title="Hyperlink Tree Box" name="cuilo-SvxHlmarkTreeLBox"
|
<glade-widget-class title="Hyperlink Tree Box" name="cuilo-SvxHlmarkTreeLBox"
|
||||||
generic-name="Hyperlink Tree Box" parent="vcllo-SvTreeListBox"
|
generic-name="Hyperlink Tree Box" parent="vcllo-SvTreeListBox"
|
||||||
icon-name="widget-gtk-treeview"/>
|
icon-name="widget-gtk-treeview"/>
|
||||||
|
@@ -472,7 +472,6 @@ custom_widgets = [
|
|||||||
'SearchResultsBox',
|
'SearchResultsBox',
|
||||||
'SelectionListBox',
|
'SelectionListBox',
|
||||||
'SentenceEditWindow',
|
'SentenceEditWindow',
|
||||||
'SeriesListBox',
|
|
||||||
'SfxAccCfgTabListBox',
|
'SfxAccCfgTabListBox',
|
||||||
'SfxConfigFunctionListBox',
|
'SfxConfigFunctionListBox',
|
||||||
'SfxConfigGroupListBox',
|
'SfxConfigGroupListBox',
|
||||||
|
@@ -1696,9 +1696,18 @@ public:
|
|||||||
virtual void set_error(bool bError) override
|
virtual void set_error(bool bError) override
|
||||||
{
|
{
|
||||||
if (bError)
|
if (bError)
|
||||||
m_xEntry->SetControlForeground(Color(0xf0, 0, 0));
|
{
|
||||||
|
// #i75179# enable setting the background to a different color
|
||||||
|
m_xEntry->SetForceControlBackground(true);
|
||||||
|
m_xEntry->SetControlForeground(COL_WHITE);
|
||||||
|
m_xEntry->SetControlBackground(0xff6563);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
m_xEntry->SetForceControlBackground(false);
|
||||||
m_xEntry->SetControlForeground();
|
m_xEntry->SetControlForeground();
|
||||||
|
m_xEntry->SetControlBackground();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual vcl::Font get_font() override
|
virtual vcl::Font get_font() override
|
||||||
|
Reference in New Issue
Block a user