22#include <core_resource.hxx>
24#include <com/sun/star/sdb/XSingleSelectQueryComposer.hpp>
25#include <com/sun/star/sdbc/ColumnSearch.hpp>
26#include <com/sun/star/sdbc/XConnection.hpp>
27#include <com/sun/star/container/XNameAccess.hpp>
29#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
47 : GenericDialogController(pParent,
"dbaccess/ui/sortdialog.ui",
"SortDialog")
48 , m_xQueryComposer(_rxComposer)
51 , m_xLB_ORDERFIELD1(m_xBuilder->weld_combo_box(
"field1"))
52 , m_xLB_ORDERVALUE1(m_xBuilder->weld_combo_box(
"value1"))
53 , m_xLB_ORDERFIELD2(m_xBuilder->weld_combo_box(
"field2"))
54 , m_xLB_ORDERVALUE2(m_xBuilder->weld_combo_box(
"value2"))
55 , m_xLB_ORDERFIELD3(m_xBuilder->weld_combo_box(
"field3"))
56 , m_xLB_ORDERVALUE3(m_xBuilder->weld_combo_box(
"value3"))
66 OUString aSTR_NOENTRY(
DBA_RES(STR_VALUE_NONE));
69 j->append_text(aSTR_NOENTRY);
81 const OUString* pIter = aNames.getConstArray();
82 const OUString* pEnd = pIter + aNames.getLength();
84 for(;pIter != pEnd;++pIter)
87 OSL_ENSURE(
xColumn.is(),
"Column is null!");
93 if(eColumnSearch != ColumnSearch::NONE)
97 j->append_text(*pIter);
129 static constexpr OUStringLiteral sNameProperty =
u"Name";
130 static constexpr OUStringLiteral sAscendingProperty =
u"IsAscending";
133 sal_Int32 nColumns = xOrderColumns->getCount();
137 for ( sal_Int32
i = 0;
i < nColumns; ++
i )
141 OUString sColumnName;
142 bool bIsAscending(
true );
144 xColumn->getPropertyValue( sNameProperty ) >>= sColumnName;
145 xColumn->getPropertyValue( sAscendingProperty ) >>= bIsAscending;
192 OUString
sQuote = xMetaData.is() ? xMetaData->getIdentifierQuoteString() : OUString();
194 OUStringBuffer sOrder;
199 if(!sOrder.isEmpty())
205 sOrder.append(
" DESC ");
207 sOrder.append(
" ASC ");
210 return sOrder.makeStringAndClear();
std::unique_ptr< weld::ComboBox > m_xLB_ORDERFIELD3
std::unique_ptr< weld::ComboBox > m_xLB_ORDERFIELD1
weld::ComboBox * m_aColumnList[DOG_ROWS]
std::unique_ptr< weld::ComboBox > m_xLB_ORDERVALUE2
css::uno::Reference< css::sdbc::XConnection > m_xConnection
css::uno::Reference< css::container::XNameAccess > m_xColumns
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xQueryComposer
std::unique_ptr< weld::ComboBox > m_xLB_ORDERVALUE3
void impl_initializeOrderList_nothrow()
OUString GetOrderList() const
std::unique_ptr< weld::ComboBox > m_xLB_ORDERFIELD2
std::unique_ptr< weld::ComboBox > m_xLB_ORDERVALUE1
weld::ComboBox * m_aValueList[DOG_ROWS]
virtual ~DlgOrderCrit() override
virtual OUString get_active_text() const=0
virtual void set_active(int pos)=0
void set_active_text(const OUString &rStr)
#define DBG_UNHANDLED_EXCEPTION(...)
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(OApplicationController, OnClipboardChanged, TransferableDataHelper *, void)
Reference< XConnection > m_xConnection
constexpr OUStringLiteral PROPERTY_TYPE(u"Type")