39#include <rtl/character.hxx>
54 std::optional<ClientView> pView( std::in_place,
this,
pOut );
56 pView->SetHlplVisible(
false);
57 pView->SetGridVisible(
false);
58 pView->SetBordVisible(
false);
59 pView->SetPageVisible(
false);
60 pView->SetGlueVisible(
false);
62 SdPage* pSelectedPage =
nullptr;
75 if(
nullptr == pSelectedPage )
80 for (sal_uInt16
i = 0;
i < nPageCnt;
i++)
85 pSelectedPage = pPage;
88 if(
nullptr == pSelectedPage )
93 pOut->IntersectClipRegion(aVisArea);
94 pView->ShowSdrPage(pSelectedPage);
103 MapMode aMapMode = aOldMapMode;
108 pOut->SetMapMode(aMapMode);
112 pView->CompleteRedraw(
pOut, aRegion);
116 pOut->SetMapMode(aOldMapMode);
177 const sal_uInt16 nMaxEdgePixel = 90;
178 MapMode aMapMode( MapUnit::Map100thMM );
183 pVDev->SetMapMode( aMapMode );
185 const Size aPixSize( pVDev->LogicToPixel( aSize ) );
187 Fraction aFrac( nMaxEdgePixel, nMaxEdgePix );
191 pVDev->SetMapMode( aMapMode );
192 pVDev->SetOutputSize( aSize );
195 aFrac =
Fraction( nMaxEdgePixel - 1, nMaxEdgePix );
198 pVDev->SetMapMode( aMapMode );
200 std::optional<ClientView> pView( std::in_place,
this, pVDev );
202 pView->ShowSdrPage( pPage );
213 pView->SetGridSnap( pFrameView->
IsGridSnap() );
214 pView->SetBordSnap( pFrameView->
IsBordSnap() );
215 pView->SetHlplSnap( pFrameView->
IsHlplSnap() );
216 pView->SetOFrmSnap( pFrameView->
IsOFrmSnap() );
217 pView->SetOPntSnap( pFrameView->
IsOPntSnap() );
218 pView->SetOConSnap( pFrameView->
IsOConSnap() );
228 pView->SetBigOrtho( pFrameView->
IsBigOrtho() );
229 pView->SetOrtho( pFrameView->
IsOrtho() );
256 pVDev->SetMapMode(
MapMode() );
258 BitmapEx aPreview( pVDev->GetBitmapEx( aNullPt, pVDev->GetOutputSizePixel() ) );
272 const OUString aStrForDlg( rName );
281 aDesc =
SdResId( STR_WARN_PAGE_EXISTS_DRAW );
283 aDesc =
SdResId( STR_WARN_PAGE_EXISTS );
294 if( aNameDlg->Execute() ==
RET_OK )
296 aNameDlg->GetName( rName );
306 bool bCanUseNewName =
false;
311 aStrPage =
SdResId(STR_PAGE_NAME) +
" ";
314 aStrPage =
SdResId(STR_PAGE) +
" ";
316 bool bIsStandardName =
false;
320 if (rInOutPageName.startsWith(aStrPage) &&
321 rInOutPageName.getLength() > aStrPage.getLength())
323 sal_Int32 nIdx{ aStrPage.getLength() };
324 std::u16string_view sRemainder =
o3tl::getToken(rInOutPageName, 0,
' ', nIdx);
325 if (!sRemainder.empty() && sRemainder[0] >=
'0' && sRemainder[0] <=
'9')
331 while (
nIndex < sRemainder.size() &&
338 if (
nIndex >= sRemainder.size())
340 bIsStandardName =
true;
343 else if (sRemainder.size() == 1 &&
344 rtl::isAsciiLowerCase(sRemainder[0]))
347 bIsStandardName =
true;
349 else if (sRemainder.size() == 1 &&
350 rtl::isAsciiUpperCase(sRemainder[0]))
353 bIsStandardName =
true;
358 OUString sReserved(
"cdilmvx");
361 if (sReserved.indexOf(sRemainder[0]) == -1)
362 sReserved = sReserved.toAsciiUpperCase();
365 while (
nIndex < sRemainder.size() &&
366 sReserved.indexOf(sRemainder[
nIndex]) != -1)
372 if (
nIndex >= sRemainder.size())
374 bIsStandardName =
true;
379 if( bIsStandardName )
381 if( bResetStringIfStandardName )
386 rInOutPageName.clear();
387 bCanUseNewName =
true;
390 bCanUseNewName =
false;
394 if (!rInOutPageName.isEmpty())
401 bCanUseNewName =
false;
404 return bCanUseNewName;
415 rDialog.GetName( aNewName );
416 return IsNewPageNameValid( aNewName );
static OutputDevice * GetDefaultDevice()
void SetOrigin(const Point &rOrigin)
void SetScaleY(const Fraction &rScaleY)
const Point & GetOrigin() const
void SetScaleX(const Fraction &rScaleX)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
bool IsPageNameUnique(std::u16string_view rPageName) const
checks, if the given name is a unique name for an existing slide
SAL_DLLPRIVATE std::vector< std::unique_ptr< sd::FrameView > > & GetFrameViewList()
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
SAL_DLLPRIVATE sal_uInt16 GetPageByName(std::u16string_view rPgName, bool &rbIsMasterPage) const
Return the first page that has the given name.
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
bool IsNoDragXorPolys() const
bool IsDragStripes() const
bool IsMarkedHitMovesAlways() const
bool IsFrameDragSingles() const
const SdrLayerIDSet & GetVisibleLayers() const
void SetLockedLayers(const SdrLayerIDSet &rSet)
void SetVisibleLayers(const SdrLayerIDSet &rSet)
void SetPrintableLayers(const SdrLayerIDSet &rSet)
const SdrLayerIDSet & GetLockedLayers() const
const SdrLayerIDSet & GetPrintableLayers() const
void SetHelpLines(const SdrHelpLineList &rHLL)
const Size & GetGridFine() const
const Size & GetGridCoarse() const
const OUString & GetActiveLayer() const
bool IsGridVisible() const
bool IsCrookNoContortion() const
const Fraction & GetSnapGridWidthY() const
bool IsAngleSnapEnabled() const
Degree100 GetSnapAngle() const
bool IsMoveOnlyDragging() const
const Fraction & GetSnapGridWidthX() const
sal_uInt16 GetSnapMagneticPixel() const
bool IsSlantButShear() const
const tools::Rectangle & GetVisArea() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
virtual VclPtr< AbstractSvxNameDialog > CreateSvxNameDialog(weld::Window *pParent, const OUString &rName, const OUString &rDesc)=0
static SvxAbstractDialogFactory * Create()
bool IsPageNameUnique(std::u16string_view rPagName) const
checks, if the given name is a unique name for an existing slide
::sd::FrameView * GetFrameView()
bool IsNewPageNameValid(OUString &rInOutPageName, bool bResetStringIfStandardName=false)
checks, if the given name is a valid new name for a slide
bool CheckPageName(weld::Window *pWin, OUString &rName)
checks, if the given name is a valid new name for a slide
void Connect(sd::ViewShell *pViewSh)
::sd::ViewShell * mpViewShell
DocumentType GetDocumentType() const
virtual void Draw(OutputDevice *, const JobSetup &rSetup, sal_uInt16 nAspect, bool bOutputForScreen) override
Drawing of DocShell (with the helper class SdDrawViewShell)
BitmapEx GetPagePreviewBitmap(SdPage *pPage)
Creates a bitmap of an arbitrary page.
void Disconnect(sd::ViewShell const *pViewSh)
const tools::Rectangle & GetVisArea() const
SdDrawDocument * GetDoc()
sal_uInt16 GetSelectedPage() const
const SdrHelpLineList & GetStandardHelpLines() const
const SdrLayerIDSet & GetLockedLayers() const
const SdrLayerIDSet & GetVisibleLayers() const
PageKind GetPageKind() const
const SdrLayerIDSet & GetPrintableLayers() const
Base class of the stacked shell hierarchy.
const rtl::Reference< FuPoor > & GetCurrentFunction() const
FrameView * GetFrameView()
::sd::Window * GetActiveWindow() const
The active window is usually the mpContentWindow.
Point PixelToLogic(const Point &rDevicePt) const
Size GetOutputSizePixel() const
#define DBG_ASSERT(sCon, aError)
constexpr OUStringLiteral HID_SD_NAMEDIALOG_PAGE
#define LINK(Instance, Class, Member)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
IMPL_LINK(SdCharHeightPropertyBox, implMenuSelectHdl, const OUString &, rIdent, void)
OUString SdResId(TranslateId aId)