22#include <com/sun/star/sdbc/SQLException.hpp>
23#include <com/sun/star/beans/XPropertySet.hpp>
24#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
25#include <com/sun/star/sheet/XSpreadsheetDocument.hpp>
26#include <com/sun/star/sheet/XSpreadsheet.hpp>
27#include <com/sun/star/sheet/XCellRangeAddressable.hpp>
28#include <com/sun/star/sheet/XDatabaseRanges.hpp>
29#include <com/sun/star/sheet/XDatabaseRange.hpp>
53 ::osl::MutexGuard aGuard(
m_aMutex );
60 Any aAny = xSheets->getByName( rName );
62 if ( !(aAny >>= xSheet) )
71 Any aVisAny = xProp->getPropertyValue(
"IsVisible");
82 xCursor->collapseToSize( 1, 1 );
83 xCursor->collapseToCurrentRegion();
85 CellRangeAddress aRangeAddr = xRange->getRangeAddress();
86 if ( aRangeAddr.StartColumn == aRangeAddr.EndColumn &&
87 aRangeAddr.StartRow == aRangeAddr.EndRow )
91 if ( xCell.is() && xCell->getType() == CellContentType_EMPTY )
101 bool bUnnamed =
false;
103 Any aAny = xRanges->getByName( rName );
105 if ( aAny >>= xRange )
108 if ( xRangeProp.is() )
112 Any aUserAny = xRangeProp->getPropertyValue(
"IsUserDefined");
114 if ( aUserAny >>= bUserDefined )
115 bUnnamed = !bUserDefined;
117 catch ( UnknownPropertyException& )
128 const Any& ,
const OUString& ,
131 ::osl::MutexGuard aGuard(
m_aMutex );
138 OUString aTable(
"TABLE");
140 bool bTableFound =
true;
141 sal_Int32
nLength = types.getLength();
146 const OUString* pIter = types.getConstArray();
147 const OUString* pEnd = pIter +
nLength;
148 for(;pIter != pEnd;++pIter)
165 throw SQLException();
168 throw SQLException();
172 sal_Int32 nSheetCount = aSheetNames.getLength();
173 for (sal_Int32 nSheet=0; nSheet<nSheetCount; nSheet++)
175 OUString
aName = aSheetNames[nSheet];
178 aRows.push_back( {
nullptr,
nullptr,
nullptr,
191 Any aRangesAny = xDocProp->getPropertyValue(
"DatabaseRanges");
193 if ( aRangesAny >>= xRanges )
196 sal_Int32 nDBCount = aDBNames.getLength();
197 for (sal_Int32 nRange=0; nRange<nDBCount; nRange++)
199 OUString
aName = aDBNames[nRange];
202 aRows.push_back( {
nullptr,
nullptr,
nullptr,
212 pResult->setRows(std::move(aRows));
ORowSetValueDecorator decorates an ORowSetValue so the value is "refcounted".
const css::uno::Reference< css::sheet::XSpreadsheetDocument > & getDoc() const
mutable::osl::Mutex m_aMutex
bool match(const sal_Unicode *pWild, const sal_Unicode *pStr, const sal_Unicode cEscape)