20#include <svx/svxids.hrc>
22#include <com/sun/star/frame/XModel.hpp>
24#include <osl/diagnose.h>
37 :
FmFormModel(&rDoc.GetAttrPool(), rDoc.GetDocShell())
52 const sal_uInt16 aWhichRanges[] =
60 sal_uInt16 nEdtWhich, nSlotId;
62 for(
const sal_uInt16* pRangeArr = aWhichRanges;
63 *pRangeArr; pRangeArr += 2 )
64 for( sal_uInt16 nW = *pRangeArr, nEnd = *(pRangeArr+1);
67 0 != (nSlotId = rDocPool.
GetSlotId( nW ) ) &&
69 0 != (nEdtWhich = pSdrPool->
GetWhich( nSlotId )) &&
70 nSlotId != nEdtWhich )
72 std::unique_ptr<SfxPoolItem> pCpy(pItem->
Clone());
73 pCpy->SetWhich( nEdtWhich );
87 Broadcast(
SdrHint(SdrHintKind::ModelCleared));
97 for (sal_uInt16
i=0;
i < nPageCount; ++
i)
101 for (
size_t j=0; j < nObjCount; ++j)
123 pPage->SetName(
"Controls");
134 uno::Reference< uno::XInterface >
xModel;
138 if (
GetDoc().GetDocShell() )
143 catch( uno::RuntimeException& )
145 OSL_FAIL(
"<SwDrawModel::createUnoModel()> - could *not* retrieve model at <SwDocShell>" );
XBitmapListRef GetBitmapList() const
void SetCharCompressType(CharCompressType nType)
void SetForbiddenCharsTable(const std::shared_ptr< SvxForbiddenCharactersTable > &xForbiddenChars)
XGradientListRef GetGradientList() const
XPatternListRef GetPatternList() const
void ClearModel(bool bCalledFromDestructor)
void SetScaleUnit(MapUnit eMap)
XColorListRef GetColorList() const
XHatchListRef GetHatchList() const
const SdrPage * GetPage(sal_uInt16 nPgNum) const
sal_uInt16 GetPageCount() const
SdrObject * GetObj(size_t nNum) const
size_t GetObjCount() const
SdrObjUserCall * GetUserCall() const
sal_uInt16 GetWhich(sal_uInt16 nSlot, bool bDeep=true) const
SfxItemPool * GetSecondaryPool() const
const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) const
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
void SetPoolDefaultItem(const SfxPoolItem &)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
css::uno::Reference< css::frame::XModel3 > GetModel() const
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const=0
SwDPage is Writer's draw page: derives from SdrPage, but has a reference to the Writer document via S...
css::uno::Reference< css::embed::XStorage > GetDocStorage()
const SwAttrPool & GetAttrPool() const
::sw::DocumentSettingManager & GetDocumentSettingManager()
SwDocShell * GetDocShell()
void PutAreaListItems(SfxItemSet &rSet) const
Put needed items for XPropertyList entries from the DrawModel.
virtual css::uno::Reference< css::uno::XInterface > createUnoModel() override
override of <SdrModel::createUnoModel()> is needed to provide corresponding uno model.
virtual ~SwDrawModel() override
virtual rtl::Reference< SdrPage > AllocPage(bool bMasterPage) override
Create a new page (SdPage) and return a pointer to it back.
const SwDoc & GetDoc() const
virtual css::uno::Reference< css::embed::XStorage > GetDocumentStorage() const override
virtual CharCompressType getCharacterCompressionType() const override
Get the character compression type for Asian characters.
virtual std::shared_ptr< SvxForbiddenCharactersTable > & getForbiddenCharacterTable() override
Get the forbidden character table and creates one if necessary.
void InitDrawModelAndDocShell(SwDocShell *pSwDocShell, SwDrawModel *pSwDrawDocument)
constexpr sal_uInt16 RES_CHRATR_END(46)
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
constexpr sal_uInt16 RES_PARATR_END(82)
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
Reference< XModel > xModel