20 #include <svx/svxids.hrc>
22 #include <com/sun/star/frame/XModel.hpp>
24 #include <osl/diagnose.h>
26 #include <drawdoc.hxx>
36 :
FmFormModel(&rDoc.GetAttrPool(), rDoc.GetDocShell())
50 const sal_uInt16 aWhichRanges[] =
58 sal_uInt16 nEdtWhich, nSlotId;
60 for(
const sal_uInt16* pRangeArr = aWhichRanges;
61 *pRangeArr; pRangeArr += 2 )
62 for( sal_uInt16 nW = *pRangeArr, nEnd = *(pRangeArr+1);
65 0 != (nSlotId = rDocPool.
GetSlotId( nW ) ) &&
67 0 != (nEdtWhich = pSdrPool->GetWhich( nSlotId )) &&
68 nSlotId != nEdtWhich )
70 std::unique_ptr<SfxPoolItem> pCpy(pItem->
Clone());
72 pSdrPool->SetPoolDefaultItem( *pCpy );
85 Broadcast(
SdrHint(SdrHintKind::ModelCleared));
100 pPage->SetName(
"Controls");
111 uno::Reference< uno::XInterface >
xModel;
115 if (
GetDoc().GetDocShell() )
120 catch( uno::RuntimeException& )
122 OSL_FAIL(
"<SwDrawModel::createUnoModel()> - could *not* retrieve model at <SwDocShell>" );
css::uno::Reference< css::embed::XStorage > GetDocStorage()
SwDocShell * GetDocShell()
virtual SfxPoolItem * Clone(SfxItemPool *pPool=nullptr) const =0
const SfxPoolItem * GetPoolDefaultItem(sal_uInt16 nWhich) const
void SetForbiddenCharsTable(const std::shared_ptr< SvxForbiddenCharactersTable > &xForbiddenChars)
virtual rtl::Reference< SdrPage > AllocPage(bool bMasterPage) override
Create a new page (SdPage) and return a pointer to it back.
css::uno::Reference< css::frame::XModel3 > GetModel() const
virtual CharCompressType getCharacterCompressionType() const override
Get the character compression type for Asian characters.
virtual css::uno::Reference< css::uno::XInterface > createUnoModel() override
override of is needed to provide corresponding uno model.
void SetCharCompressType(CharCompressType nType)
virtual ~SwDrawModel() override
const SwDoc & GetDoc() const
XPatternListRef GetPatternList() const
constexpr sal_uInt16 RES_PARATR_BEGIN(RES_TXTATR_END)
virtual std::shared_ptr< SvxForbiddenCharactersTable > & getForbiddenCharacterTable() override
Get the forbidden character table and creates one if necessary.
void InitDrawModelAndDocShell(SwDocShell *pSwDocShell, SwDrawModel *pSwDrawDocument)
XGradientListRef GetGradientList() const
sal_uInt16 GetSlotId(sal_uInt16 nWhich) const
void PutAreaListItems(SfxItemSet &rSet) const
Put needed items for XPropertyList entries from the DrawModel.
SfxItemPool * GetSecondaryPool() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
XHatchListRef GetHatchList() const
constexpr sal_uInt16 RES_CHRATR_BEGIN(HINT_BEGIN)
void SetWhich(sal_uInt16 nId)
::sw::DocumentSettingManager & GetDocumentSettingManager()
constexpr sal_uInt16 RES_PARATR_END(82)
constexpr sal_uInt16 RES_CHRATR_END(46)
XBitmapListRef GetBitmapList() const
virtual css::uno::Reference< css::embed::XStorage > GetDocumentStorage() const override
Reference< XModel > xModel
void SetScaleUnit(MapUnit eMap)
XColorListRef GetColorList() const
void ClearModel(bool bCalledFromDestructor)
const SwAttrPool & GetAttrPool() const