24 #include <osl/diagnose.h>
40 aB2DPolyPolygon(rB2DPolyPolygon)
46 aB2DPolyPolygon(rOther.aB2DPolyPolygon)
82 aGradient(rOther.aGradient)
88 maGraphicObject(rGraphicObject)
94 maGraphicObject(rOther.maGraphicObject)
100 const OUString& rPath,
const OUString& rReferer
104 maReferer ( rReferer ),
105 mbListDirty ( true ),
106 mbEmbedInDocument( false )
125 if( !const_cast<XPropertyList*>(
this)->
Load() )
135 if( !const_cast<XPropertyList*>(
this)->
Load() )
141 return maList[nIndex].get();
148 if( !const_cast<XPropertyList*>(
this)->
Load() )
181 assert(!
"empty XPropertyEntry not allowed in XPropertyList");
186 maList.insert(
maList.begin()+nIndex, std::move(pEntry) );
188 maList.push_back( std::move(pEntry) );
196 assert(!
"empty XPropertyEntry not allowed in XPropertyList");
201 assert(!
"trying to replace invalid entry in XPropertyList");
205 maList[nIndex] = std::move(pEntry);
212 assert(!
"trying to remove invalid entry in XPropertyList");
221 if(!rString.isEmpty())
232 std::stack<OUString> aDirs;
237 aDirs.push(
maPath.getToken(0,
';', nIndex));
243 while (!aDirs.empty())
245 OUString aPath(aDirs.top());
262 maReferer, uno::Reference < embed::XStorage >(),
272 const OUString &rURL,
const OUString &rReferer )
287 aLastDir =
maPath.getToken(0,
';', nIndex);
295 DBG_ASSERT( aLastDir.isEmpty(),
"invalid URL" );
306 uno::Reference< embed::XStorage >(),
nullptr );
310 const OUString &rURL, OUString *pOptName )
316 const OUString& rPath,
317 const OUString& rReferer )
344 OSL_FAIL(
"unknown xproperty type");
347 OSL_ASSERT( !pRet.is() || pRet->meType == aType );
354 const OUString & rURLStr )
364 pList->SetName( aURL.
getName() );
387 return OUString::createFromAscii(
i.pExt );
bool LoadFrom(const css::uno::Reference< css::embed::XStorage > &xStorage, const OUString &rURL, const OUString &rReferer)
XBitmapEntry(const GraphicObject &rGraphicObject, const OUString &rName)
static bool save(const OUString &rURL, const css::uno::Reference< css::container::XNameContainer > &xTable, const css::uno::Reference< css::embed::XStorage > &xStorage, OUString *pOptName)
const OUString & GetName() const
OUString GetDefaultExt() const
bool isValidIdx(tools::Long nIndex) const
XDashEntry(const XDash &rDash, const OUString &rName)
static bool load(const OUString &rPath, const OUString &rReferer, const css::uno::Reference< css::embed::XStorage > &xStorage, const css::uno::Reference< css::container::XNameContainer > &xTable, bool *bOptLoadedFromStorage)
XHatchEntry(const XHatch &rHatch, const OUString &rName)
void Remove(tools::Long nIndex)
XGradientEntry(const XGradient &rGradient, const OUString &rName)
bool setExtension(OUString const &rTheExtension, sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
XPropertyList(XPropertyListType t, const OUString &rPath, const OUString &rReferer)
void Replace(std::unique_ptr< XPropertyEntry > pEntry, tools::Long nIndex)
XColorEntry(const Color &rColor, const OUString &rName)
#define DBG_ASSERT(sCon, aError)
void Insert(std::unique_ptr< XPropertyEntry > pEntry, tools::Long nIndex=std::numeric_limits< tools::Long >::max())
bool Append(OUString const &rTheSegment, EncodeMechanism eMechanism=EncodeMechanism::WasEncoded, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
OUString getName(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool SaveTo(const css::uno::Reference< css::embed::XStorage > &xStorage, const OUString &rURL, OUString *pOptName)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
XPropertyEntry * Get(tools::Long nIndex) const
BitmapEx GetUiBitmap(tools::Long nIndex) const
static XPropertyListRef CreatePropertyList(XPropertyListType t, const OUString &rPath, const OUString &rReferer)
rtl::Reference< class XPropertyList > XPropertyListRef
tools::Long Count() const
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
void SetName(const OUString &rString)
XLineEndEntry(const basegfx::B2DPolyPolygon &rB2DPolyPolygon, const OUString &rName)
virtual ~XPropertyList() override
const BitmapEx & GetUiBitmap() const
INetProtocol GetProtocol() const
virtual BitmapEx CreateBitmapForUI(tools::Long nIndex)=0
tools::Long GetIndex(std::u16string_view rName) const
std::vector< std::unique_ptr< XPropertyEntry > > maList
virtual css::uno::Reference< css::container::XNameContainer > createInstance()=0
void SetUiBitmap(const BitmapEx &rUiBitmap)
OUString getExtension(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true, DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
bool removeSegment(sal_Int32 nIndex=LAST_SEGMENT, bool bIgnoreFinalSlash=true)
static XPropertyListRef CreatePropertyListFromURL(XPropertyListType t, const OUString &rUrl)