Merge upstream LibreOffice master into ODFStudio main

This commit is contained in:
2026-10-08 12:56:19 +02:00
1080 changed files with 20536 additions and 8513 deletions
+5 -3
View File
@@ -545,9 +545,10 @@ void SbTreeListBox::ReloadAllEntries()
} }
} }
std::unique_ptr<weld::TreeIter> SbTreeListBox::ImpFindEntry(std::u16string_view rText) std::unique_ptr<weld::TreeIter> SbTreeListBox::ImpFindEntry(const weld::TreeIter& rParentIter,
std::u16string_view rText)
{ {
std::unique_ptr<weld::TreeIter> pIter = m_xControl->make_iterator(); std::unique_ptr<weld::TreeIter> pIter = m_xControl->make_iterator(&rParentIter);
bool bValidIter = m_xControl->iter_children(*pIter); bool bValidIter = m_xControl->iter_children(*pIter);
while (bValidIter) while (bValidIter)
{ {
@@ -827,7 +828,8 @@ void SbTreeListBox::SetCurrentEntry (EntryDescriptor const & rDesc)
if( !aLibSubName.isEmpty() ) if( !aLibSubName.isEmpty() )
{ {
m_xControl->expand_row(*xLibIter); m_xControl->expand_row(*xLibIter);
if (std::unique_ptr<weld::TreeIter> xSubLibIter = ImpFindEntry(aLibSubName)) if (std::unique_ptr<weld::TreeIter> xSubLibIter
= ImpFindEntry(*xLibIter, aLibSubName))
m_xControl->copy_iterator(*xSubLibIter, *xCurIter); m_xControl->copy_iterator(*xSubLibIter, *xCurIter);
} }
const OUString& aName( aDesc.GetName() ); const OUString& aName( aDesc.GetName() );
+1 -1
View File
@@ -901,7 +901,7 @@ SdrObjKind DlgEdObj::GetObjIdentifier() const
} }
} }
rtl::Reference<SdrObject> DlgEdObj::CloneSdrObject(SdrModel& rTargetModel) const rtl::Reference<SdrObject> DlgEdObj::implCloneSdrObject(SdrModel& rTargetModel) const
{ {
return new DlgEdObj(rTargetModel, *this); return new DlgEdObj(rTargetModel, *this);
} }
+2 -1
View File
@@ -192,7 +192,8 @@ protected:
void ImpCreateLibSubEntries(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName); void ImpCreateLibSubEntries(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName);
void ImpCreateLibSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName ); void ImpCreateLibSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName );
void ImpCreateLibSubSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName); void ImpCreateLibSubSubEntriesInVBAMode(const weld::TreeIter& rLibRootEntry, const ScriptDocument& rDocument, const OUString& rLibName);
std::unique_ptr<weld::TreeIter> ImpFindEntry(std::u16string_view rText); std::unique_ptr<weld::TreeIter> ImpFindEntry(const weld::TreeIter& rParentIter,
std::u16string_view rText);
// DocumentEventListener // DocumentEventListener
virtual void onDocumentCreated( const ScriptDocument& _rDocument ) override; virtual void onDocumentCreated( const ScriptDocument& _rDocument ) override;
+2 -4
View File
@@ -47,15 +47,15 @@ class DlgEdObj: public SdrUnoObj
friend class DlgEdPropListenerImpl; friend class DlgEdPropListenerImpl;
friend class DlgEdForm; friend class DlgEdForm;
private:
bool bIsListening; bool bIsListening;
rtl::Reference<DlgEdForm> pDlgEdForm; rtl::Reference<DlgEdForm> pDlgEdForm;
rtl::Reference<DlgEdPropListenerImpl> m_xPropertyChangeListener; rtl::Reference<DlgEdPropListenerImpl> m_xPropertyChangeListener;
rtl::Reference<DlgEdEvtContListenerImpl> m_xContainerListener; rtl::Reference<DlgEdEvtContListenerImpl> m_xContainerListener;
private:
DlgEditor& GetDialogEditor (); DlgEditor& GetDialogEditor ();
virtual rtl::Reference<SdrObject> implCloneSdrObject(SdrModel& rTargetModel) const override; // not working yet
protected: protected:
DlgEdObj(SdrModel& rSdrModel); DlgEdObj(SdrModel& rSdrModel);
// copy constructor // copy constructor
@@ -98,8 +98,6 @@ public:
virtual SdrInventor GetObjInventor() const override; virtual SdrInventor GetObjInventor() const override;
virtual SdrObjKind GetObjIdentifier() const override; virtual SdrObjKind GetObjIdentifier() const override;
virtual rtl::Reference<SdrObject> CloneSdrObject(SdrModel& rTargetModel) const override; // not working yet
// FullDrag support // FullDrag support
virtual rtl::Reference<SdrObject> getFullDragClone() const override; virtual rtl::Reference<SdrObject> getFullDragClone() const override;
@@ -79,6 +79,7 @@ namespace basic
static ImplRepository& Instance(); static ImplRepository& Instance();
BasicManager* getDocumentBasicManager( const Reference< XModel >& _rxDocumentModel ); BasicManager* getDocumentBasicManager( const Reference< XModel >& _rxDocumentModel );
BasicManager* getExistingDocumentBasicManager( const Reference< XModel >& _rxDocumentModel ) const;
BasicManager* getOrCreateApplicationBasicManager(); BasicManager* getOrCreateApplicationBasicManager();
static BasicManager* getApplicationBasicManager(); static BasicManager* getApplicationBasicManager();
static void setApplicationBasicManager( std::unique_ptr<BasicManager> _pBasicManager ); static void setApplicationBasicManager( std::unique_ptr<BasicManager> _pBasicManager );
@@ -236,6 +237,15 @@ namespace basic
return nullptr; return nullptr;
} }
BasicManager* ImplRepository::getExistingDocumentBasicManager( const Reference< XModel >& _rxDocumentModel ) const
{
SolarMutexGuard g;
Reference< XInterface > xNormalized( _rxDocumentModel, UNO_QUERY );
auto const loc = m_aStore.find( xNormalized );
return loc != m_aStore.end() ? loc->second.get() : nullptr;
}
BasicManager* ImplRepository::getOrCreateApplicationBasicManager() BasicManager* ImplRepository::getOrCreateApplicationBasicManager()
{ {
SolarMutexGuard g; SolarMutexGuard g;
@@ -600,6 +610,11 @@ namespace basic
return ImplRepository::Instance().getDocumentBasicManager( _rxDocumentModel ); return ImplRepository::Instance().getDocumentBasicManager( _rxDocumentModel );
} }
BasicManager* BasicManagerRepository::getExistingDocumentBasicManager( const Reference< XModel >& _rxDocumentModel )
{
return ImplRepository::Instance().getExistingDocumentBasicManager( _rxDocumentModel );
}
BasicManager* BasicManagerRepository::getApplicationBasicManager() BasicManager* BasicManagerRepository::getApplicationBasicManager()
{ {
return ImplRepository::Instance().getOrCreateApplicationBasicManager(); return ImplRepository::Instance().getOrCreateApplicationBasicManager();
+1 -1
View File
@@ -1047,7 +1047,7 @@ StarBASIC* BasicManager::AddLib( SotStorage& rStorage, const OUString& rLibName,
pLibInfo = nullptr; pLibInfo = nullptr;
} }
return pLibInfo ? &*pLibInfo->GetLib() : nullptr; return pLibInfo ? pLibInfo->GetLib().get() : nullptr;
} }
+20 -5
View File
@@ -222,9 +222,21 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
mvStringOffsets[ i ] = static_cast<sal_uInt16>(nOff); mvStringOffsets[ i ] = static_cast<sal_uInt16>(nOff);
} }
r.ReadUInt32( nLen ); r.ReadUInt32( nLen );
if (r.good()
&& (nLen > r.remainingSize()
|| std::any_of(mvStringOffsets.begin(), mvStringOffsets.end(),
[nLen](sal_uInt32 nOff) { return nOff >= nLen; })))
{
SAL_WARN("basic", "Parsing error: string pool of " << nLen
<< " does not fit the record or its string offsets");
MakeStrings(0);
bError = true;
break;
}
if (r.good()) if (r.good())
{ {
pStrings.reset(new sal_Unicode[ nLen ]); // The element past the pool ends the last string.
pStrings.reset(new sal_Unicode[ nLen + 1 ]());
nStringSize = static_cast<sal_uInt16>(nLen); nStringSize = static_cast<sal_uInt16>(nLen);
if (GetToUnicodePoolData(r, nLen, nNext)) if (GetToUnicodePoolData(r, nLen, nNext))
@@ -234,13 +246,16 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
} }
else else
{ {
std::unique_ptr<char[]> pByteStrings(new char[nLen]); std::unique_ptr<char[]> pByteStrings(new char[nLen]());
r.ReadBytes(pByteStrings.get(), nLen); r.ReadBytes(pByteStrings.get(), nLen);
for (size_t j = 0; j < mvStringOffsets.size(); j++) for (size_t j = 0; j < mvStringOffsets.size(); j++)
{ {
sal_uInt16 nOff2 = static_cast<sal_uInt16>(mvStringOffsets[j]); sal_uInt16 nOff2 = static_cast<sal_uInt16>(mvStringOffsets[j]);
OUString aStr(pByteStrings.get() + nOff2, strlen(pByteStrings.get() + nOff2), eCharSet); const sal_uInt32 nAvail = nLen - nOff2;
std::copy_n(aStr.getStr(), aStr.getLength() + 1, const char* pByteString = pByteStrings.get() + nOff2;
OUString aStr(pByteString, strnlen(pByteString, nAvail), eCharSet);
std::copy_n(aStr.getStr(),
std::min<sal_uInt32>(aStr.getLength() + 1, nAvail),
pStrings.get() + nOff2); pStrings.get() + nOff2);
} }
} }
@@ -305,7 +320,7 @@ bool SbiImage::Load( SvStream& r, sal_uInt32& nVersion )
// nested user defined types // nested user defined types
// declared before use, so it is ok to reference it by name on load // declared before use, so it is ok to reference it by name on load
OUString aNestedTypeName = r.ReadUniOrByteString(eCharSet); OUString aNestedTypeName = r.ReadUniOrByteString(eCharSet);
SbxObject* pNestedTypeObj = static_cast< SbxObject* >( rTypes->Find( aNestedTypeName, SbxClassType::Object ) ); SbxObject* pNestedTypeObj = dynamic_cast< SbxObject* >( rTypes->Find( aNestedTypeName, SbxClassType::Object ) );
if (pNestedTypeObj) if (pNestedTypeObj)
{ {
SbxObjectRef pCloneObj = cloneTypeObjectImpl( *pNestedTypeObj ); SbxObjectRef pCloneObj = cloneTypeObjectImpl( *pNestedTypeObj );
+1 -1
View File
@@ -342,7 +342,7 @@ bool SbxArray::LoadData( SvStream& rStrm, sal_uInt16 /*nVer*/ )
{ {
sal_uInt16 nIdx; sal_uInt16 nIdx;
rStrm.ReadUInt16( nIdx ); rStrm.ReadUInt16( nIdx );
SbxVariableRef pVar = static_cast<SbxVariable*>(Load( rStrm ).get()); SbxVariableRef pVar = dynamic_cast<SbxVariable*>(Load( rStrm ).get());
if( pVar ) if( pVar )
{ {
SbxVariableRef& rRef = GetRef( nIdx ); SbxVariableRef& rRef = GetRef( nIdx );
+1 -1
View File
@@ -534,7 +534,7 @@ void SbxObject::Remove( SbxVariable* pVar )
static bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray ) static bool LoadArray( SvStream& rStrm, SbxObject* pThis, SbxArray* pArray )
{ {
SbxArrayRef p = static_cast<SbxArray*>( SbxBase::Load( rStrm ).get() ); SbxArrayRef p = dynamic_cast<SbxArray*>( SbxBase::Load( rStrm ).get() );
if( !p.is() ) if( !p.is() )
{ {
return false; return false;
+1
View File
@@ -441,6 +441,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
SbxValues aTmp; SbxValues aTmp;
OUString aTmpString; OUString aTmpString;
OUString aVal; OUString aVal;
SbxValue::Clear();
aTmp.eType = aData.eType = static_cast<SbxDataType>(nType); aTmp.eType = aData.eType = static_cast<SbxDataType>(nType);
aTmp.pOUString = &aVal; aTmp.pOUString = &aVal;
switch( nType ) switch( nType )
+3 -1
View File
@@ -952,10 +952,12 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
// Preload? // Preload?
{ {
// A password-protected library of a document is loaded with the document's Basic project.
const bool bDocumentContainer = Reference< XModel >( mxOwnerDocument ).is();
for (auto& aName : maNameContainer.getElementNames()) for (auto& aName : maNameContainer.getElementNames())
{ {
SfxLibrary* pImplLib = getImplLib( aName ); SfxLibrary* pImplLib = getImplLib( aName );
if( pImplLib->mbPreload ) if( pImplLib->mbPreload && !( bDocumentContainer && pImplLib->mbPasswordProtected ) )
{ {
loadLibrary_Impl(aName, guard); loadLibrary_Impl(aName, guard);
} }
@@ -1,8 +1,6 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*- # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
# #
# Copyright the LibreOffice contributors. # This file is part of the LibreOffice project.
#
# SPDX-License-Identifier: MPL-2.0
# #
# This Source Code Form is subject to the terms of the Mozilla Public # 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 # License, v. 2.0. If a copy of the MPL was not distributed with this
+18
View File
@@ -1017,6 +1017,24 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, test1904NullDate)
} }
} }
CPPUNIT_TEST_FIXTURE(Chart2ExportTest3, testTdf116148HatchWithoutName)
{
// The bar series is filled with a hatch but names no hatch, so the drawing
// layer paints it with the item pool's default one.
loadFromFile(u"odp/tdf116148.odp");
save(TestFilter::PPTX);
xmlDocUniquePtr pXmlDoc = parseExport(u"ppt/charts/chart1.xml"_ustr);
CPPUNIT_ASSERT(pXmlDoc);
// Without the fix the series carried no fill at all, and PowerPoint filled
// the bars with its own default instead, which is solid.
static constexpr OString sFill(
"/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:spPr/a:pattFill"_ostr);
assertXPath(pXmlDoc, sFill, "prst", u"ltHorz");
assertXPath(pXmlDoc, sFill + "/a:fgClr/a:srgbClr", "val", u"3465A4");
}
CPPUNIT_PLUGIN_IMPLEMENT(); CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Binary file not shown.
@@ -1,8 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -34,8 +34,6 @@
#include <com/sun/star/chart2/DataPointGeometry3D.hpp> #include <com/sun/star/chart2/DataPointGeometry3D.hpp>
#include <svtools/valueset.hxx>
#include <vcl/image.hxx>
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include <comphelper/diagnose_ex.hxx> #include <comphelper/diagnose_ex.hxx>
@@ -344,10 +342,12 @@ void ChartTypeDialogController::commitToModel( const ChartTypeParameter& rParame
} }
} }
void ChartTypeDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) std::vector<ChartTypeEntry>
ChartTypeDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/)
{ {
rSubTypeList.Clear(); return {};
} }
bool ChartTypeDialogController::shouldShow_3DLookControl() const bool ChartTypeDialogController::shouldShow_3DLookControl() const
{ {
return false; return false;
@@ -432,51 +432,55 @@ const tTemplateServiceChartTypeParameterMap& ColumnChartDialogController::getTem
{"com.sun.star.chart2.template.ThreeDColumnDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}}; {"com.sun.star.chart2.template.ThreeDColumnDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}};
return s_aTemplateMap; return s_aTemplateMap;
} }
void ColumnChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) std::vector<ChartTypeEntry>
ColumnChartDialogController::getSubTypes(const ChartTypeParameter& rParameter)
{ {
rSubTypeList.Clear(); std::vector<ChartTypeEntry> aEntries;
if( rParameter.b3DLook ) if( rParameter.b3DLook )
{ {
switch(rParameter.nGeometry3D) switch(rParameter.nGeometry3D)
{ {
case DataPointGeometry3D::CYLINDER: case DataPointGeometry3D::CYLINDER:
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_SAEULE_3D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_SAEULE_3D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_SAEULE_3D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_SAEULE_3D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_SAEULE_3D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_SAEULE_3D_3));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_SAEULE_3D_4)); aEntries.emplace_back(Image(StockImage::Yes, BMP_SAEULE_3D_4));
break; break;
case DataPointGeometry3D::CONE: case DataPointGeometry3D::CONE:
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_KEGEL_3D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGEL_3D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_KEGEL_3D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGEL_3D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_KEGEL_3D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGEL_3D_3));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_KEGEL_3D_4)); aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGEL_3D_4));
break; break;
case DataPointGeometry3D::PYRAMID: case DataPointGeometry3D::PYRAMID:
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_PYRAMID_3D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMID_3D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_PYRAMID_3D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMID_3D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_PYRAMID_3D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMID_3D_3));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_PYRAMID_3D_4)); aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMID_3D_4));
break; break;
default: //DataPointGeometry3D::CUBOID: default: //DataPointGeometry3D::CUBOID:
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMNS_3D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_3D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMNS_3D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_3D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_COLUMNS_3D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_3D_3));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_COLUMNS_3D)); aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_3D));
break; break;
} }
} }
else else
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMNS_2D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_2D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMNS_2D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_2D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_COLUMNS_2D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_COLUMNS_2D_3));
} }
rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) ); aEntries.at(0).sName = SchResId(STR_NORMAL);
rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) ); aEntries.at(1).sName = SchResId(STR_STACKED);
rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) ); aEntries.at(2).sName = SchResId(STR_PERCENT);
rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) ); if (aEntries.size() > 3)
aEntries.at(3).sName = SchResId(STR_DEEP);
return aEntries;
} }
BarChartDialogController::BarChartDialogController() BarChartDialogController::BarChartDialogController()
@@ -509,50 +513,54 @@ const tTemplateServiceChartTypeParameterMap& BarChartDialogController::getTempla
{"com.sun.star.chart2.template.ThreeDBarDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}}; {"com.sun.star.chart2.template.ThreeDBarDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z)}};
return s_aTemplateMap; return s_aTemplateMap;
} }
void BarChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) std::vector<ChartTypeEntry>
BarChartDialogController::getSubTypes(const ChartTypeParameter& rParameter)
{ {
rSubTypeList.Clear(); std::vector<ChartTypeEntry> aEntries;
if( rParameter.b3DLook ) if( rParameter.b3DLook )
{ {
switch(rParameter.nGeometry3D) switch(rParameter.nGeometry3D)
{ {
case DataPointGeometry3D::CYLINDER: case DataPointGeometry3D::CYLINDER:
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_ROEHRE_3D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_ROEHRE_3D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_ROEHRE_3D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_ROEHRE_3D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_ROEHRE_3D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_ROEHRE_3D_3));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_ROEHRE_3D_4)); aEntries.emplace_back(Image(StockImage::Yes, BMP_ROEHRE_3D_4));
break; break;
case DataPointGeometry3D::CONE: case DataPointGeometry3D::CONE:
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_KEGELQ_3D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGELQ_3D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_KEGELQ_3D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGELQ_3D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_KEGELQ_3D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGELQ_3D_3));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_KEGELQ_3D_4)); aEntries.emplace_back(Image(StockImage::Yes, BMP_KEGELQ_3D_4));
break; break;
case DataPointGeometry3D::PYRAMID: case DataPointGeometry3D::PYRAMID:
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMIDQ_3D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMIDQ_3D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMIDQ_3D_3));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_PYRAMIDQ_3D_4)); aEntries.emplace_back(Image(StockImage::Yes, BMP_PYRAMIDQ_3D_4));
break; break;
default: //DataPointGeometry3D::CUBOID: default: //DataPointGeometry3D::CUBOID:
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BARS_3D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_3D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_BARS_3D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_3D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_BARS_3D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_3D_3));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_BARS_3D)); aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_3D));
break; break;
} }
} }
else else
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BARS_2D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_2D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_BARS_2D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_2D_2));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_BARS_2D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_BARS_2D_3));
} }
rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) ); aEntries.at(0).sName = SchResId(STR_NORMAL);
rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) ); aEntries.at(1).sName = SchResId(STR_STACKED);
rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) ); aEntries.at(2).sName = SchResId(STR_PERCENT);
rSubTypeList.SetItemText( 4, SchResId( STR_DEEP ) ); if (aEntries.size() > 3)
aEntries.at(3).sName = SchResId(STR_DEEP);
return aEntries;
} }
//========= //=========
@@ -586,12 +594,10 @@ const tTemplateServiceChartTypeParameterMap& HistogramChartDialogController::get
return s_aTemplateMap; return s_aTemplateMap;
} }
void HistogramChartDialogController::fillSubTypeList(ValueSet& rSubTypeList, std::vector<ChartTypeEntry>
const ChartTypeParameter& /*rParameter*/) HistogramChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/)
{ {
rSubTypeList.Clear(); return { { Image(StockImage::Yes, BMP_HISTOGRAM), SchResId(STR_HISTOGRAM) } };
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_HISTOGRAM));
rSubTypeList.SetItemText(1, SchResId(STR_HISTOGRAM));
} }
@@ -637,28 +643,31 @@ const tTemplateServiceChartTypeParameterMap& PieChartDialogController::getTempla
{"com.sun.star.chart2.template.ThreeDDonutAllExploded" , ChartTypeParameter(4,false,true)}}; {"com.sun.star.chart2.template.ThreeDDonutAllExploded" , ChartTypeParameter(4,false,true)}};
return s_aTemplateMap; return s_aTemplateMap;
} }
void PieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) std::vector<ChartTypeEntry>
PieChartDialogController::getSubTypes(const ChartTypeParameter& rParameter)
{ {
rSubTypeList.Clear(); std::vector<ChartTypeEntry> aEntries;
if( rParameter.b3DLook ) if( rParameter.b3DLook )
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_CIRCLES_3D)); aEntries.emplace_back(Image(StockImage::Yes, BMP_CIRCLES_3D));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_CIRCLES_3D_EXPLODED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_CIRCLES_3D_EXPLODED));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_DONUT_3D)); aEntries.emplace_back(Image(StockImage::Yes, BMP_DONUT_3D));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_DONUT_3D_EXPLODED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_DONUT_3D_EXPLODED));
} }
else else
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_CIRCLES_2D)); aEntries.emplace_back(Image(StockImage::Yes, BMP_CIRCLES_2D));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_CIRCLES_2D_EXPLODED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_CIRCLES_2D_EXPLODED));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_DONUT_2D)); aEntries.emplace_back(Image(StockImage::Yes, BMP_DONUT_2D));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_DONUT_2D_EXPLODED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_DONUT_2D_EXPLODED));
} }
rSubTypeList.SetItemText( 1, SchResId( STR_NORMAL ) ); aEntries.at(0).sName = SchResId(STR_NORMAL);
rSubTypeList.SetItemText( 2, SchResId( STR_PIE_EXPLODED ) ); aEntries.at(1).sName = SchResId(STR_PIE_EXPLODED);
rSubTypeList.SetItemText( 3, SchResId( STR_DONUT ) ); aEntries.at(2).sName = SchResId(STR_DONUT);
rSubTypeList.SetItemText( 4, SchResId( STR_DONUT_EXPLODED ) ); aEntries.at(3).sName = SchResId(STR_DONUT_EXPLODED);
return aEntries;
} }
bool PieChartDialogController::shouldShow_3DLookControl() const bool PieChartDialogController::shouldShow_3DLookControl() const
@@ -701,14 +710,12 @@ const tTemplateServiceChartTypeParameterMap& OfPieChartDialogController::getTemp
{"com.sun.star.chart2.template.PieOfPie" , ChartTypeParameter(2,false,false)}}; {"com.sun.star.chart2.template.PieOfPie" , ChartTypeParameter(2,false,false)}};
return s_aTemplateMap; return s_aTemplateMap;
} }
void OfPieChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ )
{
rSubTypeList.Clear();
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BAR_OF_PIE)); std::vector<ChartTypeEntry>
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_PIE_OF_PIE)); OfPieChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/)
rSubTypeList.SetItemText( 1, SchResId( STR_BAR_OF_PIE ) ); {
rSubTypeList.SetItemText( 2, SchResId( STR_PIE_OF_PIE ) ); return { { Image(StockImage::Yes, BMP_BAR_OF_PIE), SchResId(STR_BAR_OF_PIE) },
{ Image(StockImage::Yes, BMP_PIE_OF_PIE), SchResId(STR_PIE_OF_PIE) } };
} }
bool OfPieChartDialogController::shouldShow_3DLookControl() const bool OfPieChartDialogController::shouldShow_3DLookControl() const
@@ -861,9 +868,11 @@ const tTemplateServiceChartTypeParameterMap& LineChartDialogController::getTempl
{"com.sun.star.chart2.template.ThreeDLineDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z,false,true)}}; {"com.sun.star.chart2.template.ThreeDLineDeep" , ChartTypeParameter(4,false,true,GlobalStackMode_STACK_Z,false,true)}};
return s_aTemplateMap; return s_aTemplateMap;
} }
void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter )
std::vector<ChartTypeEntry>
LineChartDialogController::getSubTypes(const ChartTypeParameter& rParameter)
{ {
rSubTypeList.Clear(); std::vector<ChartTypeEntry> aEntries;
switch( rParameter.eCurveStyle ) switch( rParameter.eCurveStyle )
{ {
@@ -871,17 +880,17 @@ void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C
case CurveStyle_B_SPLINES: case CurveStyle_B_SPLINES:
if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z ) if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z )
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XCATEGORY)); aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XCATEGORY));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_SMOOTH)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_SMOOTH));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_SMOOTH)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_SMOOTH));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_SMOOTH)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_SMOOTH));
} }
else else
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_STACKED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_STACKED));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_STACKED_SMOOTH)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_STACKED_SMOOTH));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_STACKED_SMOOTH)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_STACKED_SMOOTH));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_STACKED_SMOOTH)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_STACKED_SMOOTH));
} }
break; break;
case CurveStyle_STEP_START: case CurveStyle_STEP_START:
@@ -890,42 +899,45 @@ void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C
case CurveStyle_STEP_CENTER_Y: case CurveStyle_STEP_CENTER_Y:
if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z ) if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z )
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XCATEGORY)); aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XCATEGORY));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_STEPPED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XCATEGORY_STEPPED));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_STEPPED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XCATEGORY_STEPPED));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_STEPPED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XCATEGORY_STEPPED));
} }
else else
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_STACKED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_STACKED));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_STACKED_STEPPED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_STACKED_STEPPED));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_STACKED_STEPPED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_STACKED_STEPPED));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_STACKED_STEPPED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_STACKED_STEPPED));
} }
break; break;
default: // includes CurveStyle_LINES default: // includes CurveStyle_LINES
//direct lines //direct lines
if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z ) if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z )
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XCATEGORY)); aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XCATEGORY));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XCATEGORY)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XCATEGORY));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XCATEGORY)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XCATEGORY));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XCATEGORY)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XCATEGORY));
} }
else else
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_STACKED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_STACKED));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_STACKED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_STACKED));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_STACKED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_STACKED));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_STACKED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_STACKED));
} }
} }
rSubTypeList.SetItemText( 1, SchResId( STR_POINTS_ONLY ) ); aEntries.at(0).sName = SchResId(STR_POINTS_ONLY);
rSubTypeList.SetItemText( 2, SchResId( STR_POINTS_AND_LINES ) ); aEntries.at(1).sName = SchResId(STR_POINTS_AND_LINES);
rSubTypeList.SetItemText( 3, SchResId( STR_LINES_ONLY ) ); aEntries.at(2).sName = SchResId(STR_LINES_ONLY);
rSubTypeList.SetItemText( 4, SchResId( STR_LINES_3D ) ); aEntries.at(3).sName = SchResId(STR_LINES_3D);
return aEntries;
} }
bool LineChartDialogController::shouldShow_StackingControl() const bool LineChartDialogController::shouldShow_StackingControl() const
{ {
return true; return true;
@@ -1001,19 +1013,20 @@ const tTemplateServiceChartTypeParameterMap& XYChartDialogController::getTemplat
return s_aTemplateMap; return s_aTemplateMap;
} }
void XYChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) std::vector<ChartTypeEntry>
XYChartDialogController::getSubTypes(const ChartTypeParameter& rParameter)
{ {
rSubTypeList.Clear(); std::vector<ChartTypeEntry> aEntries;
switch (rParameter.eCurveStyle) switch (rParameter.eCurveStyle)
{ {
case CurveStyle_CUBIC_SPLINES: case CurveStyle_CUBIC_SPLINES:
case CurveStyle_B_SPLINES: case CurveStyle_B_SPLINES:
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XVALUES)); aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XVALUES));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XVALUES_SMOOTH)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XVALUES_SMOOTH));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XVALUES_SMOOTH)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XVALUES_SMOOTH));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XVALUES_SMOOTH)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XVALUES_SMOOTH));
break; break;
} }
case CurveStyle_STEP_START: case CurveStyle_STEP_START:
@@ -1021,24 +1034,27 @@ void XYChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Cha
case CurveStyle_STEP_CENTER_X: case CurveStyle_STEP_CENTER_X:
case CurveStyle_STEP_CENTER_Y: case CurveStyle_STEP_CENTER_Y:
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XVALUES)); aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XVALUES));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XVALUES_STEPPED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XVALUES_STEPPED));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XVALUES_STEPPED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XVALUES_STEPPED));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XVALUES_STEPPED)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XVALUES_STEPPED));
break; break;
} }
default: // includes CurveStyle_LINES default: // includes CurveStyle_LINES
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_POINTS_XVALUES)); aEntries.emplace_back(Image(StockImage::Yes, BMP_POINTS_XVALUES));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_LINE_P_XVALUES)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_P_XVALUES));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_LINE_O_XVALUES)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE_O_XVALUES));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_LINE3D_XVALUES)); aEntries.emplace_back(Image(StockImage::Yes, BMP_LINE3D_XVALUES));
} }
rSubTypeList.SetItemText( 1, SchResId( STR_POINTS_ONLY ) ); aEntries.at(0).sName = SchResId(STR_POINTS_ONLY);
rSubTypeList.SetItemText( 2, SchResId( STR_POINTS_AND_LINES ) ); aEntries.at(1).sName = SchResId(STR_POINTS_AND_LINES);
rSubTypeList.SetItemText( 3, SchResId( STR_LINES_ONLY ) ); aEntries.at(2).sName = SchResId(STR_LINES_ONLY);
rSubTypeList.SetItemText( 4, SchResId( STR_LINES_3D ) ); aEntries.at(3).sName = SchResId(STR_LINES_3D);
return aEntries;
} }
bool XYChartDialogController::shouldShow_SplineControl() const bool XYChartDialogController::shouldShow_SplineControl() const
{ {
return true; return true;
@@ -1111,27 +1127,31 @@ const tTemplateServiceChartTypeParameterMap& AreaChartDialogController::getTempl
return s_aTemplateMap; return s_aTemplateMap;
} }
void AreaChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter ) std::vector<ChartTypeEntry>
AreaChartDialogController::getSubTypes(const ChartTypeParameter& rParameter)
{ {
rSubTypeList.Clear(); std::vector<ChartTypeEntry> aEntries;
if( rParameter.b3DLook ) if( rParameter.b3DLook )
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_AREAS_3D)); aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_3D));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_AREAS_3D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_3D_1));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_AREAS_3D_2)); aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_3D_2));
} }
else else
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_AREAS_2D_1)); aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_2D_1));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_AREAS_2D)); aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_2D));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_AREAS_2D_3)); aEntries.emplace_back(Image(StockImage::Yes, BMP_AREAS_2D_3));
} }
rSubTypeList.SetItemText( 1, SchResId( rParameter.b3DLook ? STR_DEEP : STR_NORMAL ) ); aEntries.at(0).sName = SchResId(rParameter.b3DLook ? STR_DEEP : STR_NORMAL);
rSubTypeList.SetItemText( 2, SchResId( STR_STACKED ) ); aEntries.at(1).sName = SchResId(STR_STACKED);
rSubTypeList.SetItemText( 3, SchResId( STR_PERCENT ) ); aEntries.at(2).sName = SchResId(STR_PERCENT);
return aEntries;
} }
void AreaChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) void AreaChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
{ {
rParameter.eCurveStyle = CurveStyle_LINES; rParameter.eCurveStyle = CurveStyle_LINES;
@@ -1207,30 +1227,35 @@ const tTemplateServiceChartTypeParameterMap& NetChartDialogController::getTempla
{"com.sun.star.chart2.template.PercentStackedFilledNet" ,ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y_PERCENT,false,false)}}; {"com.sun.star.chart2.template.PercentStackedFilledNet" ,ChartTypeParameter(4,false,false,GlobalStackMode_STACK_Y_PERCENT,false,false)}};
return s_aTemplateMap; return s_aTemplateMap;
} }
void NetChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& rParameter )
std::vector<ChartTypeEntry>
NetChartDialogController::getSubTypes(const ChartTypeParameter& rParameter)
{ {
rSubTypeList.Clear(); std::vector<ChartTypeEntry> aEntries;
if( rParameter.eStackMode == GlobalStackMode_NONE ) if( rParameter.eStackMode == GlobalStackMode_NONE )
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_NET_SYMB)); aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_SYMB));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_NET_LINESYMB)); aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_LINESYMB));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_NET)); aEntries.emplace_back(Image(StockImage::Yes, BMP_NET));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_NET_FILL)); aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_FILL));
} }
else else
{ {
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_NET_SYMB_STACK)); aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_SYMB_STACK));
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_NET_LINESYMB_STACK)); aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_LINESYMB_STACK));
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_NET_STACK)); aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_STACK));
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_NET_FILL_STACK)); aEntries.emplace_back(Image(StockImage::Yes, BMP_NET_FILL_STACK));
} }
rSubTypeList.SetItemText( 1, SchResId( STR_POINTS_ONLY ) ); aEntries.at(0).sName = SchResId(STR_POINTS_ONLY);
rSubTypeList.SetItemText( 2, SchResId( STR_POINTS_AND_LINES ) ); aEntries.at(1).sName = SchResId(STR_POINTS_AND_LINES);
rSubTypeList.SetItemText( 3, SchResId( STR_LINES_ONLY ) ); aEntries.at(2).sName = SchResId(STR_LINES_ONLY);
rSubTypeList.SetItemText( 4, SchResId( STR_FILLED ) ); aEntries.at(3).sName = SchResId(STR_FILLED);
return aEntries;
} }
void NetChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) void NetChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
{ {
rParameter.b3DLook = false; rParameter.b3DLook = false;
@@ -1286,18 +1311,13 @@ const tTemplateServiceChartTypeParameterMap& StockChartDialogController::getTemp
return s_aTemplateMap; return s_aTemplateMap;
} }
void StockChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) std::vector<ChartTypeEntry>
StockChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/)
{ {
rSubTypeList.Clear(); return { { Image(StockImage::Yes, BMP_STOCK_1), SchResId(STR_STOCK_1) },
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_STOCK_1)); { Image(StockImage::Yes, BMP_STOCK_2), SchResId(STR_STOCK_2) },
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_STOCK_2)); { Image(StockImage::Yes, BMP_STOCK_3), SchResId(STR_STOCK_3) },
rSubTypeList.InsertItem(3, Image(StockImage::Yes, BMP_STOCK_3)); { Image(StockImage::Yes, BMP_STOCK_4), SchResId(STR_STOCK_4) } };
rSubTypeList.InsertItem(4, Image(StockImage::Yes, BMP_STOCK_4));
rSubTypeList.SetItemText( 1, SchResId(STR_STOCK_1) );
rSubTypeList.SetItemText( 2, SchResId(STR_STOCK_2) );
rSubTypeList.SetItemText( 3, SchResId(STR_STOCK_3) );
rSubTypeList.SetItemText( 4, SchResId(STR_STOCK_4) );
} }
void StockChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) void StockChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
@@ -1329,14 +1349,12 @@ const tTemplateServiceChartTypeParameterMap& CombiColumnLineChartDialogControlle
return s_aTemplateMap; return s_aTemplateMap;
} }
void CombiColumnLineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) std::vector<ChartTypeEntry>
CombiColumnLineChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/)
{ {
rSubTypeList.Clear(); return { { Image(StockImage::Yes, BMP_COLUMN_LINE), SchResId(STR_LINE_COLUMN) },
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_COLUMN_LINE)); { Image(StockImage::Yes, BMP_COLUMN_LINE_STACKED),
rSubTypeList.InsertItem(2, Image(StockImage::Yes, BMP_COLUMN_LINE_STACKED)); SchResId(STR_LINE_STACKEDCOLUMN) } };
rSubTypeList.SetItemText(1, SchResId(STR_LINE_COLUMN));
rSubTypeList.SetItemText(2, SchResId(STR_LINE_STACKEDCOLUMN));
} }
void CombiColumnLineChartDialogController::showExtraControls(weld::Builder* pBuilder) void CombiColumnLineChartDialogController::showExtraControls(weld::Builder* pBuilder)
@@ -1462,12 +1480,10 @@ const tTemplateServiceChartTypeParameterMap&
return s_aTemplateMap; return s_aTemplateMap;
} }
void CorrelationCircleChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) std::vector<ChartTypeEntry>
CorrelationCircleChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/)
{ {
rSubTypeList.Clear(); return { { Image(StockImage::Yes, BMP_CORRELATION_CIRCLE), SchResId(STR_CORRELATION_CIRCLE) } };
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_CORRELATION_CIRCLE));
rSubTypeList.SetItemText(1, SchResId(STR_CORRELATION_CIRCLE));
} }
void CorrelationCircleChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) void CorrelationCircleChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
@@ -1505,12 +1521,10 @@ const tTemplateServiceChartTypeParameterMap& BubbleChartDialogController::getTem
{"com.sun.star.chart2.template.Bubble" , ChartTypeParameter(1,true)}}; {"com.sun.star.chart2.template.Bubble" , ChartTypeParameter(1,true)}};
return s_aTemplateMap; return s_aTemplateMap;
} }
void BubbleChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const ChartTypeParameter& /*rParameter*/ ) std::vector<ChartTypeEntry>
BubbleChartDialogController::getSubTypes(const ChartTypeParameter& /*rParameter*/)
{ {
rSubTypeList.Clear(); return { { Image(StockImage::Yes, BMP_BUBBLE_1), SchResId(STR_BUBBLE_1) } };
rSubTypeList.InsertItem(1, Image(StockImage::Yes, BMP_BUBBLE_1));
rSubTypeList.SetItemText( 1, SchResId(STR_BUBBLE_1) );
} }
void BubbleChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter ) void BubbleChartDialogController::adjustParameterToSubType( ChartTypeParameter& rParameter )
{ {
@@ -31,6 +31,7 @@
#include <tools/mapunit.hxx> #include <tools/mapunit.hxx>
#include <utility> #include <utility>
#include <vcl/weld/IconView.hxx>
#include <vcl/weld/ScrolledWindow.hxx> #include <vcl/weld/ScrolledWindow.hxx>
#include <vcl/weld/TreeView.hxx> #include <vcl/weld/TreeView.hxx>
#include <vcl/outdev.hxx> #include <vcl/outdev.hxx>
@@ -56,12 +57,8 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle
, m_aTimerTriggeredControllerLock( m_xChartModel ) , m_aTimerTriggeredControllerLock( m_xChartModel )
, m_xFT_ChooseType(m_xBuilder->weld_label(u"FT_CAPTION_FOR_WIZARD"_ustr)) , m_xFT_ChooseType(m_xBuilder->weld_label(u"FT_CAPTION_FOR_WIZARD"_ustr))
, m_xMainTypeList(m_xBuilder->weld_tree_view(u"charttype"_ustr)) , m_xMainTypeList(m_xBuilder->weld_tree_view(u"charttype"_ustr))
, m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window(u"subtypewin"_ustr, true))) , m_xSubTypeList(m_xBuilder->weld_icon_view(u"subtype"_ustr))
, m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, u"subtype"_ustr, *m_xSubTypeList))
{ {
Size aSize(m_xSubTypeList->GetDrawingArea()->get_ref_device().LogicToPixel(Size(150, 50), MapMode(MapUnit::MapAppFont)));
m_xSubTypeListWin->set_size_request(aSize.Width(), aSize.Height());
if (bShowDescription) if (bShowDescription)
{ {
m_xFT_ChooseType->show(); m_xFT_ChooseType->show();
@@ -74,16 +71,7 @@ ChartTypeTabPage::ChartTypeTabPage(weld::Container* pPage, weld::DialogControlle
SetPageTitle(SchResId(STR_PAGE_CHARTTYPE)); SetPageTitle(SchResId(STR_PAGE_CHARTTYPE));
m_xMainTypeList->connect_selection_changed(LINK(this, ChartTypeTabPage, SelectMainTypeHdl)); m_xMainTypeList->connect_selection_changed(LINK(this, ChartTypeTabPage, SelectMainTypeHdl));
m_xSubTypeList->SetSelectHdl( LINK( this, ChartTypeTabPage, SelectSubTypeHdl ) ); m_xSubTypeList->connect_item_activated(LINK(this, ChartTypeTabPage, ActivateSubTypeHdl));
m_xSubTypeList->SetStyle(m_xSubTypeList->GetStyle() |
WB_ITEMBORDER | WB_DOUBLEBORDER | WB_NAMEFIELD | WB_FLATVALUESET | WB_3DLOOK );
// Set number of columns in chart type selector.
// TODO: Ideally this would not be hard-coded, but determined
// programmatically based on the maximum number of chart types across all
// controllers.
m_xSubTypeList->SetColCount(4);
m_xSubTypeList->SetLineCount(1);
bool bEnableComplexChartTypes = true; bool bEnableComplexChartTypes = true;
uno::Reference< beans::XPropertySet > xProps( static_cast<cppu::OWeakObject*>(m_xChartModel.get()), uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xProps( static_cast<cppu::OWeakObject*>(m_xChartModel.get()), uno::UNO_QUERY );
@@ -149,14 +137,12 @@ ChartTypeTabPage::~ChartTypeTabPage()
m_pSplineResourceGroup.reset(); m_pSplineResourceGroup.reset();
m_pGeometryResourceGroup.reset(); m_pGeometryResourceGroup.reset();
m_pSortByXValuesResourceGroup.reset(); m_pSortByXValuesResourceGroup.reset();
m_xSubTypeListWin.reset();
m_xSubTypeList.reset();
} }
ChartTypeParameter ChartTypeTabPage::getCurrentParamter() const ChartTypeParameter ChartTypeTabPage::getCurrentParameter() const
{ {
ChartTypeParameter aParameter; ChartTypeParameter aParameter;
aParameter.nSubTypeIndex = static_cast<sal_Int32>(m_xSubTypeList->GetSelectedItemId()); aParameter.nSubTypeIndex = static_cast<sal_Int32>(m_xSubTypeList->get_selected_index() + 1);
m_pDim3DLookResourceGroup->fillParameter( aParameter ); m_pDim3DLookResourceGroup->fillParameter( aParameter );
m_pStackingResourceGroup->fillParameter( aParameter ); m_pStackingResourceGroup->fillParameter( aParameter );
m_pSplineResourceGroup->fillParameter( aParameter ); m_pSplineResourceGroup->fillParameter( aParameter );
@@ -181,7 +167,7 @@ void ChartTypeTabPage::stateChanged()
return; return;
m_nChangingCalls++; m_nChangingCalls++;
ChartTypeParameter aParameter( getCurrentParamter() ); ChartTypeParameter aParameter(getCurrentParameter());
if( m_pCurrentMainType ) if( m_pCurrentMainType )
{ {
m_pCurrentMainType->adjustParameterToSubType( aParameter ); m_pCurrentMainType->adjustParameterToSubType( aParameter );
@@ -224,22 +210,24 @@ ChartTypeDialogController* ChartTypeTabPage::getSelectedMainType()
return pTypeController; return pTypeController;
} }
IMPL_LINK_NOARG(ChartTypeTabPage, SelectSubTypeHdl, ValueSet*, void) IMPL_LINK_NOARG(ChartTypeTabPage, ActivateSubTypeHdl, const weld::TreeIter&, bool)
{ {
if( m_pCurrentMainType ) if( m_pCurrentMainType )
{ {
ChartTypeParameter aParameter( getCurrentParamter() ); ChartTypeParameter aParameter(getCurrentParameter());
m_pCurrentMainType->adjustParameterToSubType( aParameter ); m_pCurrentMainType->adjustParameterToSubType( aParameter );
fillAllControls( aParameter, false ); fillAllControls( aParameter, false );
commitToModel( aParameter ); commitToModel( aParameter );
} }
return true;
} }
IMPL_LINK_NOARG(ChartTypeTabPage, SelectMainTypeHdl, weld::ItemView&, void) { selectMainType(); } IMPL_LINK_NOARG(ChartTypeTabPage, SelectMainTypeHdl, weld::ItemView&, void) { selectMainType(); }
void ChartTypeTabPage::selectMainType() void ChartTypeTabPage::selectMainType()
{ {
ChartTypeParameter aParameter( getCurrentParamter() ); ChartTypeParameter aParameter(getCurrentParameter());
if( m_pCurrentMainType ) if( m_pCurrentMainType )
{ {
@@ -282,7 +270,7 @@ void ChartTypeTabPage::selectMainType()
void ChartTypeTabPage::showAllControls( ChartTypeDialogController& rTypeController ) void ChartTypeTabPage::showAllControls( ChartTypeDialogController& rTypeController )
{ {
m_xMainTypeList->show(); m_xMainTypeList->show();
m_xSubTypeList->Show(); m_xSubTypeList->show();
bool bShow = rTypeController.shouldShow_3DLookControl(); bool bShow = rTypeController.shouldShow_3DLookControl();
m_pDim3DLookResourceGroup->showControls( bShow ); m_pDim3DLookResourceGroup->showControls( bShow );
@@ -302,9 +290,19 @@ void ChartTypeTabPage::fillAllControls( const ChartTypeParameter& rParameter, bo
m_nChangingCalls++; m_nChangingCalls++;
if( m_pCurrentMainType && bAlsoResetSubTypeList ) if( m_pCurrentMainType && bAlsoResetSubTypeList )
{ {
m_pCurrentMainType->fillSubTypeList(*m_xSubTypeList, rParameter); m_xSubTypeList->clear();
const std::vector<ChartTypeEntry> aEntries = m_pCurrentMainType->getSubTypes(rParameter);
int nIndex = 0;
for (const ChartTypeEntry& rEntry : aEntries)
{
const Bitmap aBitmap = rEntry.aImage.GetBitmap();
m_xSubTypeList->insert(nIndex, nullptr, nullptr, &aBitmap, nullptr);
m_xSubTypeList->set_item_tooltip_text(nIndex, rEntry.sName);
m_xSubTypeList->set_item_accessible_name(nIndex, rEntry.sName);
nIndex++;
}
} }
m_xSubTypeList->SelectItem( static_cast<sal_uInt16>( rParameter.nSubTypeIndex) ); m_xSubTypeList->select(rParameter.nSubTypeIndex - 1);
m_pDim3DLookResourceGroup->fillControls( rParameter ); m_pDim3DLookResourceGroup->fillControls( rParameter );
m_pStackingResourceGroup->fillControls( rParameter ); m_pStackingResourceGroup->fillControls( rParameter );
m_pSplineResourceGroup->fillControls( rParameter ); m_pSplineResourceGroup->fillControls( rParameter );
@@ -365,7 +363,7 @@ void ChartTypeTabPage::initializePage()
if( !bFound ) if( !bFound )
{ {
m_xMainTypeList->show(); m_xMainTypeList->show();
m_xSubTypeList->Show(); m_xSubTypeList->show();
m_pDim3DLookResourceGroup->showControls( false ); m_pDim3DLookResourceGroup->showControls( false );
m_pStackingResourceGroup->showControls( false ); m_pStackingResourceGroup->showControls( false );
m_pSplineResourceGroup->showControls( false ); m_pSplineResourceGroup->showControls( false );
@@ -383,7 +381,7 @@ rtl::Reference< ChartTypeTemplate > ChartTypeTabPage::getCurrentTemplate() const
{ {
if( m_pCurrentMainType && m_xChartModel.is() ) if( m_pCurrentMainType && m_xChartModel.is() )
{ {
ChartTypeParameter aParameter( getCurrentParamter() ); ChartTypeParameter aParameter(getCurrentParameter());
m_pCurrentMainType->adjustParameterToSubType( aParameter ); m_pCurrentMainType->adjustParameterToSubType( aParameter );
rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = m_xChartModel->getTypeManager(); rtl::Reference< ::chart::ChartTypeManager > xChartTypeManager = m_xChartModel->getTypeManager();
return m_pCurrentMainType->getCurrentTemplate( aParameter, xChartTypeManager ); return m_pCurrentMainType->getCurrentTemplate( aParameter, xChartTypeManager );
@@ -30,11 +30,11 @@
namespace weld namespace weld
{ {
class CustomWeld; class CustomWeld;
class IconView;
class ItemView; class ItemView;
class TreeIter;
} }
class ValueSet;
namespace chart namespace chart
{ {
@@ -61,7 +61,7 @@ private:
ChartTypeDialogController* getSelectedMainType(); ChartTypeDialogController* getSelectedMainType();
void showAllControls( ChartTypeDialogController& rTypeController ); void showAllControls( ChartTypeDialogController& rTypeController );
void fillAllControls( const ChartTypeParameter& rParameter, bool bAlsoResetSubTypeList=true ); void fillAllControls( const ChartTypeParameter& rParameter, bool bAlsoResetSubTypeList=true );
ChartTypeParameter getCurrentParamter() const; ChartTypeParameter getCurrentParameter() const;
virtual void stateChanged() override; virtual void stateChanged() override;
@@ -69,7 +69,7 @@ private:
void selectMainType(); void selectMainType();
DECL_LINK(SelectMainTypeHdl, weld::ItemView&, void); DECL_LINK(SelectMainTypeHdl, weld::ItemView&, void);
DECL_LINK(SelectSubTypeHdl, ValueSet*, void ); DECL_LINK(ActivateSubTypeHdl, const weld::TreeIter&, bool);
std::unique_ptr<Dim3DLookResourceGroup> m_pDim3DLookResourceGroup; std::unique_ptr<Dim3DLookResourceGroup> m_pDim3DLookResourceGroup;
std::unique_ptr<StackingResourceGroup> m_pStackingResourceGroup; std::unique_ptr<StackingResourceGroup> m_pStackingResourceGroup;
@@ -88,8 +88,7 @@ private:
std::unique_ptr<weld::Label> m_xFT_ChooseType; std::unique_ptr<weld::Label> m_xFT_ChooseType;
std::unique_ptr<weld::TreeView> m_xMainTypeList; std::unique_ptr<weld::TreeView> m_xMainTypeList;
std::unique_ptr<ValueSet> m_xSubTypeList; std::unique_ptr<weld::IconView> m_xSubTypeList;
std::unique_ptr<weld::CustomWeld> m_xSubTypeListWin;
}; };
} //namespace chart } //namespace chart
@@ -29,7 +29,7 @@
#include <Diagram.hxx> #include <Diagram.hxx>
#include <unonames.hxx> #include <unonames.hxx>
#include <svtools/valueset.hxx> #include <vcl/weld/IconView.hxx>
#include <vcl/weld/ScrolledWindow.hxx> #include <vcl/weld/ScrolledWindow.hxx>
#include <comphelper/diagnose_ex.hxx> #include <comphelper/diagnose_ex.hxx>
@@ -54,20 +54,10 @@ ChartTypePanel::ChartTypePanel(weld::Widget* pParent, ::chart::ChartController*
, m_nChangingCalls(0) , m_nChangingCalls(0)
, m_aTimerTriggeredControllerLock(m_xChartModel) , m_aTimerTriggeredControllerLock(m_xChartModel)
, m_xMainTypeList(m_xBuilder->weld_combo_box(u"cmb_chartType"_ustr)) , m_xMainTypeList(m_xBuilder->weld_combo_box(u"cmb_chartType"_ustr))
, m_xSubTypeList(new ValueSet(m_xBuilder->weld_scrolled_window(u"subtypewin"_ustr, true))) , m_xSubTypeList(m_xBuilder->weld_icon_view(u"subtype"_ustr))
, m_xSubTypeListWin(new weld::CustomWeld(*m_xBuilder, u"subtype"_ustr, *m_xSubTypeList))
{ {
Size aSize(m_xSubTypeList->GetDrawingArea()->get_ref_device().LogicToPixel(
Size(120, 40), MapMode(MapUnit::MapAppFont)));
m_xSubTypeListWin->set_size_request(aSize.Width(), aSize.Height());
m_xMainTypeList->connect_changed(LINK(this, ChartTypePanel, SelectMainTypeHdl)); m_xMainTypeList->connect_changed(LINK(this, ChartTypePanel, SelectMainTypeHdl));
m_xSubTypeList->SetSelectHdl(LINK(this, ChartTypePanel, SelectSubTypeHdl)); m_xSubTypeList->connect_item_activated(LINK(this, ChartTypePanel, ActivateSubTypeHdl));
m_xSubTypeList->SetStyle(m_xSubTypeList->GetStyle() | WB_ITEMBORDER | WB_DOUBLEBORDER
| WB_NAMEFIELD | WB_FLATVALUESET | WB_3DLOOK);
m_xSubTypeList->SetColCount(4);
m_xSubTypeList->SetLineCount(1);
bool bEnableComplexChartTypes = true; bool bEnableComplexChartTypes = true;
uno::Reference<beans::XPropertySet> xProps(static_cast<cppu::OWeakObject*>(m_xChartModel.get()), uno::Reference<beans::XPropertySet> xProps(static_cast<cppu::OWeakObject*>(m_xChartModel.get()),
@@ -131,17 +121,12 @@ ChartTypePanel::~ChartTypePanel()
m_pSplineResourceGroup.reset(); m_pSplineResourceGroup.reset();
m_pGeometryResourceGroup.reset(); m_pGeometryResourceGroup.reset();
m_pSortByXValuesResourceGroup.reset(); m_pSortByXValuesResourceGroup.reset();
m_xSubTypeListWin.reset();
m_xSubTypeList.reset();
m_xSubTypeListWin.reset();
m_xSubTypeList.reset();
m_xMainTypeList.reset(); m_xMainTypeList.reset();
} }
IMPL_LINK_NOARG(ChartTypePanel, SelectMainTypeHdl, weld::ComboBox&, void) { selectMainType(); } IMPL_LINK_NOARG(ChartTypePanel, SelectMainTypeHdl, weld::ComboBox&, void) { selectMainType(); }
IMPL_LINK_NOARG(ChartTypePanel, SelectSubTypeHdl, ValueSet*, void) IMPL_LINK_NOARG(ChartTypePanel, ActivateSubTypeHdl, const weld::TreeIter&, bool)
{ {
if (m_pCurrentMainType) if (m_pCurrentMainType)
{ {
@@ -150,6 +135,8 @@ IMPL_LINK_NOARG(ChartTypePanel, SelectSubTypeHdl, ValueSet*, void)
fillAllControls(aParameter, false); fillAllControls(aParameter, false);
commitToModel(aParameter); commitToModel(aParameter);
} }
return true;
} }
void ChartTypePanel::Initialize() void ChartTypePanel::Initialize()
@@ -207,7 +194,7 @@ void ChartTypePanel::Initialize()
if (!bFound) if (!bFound)
{ {
m_xSubTypeList->Hide(); m_xSubTypeList->hide();
m_pDim3DLookResourceGroup->showControls(false); m_pDim3DLookResourceGroup->showControls(false);
m_pStackingResourceGroup->showControls(false); m_pStackingResourceGroup->showControls(false);
m_pSplineResourceGroup->showControls(false); m_pSplineResourceGroup->showControls(false);
@@ -310,7 +297,7 @@ ChartTypeDialogController* ChartTypePanel::getSelectedMainType()
void ChartTypePanel::showAllControls(ChartTypeDialogController& rTypeController) void ChartTypePanel::showAllControls(ChartTypeDialogController& rTypeController)
{ {
m_xMainTypeList->show(); m_xMainTypeList->show();
m_xSubTypeList->Show(); m_xSubTypeList->show();
bool bShow = rTypeController.shouldShow_3DLookControl(); bool bShow = rTypeController.shouldShow_3DLookControl();
m_pDim3DLookResourceGroup->showControls(bShow); m_pDim3DLookResourceGroup->showControls(bShow);
@@ -331,9 +318,19 @@ void ChartTypePanel::fillAllControls(const ChartTypeParameter& rParameter,
m_nChangingCalls++; m_nChangingCalls++;
if (m_pCurrentMainType && bAlsoResetSubTypeList) if (m_pCurrentMainType && bAlsoResetSubTypeList)
{ {
m_pCurrentMainType->fillSubTypeList(*m_xSubTypeList, rParameter); m_xSubTypeList->clear();
const std::vector<ChartTypeEntry> aEntries = m_pCurrentMainType->getSubTypes(rParameter);
int nIndex = 0;
for (const ChartTypeEntry& rEntry : aEntries)
{
const Bitmap aBitmap = rEntry.aImage.GetBitmap();
m_xSubTypeList->insert(nIndex, nullptr, nullptr, &aBitmap, nullptr);
m_xSubTypeList->set_item_tooltip_text(nIndex, rEntry.sName);
m_xSubTypeList->set_item_accessible_name(nIndex, rEntry.sName);
nIndex++;
}
} }
m_xSubTypeList->SelectItem(static_cast<sal_uInt16>(rParameter.nSubTypeIndex)); m_xSubTypeList->select(rParameter.nSubTypeIndex - 1);
m_pDim3DLookResourceGroup->fillControls(rParameter); m_pDim3DLookResourceGroup->fillControls(rParameter);
m_pStackingResourceGroup->fillControls(rParameter); m_pStackingResourceGroup->fillControls(rParameter);
m_pSplineResourceGroup->fillControls(rParameter); m_pSplineResourceGroup->fillControls(rParameter);
@@ -345,7 +342,7 @@ void ChartTypePanel::fillAllControls(const ChartTypeParameter& rParameter,
ChartTypeParameter ChartTypePanel::getCurrentParameter() const ChartTypeParameter ChartTypePanel::getCurrentParameter() const
{ {
ChartTypeParameter aParameter; ChartTypeParameter aParameter;
aParameter.nSubTypeIndex = static_cast<sal_Int32>(m_xSubTypeList->GetSelectedItemId()); aParameter.nSubTypeIndex = static_cast<sal_Int32>(m_xSubTypeList->get_selected_index() + 1);
m_pDim3DLookResourceGroup->fillParameter(aParameter); m_pDim3DLookResourceGroup->fillParameter(aParameter);
m_pStackingResourceGroup->fillParameter(aParameter); m_pStackingResourceGroup->fillParameter(aParameter);
m_pSplineResourceGroup->fillParameter(aParameter); m_pSplineResourceGroup->fillParameter(aParameter);
@@ -35,6 +35,8 @@ class XModifyListener;
namespace weld namespace weld
{ {
class CustomWeld; class CustomWeld;
class IconView;
class TreeIter;
} }
namespace chart namespace chart
@@ -85,7 +87,7 @@ private:
void selectMainType(); void selectMainType();
DECL_LINK(SelectMainTypeHdl, weld::ComboBox&, void); DECL_LINK(SelectMainTypeHdl, weld::ComboBox&, void);
DECL_LINK(SelectSubTypeHdl, ValueSet*, void); DECL_LINK(ActivateSubTypeHdl, const weld::TreeIter&, bool);
vcl::EnumContext maContext; vcl::EnumContext maContext;
@@ -112,8 +114,7 @@ private:
TimerTriggeredControllerLock m_aTimerTriggeredControllerLock; TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
std::unique_ptr<weld::ComboBox> m_xMainTypeList; std::unique_ptr<weld::ComboBox> m_xMainTypeList;
std::unique_ptr<ValueSet> m_xSubTypeList; std::unique_ptr<weld::IconView> m_xSubTypeList;
std::unique_ptr<weld::CustomWeld> m_xSubTypeListWin;
}; };
} }
} // end of namespace ::chart::sidebar } // end of namespace ::chart::sidebar
+27 -29
View File
@@ -27,6 +27,7 @@
#include "ThreeDHelper.hxx" #include "ThreeDHelper.hxx"
#include <com/sun/star/chart2/CurveStyle.hpp> #include <com/sun/star/chart2/CurveStyle.hpp>
#include <vcl/image.hxx>
#include <vcl/weld/Builder.hxx> #include <vcl/weld/Builder.hxx>
#include <vcl/weld/Label.hxx> #include <vcl/weld/Label.hxx>
#include <vcl/weld/SpinButton.hxx> #include <vcl/weld/SpinButton.hxx>
@@ -36,8 +37,6 @@ namespace com::sun::star::beans
class XPropertySet; class XPropertySet;
} }
class ValueSet;
namespace chart namespace chart
{ {
class ChartModel; class ChartModel;
@@ -88,6 +87,18 @@ public:
typedef std::map<OUString, ChartTypeParameter> tTemplateServiceChartTypeParameterMap; typedef std::map<OUString, ChartTypeParameter> tTemplateServiceChartTypeParameterMap;
struct ChartTypeEntry
{
Image aImage;
OUString sName;
ChartTypeEntry(const Image& rImage, const OUString& rName = u""_ustr)
: aImage(rImage)
, sName(rName)
{
}
};
class ChartTypeDialogController : public ChangingResource class ChartTypeDialogController : public ChangingResource
{ {
public: public:
@@ -97,7 +108,7 @@ public:
virtual OUString getName() = 0; virtual OUString getName() = 0;
virtual OUString getImage() = 0; virtual OUString getImage() = 0;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const = 0; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const = 0;
virtual void fillSubTypeList(ValueSet& rSubTypeList, const ChartTypeParameter& rParameter); virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter);
virtual bool shouldShow_3DLookControl() const; virtual bool shouldShow_3DLookControl() const;
virtual bool shouldShow_StackingControl() const; virtual bool shouldShow_StackingControl() const;
@@ -158,8 +169,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
}; };
class BarChartDialogController final : public ColumnOrBarChartDialogController_Base class BarChartDialogController final : public ColumnOrBarChartDialogController_Base
@@ -171,8 +181,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
}; };
class HistogramChartDialogController final : public ChartTypeDialogController class HistogramChartDialogController final : public ChartTypeDialogController
@@ -184,8 +193,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
}; };
@@ -198,8 +206,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
virtual bool shouldShow_3DLookControl() const override; virtual bool shouldShow_3DLookControl() const override;
@@ -214,8 +221,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
virtual bool shouldShow_3DLookControl() const override; virtual bool shouldShow_3DLookControl() const override;
@@ -246,8 +252,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
virtual void adjustParameterToMainType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToMainType(ChartTypeParameter& rParameter) override;
@@ -264,8 +269,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
virtual bool shouldShow_SplineControl() const override; virtual bool shouldShow_SplineControl() const override;
@@ -281,8 +285,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
virtual void adjustParameterToMainType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToMainType(ChartTypeParameter& rParameter) override;
@@ -298,8 +301,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
virtual bool shouldShow_StackingControl() const override; virtual bool shouldShow_StackingControl() const override;
@@ -314,8 +316,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
}; };
@@ -327,8 +328,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
virtual void showExtraControls(weld::Builder* pBuilder) override; virtual void showExtraControls(weld::Builder* pBuilder) override;
@@ -357,8 +357,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
}; };
@@ -371,8 +370,7 @@ public:
virtual OUString getName() override; virtual OUString getName() override;
virtual OUString getImage() override; virtual OUString getImage() override;
virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override; virtual const tTemplateServiceChartTypeParameterMap& getTemplateMap() const override;
virtual void fillSubTypeList(ValueSet& rSubTypeList, virtual std::vector<ChartTypeEntry> getSubTypes(const ChartTypeParameter& rParameter) override;
const ChartTypeParameter& rParameter) override;
virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override; virtual void adjustParameterToSubType(ChartTypeParameter& rParameter) override;
}; };
+2 -3
View File
@@ -1,13 +1,12 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#pragma once #pragma once
#include <algorithm> #include <algorithm>
@@ -1,8 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,13 +1,12 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#pragma once #pragma once
#include <ChartType.hxx> #include <ChartType.hxx>
@@ -1,8 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,13 +1,12 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#pragma once #pragma once
#include <ChartTypeTemplate.hxx> #include <ChartTypeTemplate.hxx>
@@ -1,8 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,13 +1,12 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#pragma once #pragma once
#include <DataInterpreter.hxx> #include <DataInterpreter.hxx>
@@ -1,8 +1,6 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -1,13 +1,12 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/* /*
* Copyright the LibreOffice contributors. * This file is part of the LibreOffice project.
*
* SPDX-License-Identifier: MPL-2.0
* *
* This Source Code Form is subject to the terms of the Mozilla Public * 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 * 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/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#pragma once #pragma once
#include <VSeriesPlotter.hxx> #include <VSeriesPlotter.hxx>
+5 -10
View File
@@ -159,7 +159,6 @@
<property name="margin-top">6</property> <property name="margin-top">6</property>
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">12</property>
<child> <child>
<object class="GtkRadioButton" id="RB_HISTOGRAM_AUTOMATIC"> <object class="GtkRadioButton" id="RB_HISTOGRAM_AUTOMATIC">
<property name="label" translatable="yes" context="sidebaraxis|RB_HISTOGRAM_AUTOMATIC">_Automatic</property> <property name="label" translatable="yes" context="sidebaraxis|RB_HISTOGRAM_AUTOMATIC">_Automatic</property>
@@ -167,13 +166,13 @@
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="active">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="RB_HISTOGRAM_BIN_WIDTH"> <object class="GtkRadioButton" id="RB_HISTOGRAM_BIN_WIDTH">
<property name="label" translatable="yes" context="sidebaraxis|RB_HISTOGRAM_BIN_WIDTH">Bin _width</property> <property name="label" translatable="yes" context="sidebaraxis|RB_HISTOGRAM_BIN_WIDTH">Bin _width</property>
@@ -188,7 +187,6 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="EDT_HISTOGRAM_BIN_WIDTH"> <object class="GtkSpinButton" id="EDT_HISTOGRAM_BIN_WIDTH">
<property name="visible">True</property> <property name="visible">True</property>
@@ -196,6 +194,7 @@
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="adjustment">adjustmentHISTOGRAM_BIN_WIDTH</property> <property name="adjustment">adjustmentHISTOGRAM_BIN_WIDTH</property>
<property name="digits">2</property> <property name="digits">2</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible"> <child internal-child="accessible">
<object class="AtkObject" id="EDT_HISTOGRAM_BIN_WIDTH-atkobject"> <object class="AtkObject" id="EDT_HISTOGRAM_BIN_WIDTH-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="sidebaraxis|EDT_HISTOGRAM_BIN_WIDTH-atkobject">Bin width</property> <property name="AtkObject::accessible-name" translatable="yes" context="sidebaraxis|EDT_HISTOGRAM_BIN_WIDTH-atkobject">Bin width</property>
@@ -208,7 +207,6 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="RB_HISTOGRAM_BIN_COUNT"> <object class="GtkRadioButton" id="RB_HISTOGRAM_BIN_COUNT">
<property name="label" translatable="yes" context="sidebaraxis|RB_HISTOGRAM_BIN_COUNT">_Number of bins</property> <property name="label" translatable="yes" context="sidebaraxis|RB_HISTOGRAM_BIN_COUNT">_Number of bins</property>
@@ -223,7 +221,6 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="MT_HISTOGRAM_BIN_COUNT"> <object class="GtkSpinButton" id="MT_HISTOGRAM_BIN_COUNT">
<property name="visible">True</property> <property name="visible">True</property>
@@ -231,6 +228,7 @@
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="adjustment">adjustmentHISTOGRAM_BIN_COUNT</property> <property name="adjustment">adjustmentHISTOGRAM_BIN_COUNT</property>
<property name="numeric">True</property> <property name="numeric">True</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible"> <child internal-child="accessible">
<object class="AtkObject" id="MT_HISTOGRAM_BIN_COUNT-atkobject"> <object class="AtkObject" id="MT_HISTOGRAM_BIN_COUNT-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="sidebaraxis|MT_HISTOGRAM_BIN_COUNT-atkobject">Number of bins</property> <property name="AtkObject::accessible-name" translatable="yes" context="sidebaraxis|MT_HISTOGRAM_BIN_COUNT-atkobject">Number of bins</property>
@@ -243,7 +241,6 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="CBX_HISTOGRAM_OVERFLOW"> <object class="GtkCheckButton" id="CBX_HISTOGRAM_OVERFLOW">
<property name="label" translatable="yes" context="sidebaraxis|CBX_HISTOGRAM_OVERFLOW">_Overflow bin</property> <property name="label" translatable="yes" context="sidebaraxis|CBX_HISTOGRAM_OVERFLOW">_Overflow bin</property>
@@ -257,7 +254,6 @@
<property name="top_attach">3</property> <property name="top_attach">3</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="EDT_HISTOGRAM_OVERFLOW"> <object class="GtkSpinButton" id="EDT_HISTOGRAM_OVERFLOW">
<property name="visible">True</property> <property name="visible">True</property>
@@ -265,6 +261,7 @@
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="adjustment">adjustmentHISTOGRAM_OVERFLOW</property> <property name="adjustment">adjustmentHISTOGRAM_OVERFLOW</property>
<property name="digits">2</property> <property name="digits">2</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible"> <child internal-child="accessible">
<object class="AtkObject" id="EDT_HISTOGRAM_OVERFLOW-atkobject"> <object class="AtkObject" id="EDT_HISTOGRAM_OVERFLOW-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="sidebaraxis|EDT_HISTOGRAM_OVERFLOW-atkobject">Overflow bin value</property> <property name="AtkObject::accessible-name" translatable="yes" context="sidebaraxis|EDT_HISTOGRAM_OVERFLOW-atkobject">Overflow bin value</property>
@@ -277,7 +274,6 @@
<property name="top_attach">3</property> <property name="top_attach">3</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="CBX_HISTOGRAM_UNDERFLOW"> <object class="GtkCheckButton" id="CBX_HISTOGRAM_UNDERFLOW">
<property name="label" translatable="yes" context="sidebaraxis|CBX_HISTOGRAM_UNDERFLOW">_Underflow bin</property> <property name="label" translatable="yes" context="sidebaraxis|CBX_HISTOGRAM_UNDERFLOW">_Underflow bin</property>
@@ -291,7 +287,6 @@
<property name="top_attach">4</property> <property name="top_attach">4</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="EDT_HISTOGRAM_UNDERFLOW"> <object class="GtkSpinButton" id="EDT_HISTOGRAM_UNDERFLOW">
<property name="visible">True</property> <property name="visible">True</property>
@@ -299,6 +294,7 @@
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="adjustment">adjustmentHISTOGRAM_UNDERFLOW</property> <property name="adjustment">adjustmentHISTOGRAM_UNDERFLOW</property>
<property name="digits">2</property> <property name="digits">2</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible"> <child internal-child="accessible">
<object class="AtkObject" id="EDT_HISTOGRAM_UNDERFLOW-atkobject"> <object class="AtkObject" id="EDT_HISTOGRAM_UNDERFLOW-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="sidebaraxis|EDT_HISTOGRAM_UNDERFLOW-atkobject">Underflow bin value</property> <property name="AtkObject::accessible-name" translatable="yes" context="sidebaraxis|EDT_HISTOGRAM_UNDERFLOW-atkobject">Underflow bin value</property>
@@ -313,7 +309,6 @@
</child> </child>
</object> </object>
</child> </child>
<child type="label"> <child type="label">
<object class="GtkLabel" id="TXT_HISTOGRAM_BINS"> <object class="GtkLabel" id="TXT_HISTOGRAM_BINS">
<property name="visible">True</property> <property name="visible">True</property>
+28 -31
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 --> <!-- Generated with glade 3.40.0 -->
<interface domain="chart"> <interface domain="chart">
<requires lib="gtk+" version="3.24"/> <requires lib="gtk+" version="3.24"/>
<object class="GtkAdjustment" id="adjustment1"> <object class="GtkAdjustment" id="adjustment1">
@@ -32,6 +32,16 @@
<column type="GdkPixbuf"/> <column type="GdkPixbuf"/>
</columns> </columns>
</object> </object>
<object class="GtkTreeStore" id="subtype_model">
<columns>
<!-- column-name pixbuf -->
<column type="GdkPixbuf"/>
<!-- column-name id -->
<column type="gchararray"/>
<!-- column-name tooltip -->
<column type="gchararray"/>
</columns>
</object>
<!-- n-columns=1 n-rows=1 --> <!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="ChartTypePanel"> <object class="GtkGrid" id="ChartTypePanel">
<property name="visible">True</property> <property name="visible">True</property>
@@ -45,36 +55,6 @@
<property name="border-width">6</property> <property name="border-width">6</property>
<property name="row-spacing">3</property> <property name="row-spacing">3</property>
<property name="column-spacing">6</property> <property name="column-spacing">6</property>
<child>
<object class="GtkScrolledWindow" id="subtypewin">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="margin-bottom">6</property>
<property name="hexpand">True</property>
<property name="hscrollbar-policy">never</property>
<property name="vscrollbar-policy">never</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkDrawingArea" id="subtype">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="hexpand">True</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
<child> <child>
<object class="GtkCheckButton" id="3dlook"> <object class="GtkCheckButton" id="3dlook">
<property name="label" translatable="yes" context="sidebartype|3dlook">_3D Look</property> <property name="label" translatable="yes" context="sidebartype|3dlook">_3D Look</property>
@@ -370,6 +350,23 @@
<property name="top-attach">4</property> <property name="top-attach">4</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkIconView" id="subtype">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="margin">6</property>
<property name="model">subtype_model</property>
<property name="columns">4</property>
<property name="pixbuf-column">0</property>
<property name="tooltip-column">2</property>
<property name="activate-on-single-click">True</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="width">2</property>
</packing>
</child>
<child> <child>
<placeholder/> <placeholder/>
</child> </child>
+71 -75
View File
@@ -34,6 +34,16 @@
<column type="gchararray"/> <column type="gchararray"/>
</columns> </columns>
</object> </object>
<object class="GtkTreeStore" id="subtype_model">
<columns>
<!-- column-name pixbuf -->
<column type="GdkPixbuf"/>
<!-- column-name id -->
<column type="gchararray"/>
<!-- column-name tooltip -->
<column type="gchararray"/>
</columns>
</object>
<object class="GtkBox" id="tp_ChartType"> <object class="GtkBox" id="tp_ChartType">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@@ -72,6 +82,58 @@
<property name="hexpand">True</property> <property name="hexpand">True</property>
<property name="vexpand">True</property> <property name="vexpand">True</property>
<property name="column-spacing">12</property> <property name="column-spacing">12</property>
<child>
<object class="GtkScrolledWindow">
<property name="can-focus">False</property>
<property name="vexpand">True</property>
<property name="hscrollbar-policy">never</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="charttype">
<property name="can-focus">True</property>
<property name="has-focus">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">
<object class="GtkTreeSelection" id="treeview-selection2"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
<child>
<object class="GtkCellRendererPixbuf" id="cellrenderertext3"/>
<attributes>
<attribute name="pixbuf">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<child>
<object class="GtkCellRendererText" id="cellrenderertext2"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="charttype-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_ChartType|extended_tip|charttype">Select a basic chart type.</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child> <child>
<!-- n-columns=1 n-rows=3 --> <!-- n-columns=1 n-rows=3 -->
<object class="GtkGrid" id="grid2"> <object class="GtkGrid" id="grid2">
@@ -81,30 +143,16 @@
<property name="vexpand">True</property> <property name="vexpand">True</property>
<property name="row-spacing">6</property> <property name="row-spacing">6</property>
<child> <child>
<object class="GtkScrolledWindow" id="subtypewin"> <object class="GtkIconView" id="subtype">
<property name="name">subtype</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="margin">6</property>
<property name="hscrollbar-policy">never</property> <property name="model">subtype_model</property>
<property name="vscrollbar-policy">never</property> <property name="columns">4</property>
<property name="shadow-type">in</property> <property name="pixbuf-column">0</property>
<child> <property name="tooltip-column">2</property>
<object class="GtkViewport"> <property name="activate-on-single-click">True</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkDrawingArea" id="subtype">
<property name="can-focus">True</property>
<property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
<property name="hexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="subtype-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_ChartType|extended_tip|subtype">Select a sub type of the basic chart type.</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object> </object>
<packing> <packing>
<property name="left-attach">0</property> <property name="left-attach">0</property>
@@ -507,58 +555,6 @@
<property name="top-attach">0</property> <property name="top-attach">0</property>
</packing> </packing>
</child> </child>
<child>
<object class="GtkScrolledWindow">
<property name="can-focus">False</property>
<property name="vexpand">True</property>
<property name="hscrollbar-policy">never</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="charttype">
<property name="can-focus">True</property>
<property name="has-focus">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">
<object class="GtkTreeSelection" id="treeview-selection2"/>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
<child>
<object class="GtkCellRendererPixbuf" id="cellrenderertext3"/>
<attributes>
<attribute name="pixbuf">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<child>
<object class="GtkCellRendererText" id="cellrenderertext2"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child internal-child="accessible">
<object class="AtkObject" id="charttype-atkobject">
<property name="AtkObject::accessible-description" translatable="yes" context="tp_ChartType|extended_tip|charttype">Select a basic chart type.</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
</object> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
+5 -10
View File
@@ -582,7 +582,6 @@
<property name="margin-top">6</property> <property name="margin-top">6</property>
<property name="row_spacing">6</property> <property name="row_spacing">6</property>
<property name="column_spacing">12</property> <property name="column_spacing">12</property>
<child> <child>
<object class="GtkRadioButton" id="RB_HISTOGRAM_AUTOMATIC"> <object class="GtkRadioButton" id="RB_HISTOGRAM_AUTOMATIC">
<property name="label" translatable="yes" context="tp_Scale|RB_HISTOGRAM_AUTOMATIC">Auto_matic</property> <property name="label" translatable="yes" context="tp_Scale|RB_HISTOGRAM_AUTOMATIC">Auto_matic</property>
@@ -590,13 +589,13 @@
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="use_underline">True</property> <property name="use_underline">True</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
<property name="active">True</property>
</object> </object>
<packing> <packing>
<property name="left_attach">0</property> <property name="left_attach">0</property>
<property name="top_attach">0</property> <property name="top_attach">0</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="RB_HISTOGRAM_BIN_WIDTH"> <object class="GtkRadioButton" id="RB_HISTOGRAM_BIN_WIDTH">
<property name="label" translatable="yes" context="tp_Scale|RB_HISTOGRAM_BIN_WIDTH">Bin _width</property> <property name="label" translatable="yes" context="tp_Scale|RB_HISTOGRAM_BIN_WIDTH">Bin _width</property>
@@ -611,7 +610,6 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="EDT_HISTOGRAM_BIN_WIDTH"> <object class="GtkSpinButton" id="EDT_HISTOGRAM_BIN_WIDTH">
<property name="visible">True</property> <property name="visible">True</property>
@@ -619,6 +617,7 @@
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="adjustment">adjustmentHISTOGRAM_BIN_WIDTH</property> <property name="adjustment">adjustmentHISTOGRAM_BIN_WIDTH</property>
<property name="digits">2</property> <property name="digits">2</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible"> <child internal-child="accessible">
<object class="AtkObject" id="EDT_HISTOGRAM_BIN_WIDTH-atkobject"> <object class="AtkObject" id="EDT_HISTOGRAM_BIN_WIDTH-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="tp_Scale|EDT_HISTOGRAM_BIN_WIDTH-atkobject">Bin width</property> <property name="AtkObject::accessible-name" translatable="yes" context="tp_Scale|EDT_HISTOGRAM_BIN_WIDTH-atkobject">Bin width</property>
@@ -631,7 +630,6 @@
<property name="top_attach">1</property> <property name="top_attach">1</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkRadioButton" id="RB_HISTOGRAM_BIN_COUNT"> <object class="GtkRadioButton" id="RB_HISTOGRAM_BIN_COUNT">
<property name="label" translatable="yes" context="tp_Scale|RB_HISTOGRAM_BIN_COUNT">_Number of bins</property> <property name="label" translatable="yes" context="tp_Scale|RB_HISTOGRAM_BIN_COUNT">_Number of bins</property>
@@ -646,7 +644,6 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="MT_HISTOGRAM_BIN_COUNT"> <object class="GtkSpinButton" id="MT_HISTOGRAM_BIN_COUNT">
<property name="visible">True</property> <property name="visible">True</property>
@@ -654,6 +651,7 @@
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="adjustment">adjustmentHISTOGRAM_BIN_COUNT</property> <property name="adjustment">adjustmentHISTOGRAM_BIN_COUNT</property>
<property name="numeric">True</property> <property name="numeric">True</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible"> <child internal-child="accessible">
<object class="AtkObject" id="MT_HISTOGRAM_BIN_COUNT-atkobject"> <object class="AtkObject" id="MT_HISTOGRAM_BIN_COUNT-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="tp_Scale|MT_HISTOGRAM_BIN_COUNT-atkobject">Number of bins</property> <property name="AtkObject::accessible-name" translatable="yes" context="tp_Scale|MT_HISTOGRAM_BIN_COUNT-atkobject">Number of bins</property>
@@ -666,7 +664,6 @@
<property name="top_attach">2</property> <property name="top_attach">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="CBX_HISTOGRAM_OVERFLOW"> <object class="GtkCheckButton" id="CBX_HISTOGRAM_OVERFLOW">
<property name="label" translatable="yes" context="tp_Scale|CBX_HISTOGRAM_OVERFLOW">_Overflow bin</property> <property name="label" translatable="yes" context="tp_Scale|CBX_HISTOGRAM_OVERFLOW">_Overflow bin</property>
@@ -680,7 +677,6 @@
<property name="top_attach">3</property> <property name="top_attach">3</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="EDT_HISTOGRAM_OVERFLOW"> <object class="GtkSpinButton" id="EDT_HISTOGRAM_OVERFLOW">
<property name="visible">True</property> <property name="visible">True</property>
@@ -688,6 +684,7 @@
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="adjustment">adjustmentHISTOGRAM_OVERFLOW</property> <property name="adjustment">adjustmentHISTOGRAM_OVERFLOW</property>
<property name="digits">2</property> <property name="digits">2</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible"> <child internal-child="accessible">
<object class="AtkObject" id="EDT_HISTOGRAM_OVERFLOW-atkobject"> <object class="AtkObject" id="EDT_HISTOGRAM_OVERFLOW-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="tp_Scale|EDT_HISTOGRAM_OVERFLOW-atkobject">Overflow bin value</property> <property name="AtkObject::accessible-name" translatable="yes" context="tp_Scale|EDT_HISTOGRAM_OVERFLOW-atkobject">Overflow bin value</property>
@@ -700,7 +697,6 @@
<property name="top_attach">3</property> <property name="top_attach">3</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkCheckButton" id="CBX_HISTOGRAM_UNDERFLOW"> <object class="GtkCheckButton" id="CBX_HISTOGRAM_UNDERFLOW">
<property name="label" translatable="yes" context="tp_Scale|CBX_HISTOGRAM_UNDERFLOW">_Underflow bin</property> <property name="label" translatable="yes" context="tp_Scale|CBX_HISTOGRAM_UNDERFLOW">_Underflow bin</property>
@@ -714,7 +710,6 @@
<property name="top_attach">4</property> <property name="top_attach">4</property>
</packing> </packing>
</child> </child>
<child> <child>
<object class="GtkSpinButton" id="EDT_HISTOGRAM_UNDERFLOW"> <object class="GtkSpinButton" id="EDT_HISTOGRAM_UNDERFLOW">
<property name="visible">True</property> <property name="visible">True</property>
@@ -722,6 +717,7 @@
<property name="width_chars">10</property> <property name="width_chars">10</property>
<property name="adjustment">adjustmentHISTOGRAM_UNDERFLOW</property> <property name="adjustment">adjustmentHISTOGRAM_UNDERFLOW</property>
<property name="digits">2</property> <property name="digits">2</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible"> <child internal-child="accessible">
<object class="AtkObject" id="EDT_HISTOGRAM_UNDERFLOW-atkobject"> <object class="AtkObject" id="EDT_HISTOGRAM_UNDERFLOW-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="tp_Scale|EDT_HISTOGRAM_UNDERFLOW-atkobject">Underflow bin value</property> <property name="AtkObject::accessible-name" translatable="yes" context="tp_Scale|EDT_HISTOGRAM_UNDERFLOW-atkobject">Underflow bin value</property>
@@ -736,7 +732,6 @@
</child> </child>
</object> </object>
</child> </child>
<child type="label"> <child type="label">
<object class="GtkLabel" id="TXT_HISTOGRAM_BINS"> <object class="GtkLabel" id="TXT_HISTOGRAM_BINS">
<property name="visible">True</property> <property name="visible">True</property>
+1 -1
View File
@@ -24,7 +24,7 @@ $(eval $(call gb_Module_add_targets,codemaker,\
endif endif
$(eval $(call gb_Module_add_check_targets,codemaker,\ $(eval $(call gb_Module_add_check_targets,codemaker,\
PythonTest_codemaker_python \ Test_codemaker \
)) ))
# vim:set noet sw=4 ts=4: # vim:set noet sw=4 ts=4:
+20
View File
@@ -0,0 +1,20 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
# Golden-file tests for both cppumaker and pythonmaker (see README.md there)
$(eval $(call gb_PythonTest_PythonTest,codemaker))
$(eval $(call gb_PythonTest_add_modules,codemaker,$(SRCDIR)/codemaker/tests,\
codemakertests \
))
$(call gb_PythonTest_get_target,codemaker): \
$(call gb_Executable_get_target,cppumaker) \
$(call gb_Executable_get_target,pythonmaker)
# vim: set noet sw=4 ts=4:
+94
View File
@@ -0,0 +1,94 @@
# Codemaker Test Suite
This directory contains the integration test suite for the UNO code generators `cppumaker` and `pythonmaker`. The suite ensures that:
- `cppumaker` correctly generates C++ headers (`.hpp` and `.hdl`), and
- `pythonmaker` correctly generates Python stub files (`.pyi`)
from the same UNO IDL definitions. It verifies the syntactic correctness of the output and protects against future regressions.
The tests are automatically executed as part of the `make check` command for the `codemaker` module. They can also be run on their own with:
```bash
make codemaker.check
```
## Testing Philosophy
The test suite follows a "Golden File" testing methodology. This is a standard and robust approach for testing compilers and code generators. The process is as follows:
1. **Source IDL:** A single comprehensive test IDL file (`tests.idl`) serves as the source of truth for all UNO constructs that the generators are expected to handle. Both tools are fed the same file.
2. **Generate Output:** During the test run, this IDL is compiled into a temporary `.rdb` file with `unoidl-write`, and each tool (`cppumaker`, `pythonmaker`) is executed to generate its output in its own temporary directory.
3. **Compare Against "Golden" Files:** The newly generated output is recursively compared against a set of manually verified, correct "golden" files:
- `expected_cppumaker_stubs/` for `cppumaker`
- `expected_pythonmaker_stubs/` for `pythonmaker`
4. **Pass/Fail:** A test passes only if the generated output is an exact match to the golden files. Any difference (missing files, extra files, or content mismatches) causes the test to fail.
This approach ensures that any change to a generator that alters its output is immediately detected.
## Directory Structure
- `tests.idl`: The master IDL file containing all test cases. This includes enums, constants, typedefs, structs (plain, inherited, and polymorphic), exceptions, interfaces, services, and singletons. It also includes edge cases like the use of keywords as identifiers. All types live in the tool-neutral module `test::codemaker::codemakertests`, so the generated paths and namespaces (e.g. `test/codemaker/codemakertests/...`) are the same for both tools.
- `expected_cppumaker_stubs/`: The "golden" `.hpp` and `.hdl` file structure that `cppumaker` is expected to generate from `tests.idl`. This is the reference standard for correctness of `cppumaker`.
- `expected_pythonmaker_stubs/`: The "golden" `.pyi` file structure that `pythonmaker` is expected to generate from `tests.idl`. This is the reference standard for correctness of `pythonmaker`.
- `codemakertests.py`: The Python script that orchestrates the tests. It is executed by the build system and, for each tool, compiles the IDL, runs the tool, and compares the output directory with the matching golden directory. It contains one test class per tool (`TestCppuMaker`, `TestPythonMaker`) sharing a common implementation.
- `README.md`: This file.
The gbuild makefile that integrates the script into `make check` is `codemaker/Test_codemaker.mk`, registered in `codemaker/Module_codemaker.mk`. It depends on both the `cppumaker` and `pythonmaker` executables.
---
## How to Modify or Extend the Test Suite
Future developers may need to modify these tests when fixing a bug or adding a new feature to either tool. Here is the standard workflow.
### Regenerating the Golden Files
Both golden directories are regenerated from `tests.idl` with the freshly built tools. Run the following from `instdir/program` (the tools need the libraries located there):
```bash
mkdir -p ../../workdir/golden_tmp
# 1. Compile the shared IDL to an .rdb
../sdk/bin/unoidl-write.exe ../../workdir/UnoApiTarget/udkapi.rdb ../../codemaker/tests/tests.idl ../../workdir/golden_tmp/tests.rdb
# 2. Clear the old golden files
rm -rf ../../codemaker/tests/expected_cppumaker_stubs ../../codemaker/tests/expected_pythonmaker_stubs
mkdir -p ../../codemaker/tests/expected_cppumaker_stubs ../../codemaker/tests/expected_pythonmaker_stubs
# 3. Generate the stubs straight into the golden directories
../sdk/bin/cppumaker.exe -O ../../codemaker/tests/expected_cppumaker_stubs ../../workdir/golden_tmp/tests.rdb -X ../../workdir/UnoApiTarget/udkapi.rdb
../sdk/bin/pythonmaker.exe -O ../../codemaker/tests/expected_pythonmaker_stubs ../../workdir/golden_tmp/tests.rdb -X ../../workdir/UnoApiTarget/udkapi.rdb
# 4. Remove leftovers (the test ignores *.tmp files of pythonmaker)
find ../../codemaker/tests/expected_pythonmaker_stubs -name '*.tmp' -delete
rm -rf ../../workdir/golden_tmp
```
(On Linux/macOS, drop the `.exe` suffix; the SDK tools are in `instdir/sdk/bin`, or in the `LibreOffice*_SDK/bin` directory of the installation.) Only one of the two tools has to be regenerated if only one is affected; the other directory is left untouched. Always review the result with `git diff` before committing.
### Scenario 1: Fixing a Bug in a Generator
If you have fixed a bug that was causing a tool to generate incorrect output, the corresponding test should now fail because the new, correct output will not match the old, incorrect golden files.
1. **Verify the Fix:** After fixing the C++ code of the tool, run `make codemaker.check` to confirm that the test fails as expected. The error output lists the differing files and shows the first difference.
2. **Regenerate the Golden Files:** Follow the steps in "Regenerating the Golden Files" above.
3. **Review the Changes:** Use `git diff` to confirm that only the intended differences appear in the golden files.
4. **Validate:**
- For `cppumaker`: ensure the new generated headers are syntactically correct and type-safe (often verified simply by checking that a full LibreOffice build succeeds with your new `cppumaker`).
- For `pythonmaker`: run `mypy --strict codemaker/tests/expected_pythonmaker_stubs/` to ensure the new golden files are syntactically correct and type-safe.
5. **Commit:** Commit the changes to the tool's C++ source code **along with** the updated golden files in your patch. The commit message should explain that the golden files were updated to reflect the bug fix.
### Scenario 2: Adding a New Feature to a Generator
If you add support for a new IDL feature (e.g., a new type or an annotation), you should add a test case for it.
1. **Add a Test Case to the IDL:**
- Open `codemaker/tests/tests.idl`.
- Add a new, simple example of the feature you've implemented. For example, add a new `interface` with a specific attribute you are now supporting.
2. **Generate and Verify the New Golden Files:**
- Since you've added a new type, new output files will be generated. Regenerate the golden files as described above. Note that the IDL is shared, so a change to `tests.idl` may also change the output of the _other_ tool; review the golden files of both tools.
- Locate the newly generated files for your new test case.
- **Manually inspect these new files** to ensure they are 100% correct (valid C++ for `cppumaker`; run `mypy --strict` on them for `pythonmaker`).
3. **Run the Full Test Suite:** Run `make codemaker.check`. The tests should now pass, as the newly generated output will match your newly added golden files.
4. **Commit:** Commit the changes to the tool's source code, the updated `tests.idl`, and the new golden files together in your patch.
+274
View File
@@ -0,0 +1,274 @@
#! /usr/bin/env python
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-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/.
#
"""Golden-file tests for the codemaker tools (cppumaker and pythonmaker).
Both tools are fed the same IDL (tests.idl). The IDL is compiled to a
temporary .rdb with unoidl-write, each tool is run on it, and the generated
output is compared byte-for-byte with the golden files stored next to this
script:
expected_cppumaker_stubs/ <- golden output of cppumaker
expected_pythonmaker_stubs/ <- golden output of pythonmaker
"""
import filecmp
import difflib
import glob
import os
import shutil
import subprocess
import unittest
from typing import TYPE_CHECKING, List, Optional, Set
HERE: str = os.path.dirname(os.path.abspath(__file__))
if TYPE_CHECKING:
# For the type checker the mixin is a TestCase (so self.fail() etc. are
# known); at run time it stays a plain mixin, so unittest does not collect
# the shared base class as a test of its own.
_MixinBase = unittest.TestCase
else:
_MixinBase = object
class CodemakerGoldenTestMixin(_MixinBase):
"""Shared logic for golden-file comparison of a codemaker tool.
Subclasses must also derive from unittest.TestCase and set:
TOOL_NAME - executable name in the SDK (without suffix)
GOLDEN_DIRNAME - directory (next to this script) with the golden files
IS_OUTPUT_FILE - predicate deciding which generated files are compared
"""
TOOL_NAME: str = ""
GOLDEN_DIRNAME: str = ""
@staticmethod
def IS_OUTPUT_FILE(name: str) -> bool: # pragma: no cover - overridden
raise NotImplementedError
def setUp(self) -> None:
# Build environment
self.srcdir: str = os.environ.get("SRCDIR", os.getcwd())
self.builddir: str = os.environ.get("BUILDDIR", os.getcwd())
self.instdir: str = os.environ.get(
"INSTDIR", os.path.join(self.builddir, "instdir")
)
self.workdir: str = os.environ.get(
"WORKDIR", os.path.join(self.builddir, "workdir")
)
# SDK tools
self.unoidl_write: Optional[str] = None
self.tool: Optional[str] = None
sdk_patterns: List[str] = [
os.path.join(self.instdir, "sdk", "bin"),
os.path.join(self.instdir, "LibreOffice*_SDK", "bin"),
]
exe_suffix: str = ".exe" if os.name == "nt" else ""
for pattern in sdk_patterns:
for sdk_dir in glob.glob(pattern):
unoidl_path = os.path.join(sdk_dir, "unoidl-write" + exe_suffix)
tool_path = os.path.join(sdk_dir, self.TOOL_NAME + exe_suffix)
if os.path.exists(unoidl_path) and os.path.exists(tool_path):
self.unoidl_write = unoidl_path
self.tool = tool_path
break
if self.unoidl_write and self.tool:
break
# Test paths
self.golden_dir: str = os.path.join(HERE, self.GOLDEN_DIRNAME)
self.idl_file: str = os.path.join(HERE, "tests.idl")
self.test_workdir: str = os.path.join(
self.workdir, self.TOOL_NAME + "_test"
)
os.makedirs(self.test_workdir, exist_ok=True)
self.types_rdb: str = os.path.join(
self.workdir, "UnoApiTarget", "udkapi.rdb"
)
self.temp_rdb: str = os.path.join(self.test_workdir, "temptest.rdb")
self.output_dir: str = os.path.join(self.test_workdir, "generated_stubs")
def tearDown(self) -> None:
if os.path.exists(self.test_workdir):
shutil.rmtree(self.test_workdir, ignore_errors=True)
# test
def test_golden_comparison(self) -> None:
self.assertIsNotNone(
self.unoidl_write, "unoidl-write or %s not found in SDK" % self.TOOL_NAME
)
self.assertIsNotNone(self.tool, "%s not found in SDK" % self.TOOL_NAME)
assert self.unoidl_write is not None
assert self.tool is not None
self.assertTrue(
os.path.exists(self.types_rdb),
"udkapi.rdb not found at: " + self.types_rdb,
)
self.assertTrue(
os.path.exists(self.idl_file),
"IDL file not found at: " + self.idl_file,
)
self._convert_idl_to_rdb()
self._generate_stubs()
self._compare_with_expected_files()
# helpers
def _run(self, cmd: List[str], what: str) -> None:
try:
subprocess.run(
cmd,
cwd=self.test_workdir,
capture_output=True,
text=True,
check=True,
)
except subprocess.CalledProcessError as e:
self.fail(
"Failed to %s:\n%s\nCommand: %s"
% (what, e.stderr or "", " ".join(cmd))
)
def _convert_idl_to_rdb(self) -> None:
assert self.unoidl_write is not None
self._run(
[self.unoidl_write, self.types_rdb, self.idl_file, self.temp_rdb],
"convert IDL to RDB",
)
self.assertTrue(
os.path.exists(self.temp_rdb),
"RDB file was not created by unoidl-write",
)
def _generate_stubs(self) -> None:
assert self.tool is not None
os.makedirs(self.output_dir, exist_ok=True)
self._run(
[self.tool, "-O", self.output_dir, self.temp_rdb, "-X", self.types_rdb],
"generate stubs with " + self.TOOL_NAME,
)
self.assertGreater(
len(self._list_files(self.output_dir)),
0,
self.TOOL_NAME + " produced no output files",
)
def _list_files(self, base: str) -> List[str]:
"""Relative paths of all relevant files below base."""
result: List[str] = []
for root, _, files in os.walk(base):
for name in files:
if self.IS_OUTPUT_FILE(name):
result.append(os.path.relpath(os.path.join(root, name), base))
return result
def _compare_with_expected_files(self) -> None:
if not os.path.exists(self.golden_dir):
self.fail("Expected directory does not exist: " + self.golden_dir)
expected_files: List[str] = self._list_files(self.golden_dir)
generated_files: List[str] = self._list_files(self.output_dir)
expected_set: Set[str] = set(expected_files)
generated_set: Set[str] = set(generated_files)
missing: Set[str] = expected_set - generated_set
extra: Set[str] = generated_set - expected_set
if missing:
self.fail(
"Missing generated files (%d):\n %s"
% (len(missing), "\n ".join(sorted(missing)))
)
if extra:
self.fail(
"Unexpected generated files (%d):\n %s"
% (len(extra), "\n ".join(sorted(extra)))
)
differences: List[str] = [
rel
for rel in sorted(expected_files)
if not filecmp.cmp(
os.path.join(self.golden_dir, rel),
os.path.join(self.output_dir, rel),
shallow=False,
)
]
if differences:
self.fail(
"File content differences found (%d):\n %s\n\n%s"
% (
len(differences),
"\n ".join(differences),
self._diff_excerpt(differences[0]),
)
)
def _diff_excerpt(self, rel_path: str, max_lines: int = 40) -> str:
"""Short unified diff of the first differing file, to ease debugging."""
def read(path: str) -> List[str]:
with open(path, encoding="utf-8", errors="replace") as f:
return f.readlines()
diff = list(
difflib.unified_diff(
read(os.path.join(self.golden_dir, rel_path)),
read(os.path.join(self.output_dir, rel_path)),
fromfile="expected/" + rel_path,
tofile="generated/" + rel_path,
)
)
text = "".join(diff[:max_lines])
if len(diff) > max_lines:
text += "... (%d more diff lines)\n" % (len(diff) - max_lines)
return "First difference:\n" + text
class TestCppuMaker(CodemakerGoldenTestMixin, unittest.TestCase):
"""cppumaker must generate exactly the golden .hpp/.hdl headers."""
TOOL_NAME = "cppumaker"
GOLDEN_DIRNAME = "expected_cppumaker_stubs"
@staticmethod
def IS_OUTPUT_FILE(name: str) -> bool:
return name.lower().endswith((".hpp", ".hdl"))
class TestPythonMaker(CodemakerGoldenTestMixin, unittest.TestCase):
"""pythonmaker must generate exactly the golden .pyi stubs."""
TOOL_NAME = "pythonmaker"
GOLDEN_DIRNAME = "expected_pythonmaker_stubs"
@staticmethod
def IS_OUTPUT_FILE(name: str) -> bool:
# pythonmaker may leave temporary files behind; ignore them
return not name.lower().endswith(".tmp")
if __name__ == "__main__":
unittest.main()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "com/sun/star/uno/Any.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Any Any;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Any.hdl"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Bool Boolean;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Boolean.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Int8 Byte;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Byte.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Unicode Char;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Char.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef double Double;
} } }
@@ -0,0 +1,9 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Double.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum2.hdl"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::test::codemaker::codemakertests::Enum2 Enum;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum.hdl"
#include "test/codemaker/codemakertests/Enum2.hpp"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,47 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#if defined LIBO_INTERNAL_ONLY
#if defined __GNUC__
enum class Enum1
{
#else
enum class SAL_DLLPUBLIC_RTTI Enum1
{
#endif
#else
enum SAL_DLLPUBLIC_RTTI Enum1
{
#endif
Enum1_VALUE_NEG = -1,
Enum1_VALUE_ZERO = 0,
Enum1_VALUE_POS = 1,
Enum1_MAKE_FIXED_SIZE = SAL_MAX_ENUM
};
#if defined LIBO_INTERNAL_ONLY
constexpr auto Enum1_VALUE_NEG = Enum1::Enum1_VALUE_NEG;
constexpr auto Enum1_VALUE_ZERO = Enum1::Enum1_VALUE_ZERO;
constexpr auto Enum1_VALUE_POS = Enum1::Enum1_VALUE_POS;
#endif
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum1 const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum1 *);
@@ -0,0 +1,27 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum1.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum1 const *) {
static typelib_TypeDescriptionReference * the_type = 0;
if ( !the_type )
{
typelib_static_enum_type_init( &the_type,
"test.codemaker.codemakertests.Enum1",
::test::codemaker::codemakertests::Enum1_VALUE_NEG );
}
return * reinterpret_cast< ::css::uno::Type * >( &the_type );
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum1 const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum1 >::get();
}
@@ -0,0 +1,51 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#if defined LIBO_INTERNAL_ONLY
#if defined __GNUC__
enum class Enum2
{
#else
enum class SAL_DLLPUBLIC_RTTI Enum2
{
#endif
#else
enum SAL_DLLPUBLIC_RTTI Enum2
{
#endif
Enum2_FLAG_NONE = 0,
Enum2_FLAG_READ = 1,
Enum2_FLAG_WRITE = 2,
Enum2_FLAG_EXEC = 4,
Enum2_FLAG_ALL = 7,
Enum2_MAKE_FIXED_SIZE = SAL_MAX_ENUM
};
#if defined LIBO_INTERNAL_ONLY
constexpr auto Enum2_FLAG_NONE = Enum2::Enum2_FLAG_NONE;
constexpr auto Enum2_FLAG_READ = Enum2::Enum2_FLAG_READ;
constexpr auto Enum2_FLAG_WRITE = Enum2::Enum2_FLAG_WRITE;
constexpr auto Enum2_FLAG_EXEC = Enum2::Enum2_FLAG_EXEC;
constexpr auto Enum2_FLAG_ALL = Enum2::Enum2_FLAG_ALL;
#endif
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum2 const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum2 *);
@@ -0,0 +1,27 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum2.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum2 const *) {
static typelib_TypeDescriptionReference * the_type = 0;
if ( !the_type )
{
typelib_static_enum_type_init( &the_type,
"test.codemaker.codemakertests.Enum2",
::test::codemaker::codemakertests::Enum2_FLAG_NONE );
}
return * reinterpret_cast< ::css::uno::Type * >( &the_type );
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum2 const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum2 >::get();
}
@@ -0,0 +1,49 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#if defined LIBO_INTERNAL_ONLY
#if defined __GNUC__
enum class Enum3
{
#else
enum class SAL_DLLPUBLIC_RTTI Enum3
{
#endif
#else
enum SAL_DLLPUBLIC_RTTI Enum3
{
#endif
Enum3_FIRST = 10,
Enum3_SECOND = 20,
Enum3_THIRD = 100,
Enum3_FOURTH = 255,
Enum3_MAKE_FIXED_SIZE = SAL_MAX_ENUM
};
#if defined LIBO_INTERNAL_ONLY
constexpr auto Enum3_FIRST = Enum3::Enum3_FIRST;
constexpr auto Enum3_SECOND = Enum3::Enum3_SECOND;
constexpr auto Enum3_THIRD = Enum3::Enum3_THIRD;
constexpr auto Enum3_FOURTH = Enum3::Enum3_FOURTH;
#endif
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum3 const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum3 *);
@@ -0,0 +1,27 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum3.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum3 const *) {
static typelib_TypeDescriptionReference * the_type = 0;
if ( !the_type )
{
typelib_static_enum_type_init( &the_type,
"test.codemaker.codemakertests.Enum3",
::test::codemaker::codemakertests::Enum3_FIRST );
}
return * reinterpret_cast< ::css::uno::Type * >( &the_type );
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum3 const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum3 >::get();
}
@@ -0,0 +1,47 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#if defined LIBO_INTERNAL_ONLY
#if defined __GNUC__
enum class Enum4
{
#else
enum class SAL_DLLPUBLIC_RTTI Enum4
{
#endif
#else
enum SAL_DLLPUBLIC_RTTI Enum4
{
#endif
Enum4_AUTO_A = 0,
Enum4_AUTO_B = 1,
Enum4_AUTO_C = 2,
Enum4_MAKE_FIXED_SIZE = SAL_MAX_ENUM
};
#if defined LIBO_INTERNAL_ONLY
constexpr auto Enum4_AUTO_A = Enum4::Enum4_AUTO_A;
constexpr auto Enum4_AUTO_B = Enum4::Enum4_AUTO_B;
constexpr auto Enum4_AUTO_C = Enum4::Enum4_AUTO_C;
#endif
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum4 const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum4 *);
@@ -0,0 +1,27 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum4.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum4 const *) {
static typelib_TypeDescriptionReference * the_type = 0;
if ( !the_type )
{
typelib_static_enum_type_init( &the_type,
"test.codemaker.codemakertests.Enum4",
::test::codemaker::codemakertests::Enum4_AUTO_A );
}
return * reinterpret_cast< ::css::uno::Type * >( &the_type );
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum4 const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum4 >::get();
}
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef float Float;
} } }
@@ -0,0 +1,9 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Float.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Int64 Hyper;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Hyper.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Int32 Long;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Long.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,32 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#ifdef _WIN32
# pragma pack(push, 8)
#endif
template< typename typeparam_if, typename typeparam_else > struct SAL_DLLPUBLIC_RTTI PolyStruct {
inline PolyStruct();
inline PolyStruct(typeparam_if const & member1_, const ::sal_Int32& member2_);
typeparam_if member1;
::sal_Int32 member2;
};
#ifdef _WIN32
# pragma pack(pop)
#endif
} } }
template< typename typeparam_if, typename typeparam_else > SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > *);
@@ -0,0 +1,80 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/PolyStruct.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "rtl/strbuf.hxx"
#include "rtl/textenc.h"
#include "rtl/ustring.hxx"
#include "sal/types.h"
#include "typelib/typeclass.h"
#include "typelib/typedescription.h"
namespace test { namespace codemaker { namespace codemakertests {
template< typename typeparam_if, typename typeparam_else > inline PolyStruct< typeparam_if, typeparam_else >::PolyStruct()
: member1()
, member2(0)
{
}
template< typename typeparam_if, typename typeparam_else > inline PolyStruct< typeparam_if, typeparam_else >::PolyStruct(typeparam_if const & member1_, const ::sal_Int32& member2_)
: member1(member1_)
, member2(member2_)
{
}
template< typename typeparam_if, typename typeparam_else >
inline PolyStruct< typeparam_if, typeparam_else >
make_PolyStruct(typeparam_if const & member1_, const ::sal_Int32& member2_)
{
return PolyStruct< typeparam_if, typeparam_else >(member1_, member2_);
}
template< typename typeparam_if, typename typeparam_else > inline bool operator==(const PolyStruct< typeparam_if, typeparam_else >& the_lhs, const PolyStruct< typeparam_if, typeparam_else >& the_rhs)
{
return the_lhs.member1 == the_rhs.member1
&& the_lhs.member2 == the_rhs.member2;
}
template< typename typeparam_if, typename typeparam_else > inline bool operator!=(const PolyStruct< typeparam_if, typeparam_else >& the_lhs, const PolyStruct< typeparam_if, typeparam_else >& the_rhs)
{
return !operator==(the_lhs, the_rhs);
}
} } }
namespace cppu {
template< typename typeparam_if, typename typeparam_else > class UnoType< ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > > {
public:
static inline ::css::uno::Type const & get() {
//TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
static ::typelib_TypeDescriptionReference * the_type = 0;
if (the_type == 0) {
::rtl::OStringBuffer the_buffer("test.codemaker.codemakertests.PolyStruct<");
the_buffer.append(::rtl::OUStringToOString(::cppu::getTypeFavourChar(static_cast< typeparam_if * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8));
the_buffer.append(',');
the_buffer.append(::rtl::OUStringToOString(::cppu::getTypeFavourChar(static_cast< typeparam_else * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8));
the_buffer.append('>');
::typelib_TypeDescriptionReference * the_members[] = {
::cppu::getTypeFavourChar(static_cast< typeparam_if * >(0)).getTypeLibType(),
::cppu::UnoType< ::sal_Int32 >::get().getTypeLibType() };
static ::sal_Bool const the_parameterizedTypes[] = { true, false };
::typelib_static_struct_type_init(&the_type, the_buffer.getStr(), 0, 2, the_members, the_parameterizedTypes);
}
return *reinterpret_cast< ::css::uno::Type * >(&the_type);
}
private:
UnoType(UnoType &); // not defined
~UnoType(); // not defined
void operator =(UnoType); // not defined
};
}
template< typename typeparam_if, typename typeparam_else > SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > >::get();
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
#pragma once
#include "sal/config.h"
#include <cassert>
#include "com/sun/star/uno/DeploymentException.hpp"
#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "test/codemaker/codemakertests/XTest.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "cppu/unotype.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#if defined ANDROID || defined IOS //TODO
#include <com/sun/star/lang/XInitialization.hpp>
#include <osl/detail/component-defines.h>
#endif
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2
extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &);
#endif
namespace test { namespace codemaker { namespace codemakertests {
class S2 {
public:
static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > create(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) {
assert(the_context.is());
::css::uno::Reference< ::test::codemaker::codemakertests::XTest > the_instance;
try {
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2
the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY);
#else
the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(the_context->getServiceManager()->createInstanceWithContext( "test.codemaker.codemakertests.S2", the_context), ::css::uno::UNO_QUERY);
#endif
} catch (const ::css::uno::RuntimeException &) {
throw;
} catch (const ::css::uno::Exception & the_exception) {
throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S2" + " of type " + "test.codemaker.codemakertests.XTest" + ": " + the_exception.Message, the_context);
}
if (!the_instance.is()) {
throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S2" + " of type " + "test.codemaker.codemakertests.XTest", the_context);
}
return the_instance;
}
private:
S2(); // not implemented
S2(S2 &); // not implemented
~S2(); // not implemented
void operator =(S2); // not implemented
};
} } }
@@ -0,0 +1,50 @@
#pragma once
#include "sal/config.h"
#include <cassert>
#include "com/sun/star/uno/DeploymentException.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "test/codemaker/codemakertests/XTest.hpp"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Reference.hxx"
#include "cppu/unotype.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#if defined ANDROID || defined IOS //TODO
#include <com/sun/star/lang/XInitialization.hpp>
#include <osl/detail/component-defines.h>
#endif
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4
extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &);
#endif
namespace test { namespace codemaker { namespace codemakertests {
class S4 {
public:
static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) {
assert(the_context.is());
::css::uno::Reference< ::test::codemaker::codemakertests::XTest > instance;
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4
instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY);
#else
the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.S4" )) >>= instance;
#endif
if (!instance.is()) {
throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.S4 of type test.codemaker.codemakertests.XTest" ), the_context);
}
return instance;
}
private:
S4(); // not implemented
S4(S4 &); // not implemented
~S4(); // not implemented
void operator =(S4); // not implemented
};
} } }
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Any.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::css::uno::Any > SequenceAny;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceAny.hdl"
#include "test/codemaker/codemakertests/Any.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Boolean.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Bool > SequenceBoolean;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceBoolean.hdl"
#include "test/codemaker/codemakertests/Boolean.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Byte.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Int8 > SequenceByte;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceByte.hdl"
#include "test/codemaker/codemakertests/Byte.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Char.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Unicode > SequenceChar;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceChar.hdl"
#include "test/codemaker/codemakertests/Char.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Double.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< double > SequenceDouble;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceDouble.hdl"
#include "test/codemaker/codemakertests/Double.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > SequenceEnum;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceEnum.hdl"
#include "test/codemaker/codemakertests/Enum.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Float.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< float > SequenceFloat;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceFloat.hdl"
#include "test/codemaker/codemakertests/Float.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Hyper.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Int64 > SequenceHyper;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceHyper.hdl"
#include "test/codemaker/codemakertests/Hyper.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Long.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Int32 > SequenceLong;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceLong.hdl"
#include "test/codemaker/codemakertests/Long.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Short.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Int16 > SequenceShort;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceShort.hdl"
#include "test/codemaker/codemakertests/Short.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/String.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::rtl::OUString > SequenceString;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceString.hdl"
#include "test/codemaker/codemakertests/String.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Struct.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > SequenceStruct;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceStruct.hdl"
#include "test/codemaker/codemakertests/Struct.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Type.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::css::uno::Type > SequenceType;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceType.hdl"
#include "test/codemaker/codemakertests/Type.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/UnsignedHyper.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_uInt64 > SequenceUnsignedHyper;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceUnsignedHyper.hdl"
#include "test/codemaker/codemakertests/UnsignedHyper.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/UnsignedLong.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_uInt32 > SequenceUnsignedLong;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceUnsignedLong.hdl"
#include "test/codemaker/codemakertests/UnsignedLong.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/UnsignedShort.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_uInt16 > SequenceUnsignedShort;
} } }

Some files were not shown because too many files have changed in this diff Show More