20 #include <com/sun/star/table/CellAddress.hpp>
21 #include <com/sun/star/table/CellRangeAddress.hpp>
28 #include <unonames.hxx>
53 if ( rHint.
GetId() == SfxHintId::Dying )
65 bool bSuccess =
false;
109 {
u"", 0, css::uno::Type(), 0, 0 }
124 {
u"", 0, css::uno::Type(), 0, 0 }
134 throw uno::RuntimeException();
136 bool bSuccess =
false;
142 table::CellRangeAddress aRangeAddress;
143 if ( aValue >>= aRangeAddress )
151 table::CellAddress aCellAddress;
152 if ( aValue >>= aCellAddress )
162 sal_Int32 nIntVal = 0;
163 if ( aValue >>= nIntVal )
172 OUString sRepresentation;
173 if (aValue >>= sRepresentation)
184 OUString sRepresentation;
185 if (aValue >>= sRepresentation)
187 OUString aUIString(sRepresentation);
190 if ( aUIString[0]==
'.' )
191 aUIString = aUIString.copy( 1 );
196 sal_Int32 nColon = aUIString.lastIndexOf(
':' );
197 if ( nColon >= 0 && nColon < aUIString.getLength() - 1 &&
198 aUIString[nColon+1] ==
'.' )
199 aUIString = aUIString.replaceAt( nColon+1, 1,
u"" );
207 throw beans::UnknownPropertyException(aPropertyName);
210 throw lang::IllegalArgumentException();
216 throw uno::RuntimeException();
225 table::CellRangeAddress aRangeAddress;
227 aRet <<= aRangeAddress;
231 table::CellAddress aCellAddress;
233 aRet <<= aCellAddress;
268 aFormatStr += aSecond ;
273 throw beans::UnknownPropertyException(aPropertyName);
284 return "ScAddressConversionObj";
ScRefFlags ParseAny(const OUString &, const ScDocument &, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1)
SC_DLLPUBLIC void Format(OStringBuffer &r, ScRefFlags nFlags, const ScDocument *pDocument=nullptr, const Details &rDetails=detailsOOOa1) const
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
#define SC_UNONAME_XLA1REPR
constexpr OUStringLiteral SC_SERVICENAME_CELLADDRESS
ScAddressConversionObj(ScDocShell *pDocSh, bool bIsRange)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
static void FillApiAddress(css::table::CellAddress &rApiAddress, const ScAddress &rScAddress)
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
#define SC_UNONAME_PERSREPR
#define SC_UNONAME_REFSHEET
OUString Format(const ScDocument &rDocument, ScRefFlags nFlags=ScRefFlags::ZERO, const ScAddress::Details &rDetails=ScAddress::detailsOOOa1, bool bFullAddressNotation=false) const
Returns string with formatted cell range from aStart to aEnd, according to provided address conventio...
#define SC_UNONAME_UIREPR
css::uno::Type const & get()
constexpr OUStringLiteral SC_SERVICENAME_RANGEADDRESS
static void FillScAddress(ScAddress &rScAddress, const css::table::CellAddress &rApiAddress)
#define SC_IMPL_DUMMY_PROPERTY_LISTENER(ClassName)
void AddUnoObject(SfxListener &rObject)
void RemoveUnoObject(SfxListener &rObject)
const ScDocument & GetDocument() const
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual ~ScAddressConversionObj() override
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
static void FillApiRange(css::table::CellRangeAddress &rApiRange, const ScRange &rScRange)
SC_DLLPUBLIC ScRefFlags Parse(const OUString &, const ScDocument &, const Details &rDetails=detailsOOOa1, ExternalInfo *pExtInfo=nullptr, const css::uno::Sequence< css::sheet::ExternalLinkInfo > *pExternalLinks=nullptr, sal_Int32 *pSheetEndPos=nullptr, const OUString *pErrRef=nullptr)
bool ParseUIString(const OUString &rUIString,::formula::FormulaGrammar::AddressConvention eConv=::formula::FormulaGrammar::CONV_OOO)
static void FillScRange(ScRange &rScRange, const css::table::CellRangeAddress &rApiRange)
#define SC_UNONAME_ADDRESS