LibreOffice Module cui (master) 1
tppattern.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <memory>
21#include <tools/urlobj.hxx>
22#include <sfx2/dialoghelper.hxx>
23#include <svx/colorbox.hxx>
24#include <svx/dialmgr.hxx>
25#include <vcl/BitmapTools.hxx>
26#include <vcl/svapp.hxx>
27#include <vcl/weld.hxx>
28#include <svx/strings.hrc>
29
30#include <strings.hrc>
31#include <svx/xfillit0.hxx>
32#include <svx/xbtmpit.hxx>
33#include <svx/xtable.hxx>
34#include <svx/xflbmtit.hxx>
35#include <cuitabarea.hxx>
36#include <svx/svxdlg.hxx>
37#include <dialmgr.hxx>
38#include <sal/log.hxx>
39
40using namespace com::sun::star;
41
42/*************************************************************************
43|* Preview control for the display of bitmaps
44\************************************************************************/
45
47{
48private:
50 std::array<sal_uInt8,64> const * pBmpArray;
51
52public:
53 // Constructor: BitmapCtl for SvxPixelCtl
55 : pBmpArray(nullptr)
56 {
57 }
58
59 // BitmapCtl: Returns the Bitmap
61 {
62 if (!pBmpArray)
63 return BitmapEx();
65 }
66
67 void SetBmpArray( std::array<sal_uInt8,64> const & pPixel ) { pBmpArray = &pPixel; }
68 void SetPixelColor( Color aColor ) { aPixelColor = aColor; }
69 void SetBackgroundColor( Color aColor ) { aBackgroundColor = aColor; }
70};
71
73 : SvxTabPage(pPage, pController, "cui/ui/patterntabpage.ui", "PatternTabPage", rInAttrs)
74 , m_rOutAttrs(rInAttrs)
75 , m_pnPatternListState(nullptr)
76 , m_pnColorListState(nullptr)
77 , m_aXFillAttr(rInAttrs.GetPool())
78 , m_rXFSet(m_aXFillAttr.GetItemSet())
79 , m_xCtlPixel(new SvxPixelCtl(this))
80 , m_xLbColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_COLOR"),
81 [this]{ return GetDialogController()->getDialog(); }))
82 , m_xLbBackgroundColor(new ColorListBox(m_xBuilder->weld_menu_button("LB_BACKGROUND_COLOR"),
83 [this]{ return GetDialogController()->getDialog(); }))
84 , m_xPatternLB(new SvxPresetListBox(m_xBuilder->weld_scrolled_window("patternpresetlistwin", true)))
85 , m_xBtnAdd(m_xBuilder->weld_button("BTN_ADD"))
86 , m_xBtnModify(m_xBuilder->weld_button("BTN_MODIFY"))
87 , m_xCtlPixelWin(new weld::CustomWeld(*m_xBuilder, "CTL_PIXEL", *m_xCtlPixel))
88 , m_xCtlPreview(new weld::CustomWeld(*m_xBuilder, "CTL_PREVIEW", m_aCtlPreview))
89 , m_xPatternLBWin(new weld::CustomWeld(*m_xBuilder, "patternpresetlist", *m_xPatternLB))
90{
91 // size of the bitmap display
92 Size aSize = getDrawPreviewOptimalSize(m_aCtlPreview.GetDrawingArea()->get_ref_device());
93 m_xPatternLB->set_size_request(aSize.Width(), aSize.Height());
94 m_xCtlPreview->set_size_request(aSize.Width(), aSize.Height());
95
96 m_xBitmapCtl.reset(new SvxBitmapCtl);
97
98 // this page needs ExchangeSupport
99 SetExchangeSupport();
100
101 // setting the output device
102 m_rXFSet.Put( XFillStyleItem(drawing::FillStyle_BITMAP) );
103 m_rXFSet.Put( XFillBitmapItem(OUString(), Graphic()) );
104
105 m_xBtnAdd->connect_clicked( LINK( this, SvxPatternTabPage, ClickAddHdl_Impl ) );
106 m_xBtnModify->connect_clicked( LINK( this, SvxPatternTabPage, ClickModifyHdl_Impl ) );
107
108 m_xPatternLB->SetSelectHdl( LINK( this, SvxPatternTabPage, ChangePatternHdl_Impl ) );
109 m_xPatternLB->SetRenameHdl( LINK( this, SvxPatternTabPage, ClickRenameHdl_Impl ) );
110 m_xPatternLB->SetDeleteHdl( LINK( this, SvxPatternTabPage, ClickDeleteHdl_Impl ) );
111 m_xLbColor->SetSelectHdl( LINK( this, SvxPatternTabPage, ChangeColorHdl_Impl ) );
112 m_xLbBackgroundColor->SetSelectHdl( LINK( this, SvxPatternTabPage, ChangeColorHdl_Impl ) );
113
114 m_xPatternLB->SetStyle(WB_FLATVALUESET | WB_NO_DIRECTSELECT | WB_TABSTOP);
115}
116
118{
119 m_xPatternLBWin.reset();
120 m_xCtlPreview.reset();
121 m_xCtlPixelWin.reset();
122 m_xPatternLB.reset();
123 m_xLbBackgroundColor.reset();
124 m_xLbColor.reset();
125 m_xCtlPixel.reset();
126}
127
129{
130 m_xPatternLB->FillPresetListBox( *m_pPatternList );
131}
132
134{
135 if( !m_pColorList.is() )
136 return;
137
138 // ColorList
139 if( *m_pnColorListState & ChangeType::CHANGED ||
140 *m_pnColorListState & ChangeType::MODIFIED )
141 {
142 SvxAreaTabDialog* pArea = (*m_pnColorListState & ChangeType::CHANGED) ?
143 dynamic_cast<SvxAreaTabDialog*>(GetDialogController()) : nullptr;
144 if (pArea)
145 m_pColorList = pArea->GetNewColorList();
146 }
147
148 // determining (possibly cutting) the name and
149 // displaying it in the GroupBox
150 OUString aString = CuiResId( RID_CUISTR_TABLE ) + ": ";
151 INetURLObject aURL( m_pPatternList->GetPath() );
152
153 aURL.Append( m_pPatternList->GetName() );
154 SAL_WARN_IF( aURL.GetProtocol() == INetProtocol::NotValid, "cui.tabpages", "invalid URL" );
155
156 if( aURL.getBase().getLength() > 18 )
157 {
158 aString += OUString::Concat(aURL.getBase().subView( 0, 15 )) + "...";
159 }
160 else
161 aString += aURL.getBase();
162
164
165 if ( aItem.isPattern() )
166 {
167 sal_Int32 nPos = SearchPatternList( aItem.GetName() );
168 if ( nPos != -1)
169 {
170 sal_uInt16 nId = m_xPatternLB->GetItemId( static_cast<size_t>( nPos ) );
171 m_xPatternLB->SelectItem( nId );
172 }
173 }
174 else
175 m_xPatternLB->SelectItem( m_xPatternLB->GetItemId( static_cast<size_t>( 0 ) ) );
176}
177
178
180{
181 if( _pSet )
182 FillItemSet( _pSet );
183
184 return DeactivateRC::LeavePage;
185}
186
187
189{
190 _rOutAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
191 size_t nPos = m_xPatternLB->IsNoSelection() ? VALUESET_ITEM_NOTFOUND : m_xPatternLB->GetSelectItemPos();
193 {
194 const XBitmapEntry* pXBitmapEntry = m_pPatternList->GetBitmap( static_cast<sal_uInt16>(nPos) );
195 const OUString aString( m_xPatternLB->GetItemText( m_xPatternLB->GetSelectedItemId() ) );
196
197 _rOutAttrs->Put(XFillBitmapItem(aString, pXBitmapEntry->GetGraphicObject()));
198 }
199 else
200 {
201 const BitmapEx aBitmapEx(m_xBitmapCtl->GetBitmapEx());
202
203 _rOutAttrs->Put(XFillBitmapItem(OUString(), Graphic(aBitmapEx)));
204 }
205 _rOutAttrs->Put(XFillBmpTileItem(true));
206 return true;
207}
208
209
211{
212 m_xBitmapCtl->SetPixelColor( m_xLbColor->GetSelectEntryColor() );
213 m_xBitmapCtl->SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() );
214 m_xBitmapCtl->SetBmpArray( m_xCtlPixel->GetBitmapPixelPtr() );
215
216 // get bitmap and display it
217 const XFillBitmapItem aBmpItem(OUString(), Graphic(m_xBitmapCtl->GetBitmapEx()));
218 if(aBmpItem.isPattern())
219 {
220 m_rXFSet.Put( aBmpItem );
222 m_aCtlPreview.Invalidate();
223 }
224
225 ChangePatternHdl_Impl(m_xPatternLB.get());
226
227 // determine button state
228 if( m_pPatternList.is() && m_pPatternList->Count() )
229 {
230 m_xBtnAdd->set_sensitive(true);
231 m_xBtnModify->set_sensitive(true);
232 }
233 else
234 {
235 m_xBtnModify->set_sensitive(false);
236 }
237}
238
239std::unique_ptr<SfxTabPage> SvxPatternTabPage::Create( weld::Container* pPage, weld::DialogController* pController,
240 const SfxItemSet* rSet )
241{
242 return std::make_unique<SvxPatternTabPage>(pPage, pController, *rSet);
243}
244
245IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, ValueSet*, void)
246{
247 std::unique_ptr<GraphicObject> pGraphicObject;
248 size_t nPos = m_xPatternLB->GetSelectItemPos();
249
251 {
252 pGraphicObject.reset(new GraphicObject(m_pPatternList->GetBitmap( static_cast<sal_uInt16>(nPos) )->GetGraphicObject()));
253 }
254 else
255 {
256 if(const XFillStyleItem* pFillStyleItem = m_rOutAttrs.GetItemIfSet(GetWhich(XATTR_FILLSTYLE)))
257 {
258 const drawing::FillStyle eXFS(pFillStyleItem->GetValue());
259
260 const XFillBitmapItem* pBitmapItem;
261 if((drawing::FillStyle_BITMAP == eXFS) && (pBitmapItem = m_rOutAttrs.GetItemIfSet(GetWhich(XATTR_FILLBITMAP))))
262 {
263 pGraphicObject.reset(new GraphicObject(pBitmapItem->GetGraphicObject()));
264 }
265 }
266
267 if(!pGraphicObject)
268 {
269 sal_uInt16 nPosition = m_xPatternLB->GetItemId( 0 );
270 m_xPatternLB->SelectItem( nPosition );
271 if( nPosition != 0 )
272 {
273 pGraphicObject.reset(new GraphicObject(m_pPatternList->GetBitmap(0)->GetGraphicObject()));
274 }
275 }
276 }
277
278 if(!pGraphicObject)
279 return;
280
281 Color aBackColor;
282 Color aPixelColor;
283 bool bIs8x8(vcl::bitmap::isHistorical8x8(pGraphicObject->GetGraphic().GetBitmapEx(), aBackColor, aPixelColor));
284
285 m_xLbColor->SetNoSelection();
286 m_xLbBackgroundColor->SetNoSelection();
287
288 if(bIs8x8)
289 {
290 m_xCtlPixel->SetPaintable( true );
291 m_xBtnModify->set_sensitive(true);
292 m_xBtnAdd->set_sensitive(true);
293
294 // setting the pixel control
295
296 m_xCtlPixel->SetXBitmap(pGraphicObject->GetGraphic().GetBitmapEx());
297
298 m_xLbColor->SelectEntry( aPixelColor );
299 m_xLbBackgroundColor->SelectEntry( aBackColor );
300
301 // update m_xBitmapCtl, rXFSet and m_aCtlPreview
302 m_xBitmapCtl->SetPixelColor( aPixelColor );
303 m_xBitmapCtl->SetBackgroundColor( aBackColor );
304 m_rXFSet.ClearItem();
305 m_rXFSet.Put(XFillStyleItem(drawing::FillStyle_BITMAP));
306 m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmapEx())));
307 m_aCtlPreview.SetAttributes( m_aXFillAttr.GetItemSet() );
308 m_aCtlPreview.Invalidate();
309 }
310 else
311 {
312 m_xCtlPixel->Reset();
313 m_xCtlPixel->SetPaintable( false );
314 m_xBtnModify->set_sensitive(false);
315 m_xBtnAdd->set_sensitive(false);
316 }
317
318 m_xCtlPixel->Invalidate();
319}
320
322{
323
324 OUString aNewName( SvxResId( RID_SVXSTR_PATTERN_UNTITLED ) );
325 OUString aDesc( CuiResId( RID_CUISTR_DESC_NEW_PATTERN ) );
326 OUString aName;
327
328 tools::Long nCount = m_pPatternList->Count();
329 tools::Long j = 1;
330 bool bValidPatternName = false;
331
332 while( !bValidPatternName )
333 {
334 aName = aNewName + " " + OUString::number( j++ );
335 bValidPatternName = (SearchPatternList(aName) == -1);
336 }
337
340 sal_uInt16 nError(1);
341
342 while( pDlg->Execute() == RET_OK )
343 {
344 pDlg->GetName( aName );
345
346 bValidPatternName = (SearchPatternList(aName) == -1);
347
348 if( bValidPatternName ) {
349 nError = 0;
350 break;
351 }
352
353 std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
354 std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
355 if (xWarnBox->run() != RET_OK)
356 break;
357 }
358
359 pDlg.disposeAndClear();
360
361 if( !nError )
362 {
363 std::unique_ptr<XBitmapEntry> pEntry;
364 if( m_xCtlPixel->IsEnabled() )
365 {
366 const BitmapEx aBitmapEx(m_xBitmapCtl->GetBitmapEx());
367
368 pEntry.reset(new XBitmapEntry(Graphic(aBitmapEx), aName));
369 }
370 else // it must be a not existing imported bitmap
371 {
372 if(const XFillBitmapItem* pFillBmpItem = m_rOutAttrs.GetItemIfSet(XATTR_FILLBITMAP))
373 {
374 pEntry.reset(new XBitmapEntry(pFillBmpItem->GetGraphicObject(), aName));
375 }
376 else
377 assert(!"SvxPatternTabPage::ClickAddHdl_Impl(), XBitmapEntry* pEntry == nullptr ?");
378 }
379
380 if( pEntry )
381 {
382 m_pPatternList->Insert(std::move(pEntry), nCount);
383 sal_Int32 nId = m_xPatternLB->GetItemId( nCount - 1 );
384 BitmapEx aBitmap = m_pPatternList->GetBitmapForPreview( nCount, m_xPatternLB->GetIconSize() );
385 m_xPatternLB->InsertItem( nId + 1, Image(aBitmap), aName );
386 m_xPatternLB->SelectItem( nId + 1 );
387 m_xPatternLB->Resize();
388
389 *m_pnPatternListState |= ChangeType::MODIFIED;
390
391 ChangePatternHdl_Impl(m_xPatternLB.get());
392 }
393 }
394
395 // determine button state
396 if( m_pPatternList->Count() )
397 {
398 m_xBtnModify->set_sensitive(true);
399 }
400}
401
402IMPL_LINK_NOARG(SvxPatternTabPage, ClickModifyHdl_Impl, weld::Button&, void)
403{
404 sal_uInt16 nId = m_xPatternLB->GetSelectedItemId();
405 size_t nPos = m_xPatternLB->GetSelectItemPos();
406
408 return;
409
410 OUString aName( m_pPatternList->GetBitmap( static_cast<sal_uInt16>(nPos) )->GetName() );
411
412 const BitmapEx aBitmapEx(m_xBitmapCtl->GetBitmapEx());
413
414 // #i123497# Need to replace the existing entry with a new one (old returned needs to be deleted)
415 m_pPatternList->Replace(std::make_unique<XBitmapEntry>(Graphic(aBitmapEx), aName), nPos);
416
417 BitmapEx aBitmap = m_pPatternList->GetBitmapForPreview( static_cast<sal_uInt16>( nPos ), m_xPatternLB->GetIconSize() );
418 m_xPatternLB->RemoveItem(nId);
419 m_xPatternLB->InsertItem( nId, Image(aBitmap), aName, static_cast<sal_uInt16>(nPos) );
420 m_xPatternLB->SelectItem( nId );
421
422 *m_pnPatternListState |= ChangeType::MODIFIED;
423}
424
425
427{
428 size_t nPos = m_xPatternLB->GetSelectItemPos();
429 sal_Int32 nId = m_xPatternLB->GetSelectedItemId();
430
432 return;
433
434 OUString aDesc(CuiResId(RID_CUISTR_DESC_NEW_PATTERN));
435 OUString aName(m_pPatternList->GetBitmap(nPos)->GetName());
436
439
440 bool bLoop = true;
441
442 while( bLoop && pDlg->Execute() == RET_OK )
443 {
444 pDlg->GetName( aName );
445 sal_Int32 nPatternPos = SearchPatternList(aName);
446 bool bValidPatternName = (nPatternPos == static_cast<sal_Int32>(nPos) ) || (nPatternPos == -1);
447
448 if( bValidPatternName )
449 {
450 bLoop = false;
451
452 m_pPatternList->GetBitmap(nPos)->SetName(aName);
453
454 m_xPatternLB->SetItemText( nId, aName );
455 m_xPatternLB->SelectItem( nId );
456
457 *m_pnPatternListState |= ChangeType::MODIFIED;
458 }
459 else
460 {
461 std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
462 std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
463 xWarnBox->run();
464 }
465 }
466}
467
469{
470 sal_uInt16 nId = m_xPatternLB->GetSelectedItemId();
471 size_t nPos = m_xPatternLB->GetSelectItemPos();
472
474 {
475 std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/querydeletebitmapdialog.ui"));
476 std::unique_ptr<weld::MessageDialog> xQueryBox(xBuilder->weld_message_dialog("AskDelBitmapDialog"));
477 if (xQueryBox->run() == RET_YES)
478 {
479 m_pPatternList->Remove(nPos);
480 m_xPatternLB->RemoveItem( nId );
481 nId = m_xPatternLB->GetItemId(0);
482 m_xPatternLB->SelectItem( nId );
483 m_xPatternLB->Resize();
484
485 m_aCtlPreview.Invalidate();
486 m_xCtlPixel->Invalidate();
487
488 ChangePatternHdl_Impl(m_xPatternLB.get());
489
490 *m_pnPatternListState |= ChangeType::MODIFIED;
491 }
492 }
493 // determine button state
494 if( !m_pPatternList->Count() )
495 {
496 m_xBtnModify->set_sensitive(false);
497 }
498}
499
500IMPL_LINK_NOARG(SvxPatternTabPage, ChangeColorHdl_Impl, ColorListBox&, void)
501{
502 ChangeColor_Impl();
503 m_xPatternLB->SetNoSelection();
504}
505
507{
508 m_xCtlPixel->SetPixelColor( m_xLbColor->GetSelectEntryColor() );
509 m_xCtlPixel->SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() );
510 m_xCtlPixel->Invalidate();
511
512 m_xBitmapCtl->SetPixelColor( m_xLbColor->GetSelectEntryColor() );
513 m_xBitmapCtl->SetBackgroundColor( m_xLbBackgroundColor->GetSelectEntryColor() );
514
515 // get bitmap and display it
516 m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmapEx())));
518 m_aCtlPreview.Invalidate();
519}
520
522{
523 if (pDrawingArea == m_xCtlPixel->GetDrawingArea())
524 {
525 m_xBitmapCtl->SetBmpArray(m_xCtlPixel->GetBitmapPixelPtr());
526
527 // get bitmap and display it
528 m_rXFSet.Put(XFillBitmapItem(OUString(), Graphic(m_xBitmapCtl->GetBitmapEx())));
530 m_aCtlPreview.Invalidate();
531 }
532
533 m_xPatternLB->SetNoSelection();
534}
535
536sal_Int32 SvxPatternTabPage::SearchPatternList(std::u16string_view rPatternName)
537{
539 bool bValidPatternName = true;
540 sal_Int32 nPos = -1;
541
542 for(tools::Long i = 0;i < nCount && bValidPatternName;i++)
543 {
544 if(rPatternName == m_pPatternList->GetBitmap( i )->GetName())
545 {
546 nPos = i;
547 bValidPatternName = false;
548 }
549 }
550 return nPos;
551}
552
553/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define GetWhich(nSlot)
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
OUString const & GetName() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) 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()
const XColorListRef & GetNewColorList() const
Definition: cuitabarea.hxx:123
BitmapEx GetBitmapEx() const
Definition: tppattern.cxx:60
Color aPixelColor
Definition: tppattern.cxx:49
Color aBackgroundColor
Definition: tppattern.cxx:49
void SetBmpArray(std::array< sal_uInt8, 64 > const &pPixel)
Definition: tppattern.cxx:67
void SetBackgroundColor(Color aColor)
Definition: tppattern.cxx:69
void SetPixelColor(Color aColor)
Definition: tppattern.cxx:68
std::array< sal_uInt8, 64 > const * pBmpArray
Definition: tppattern.cxx:50
SvxPatternTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: tppattern.cxx:72
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: tppattern.cxx:133
SfxItemSet & m_rXFSet
Definition: cuitabarea.hxx:593
XColorListRef m_pColorList
Definition: cuitabarea.hxx:586
XPatternListRef m_pPatternList
Definition: cuitabarea.hxx:587
std::unique_ptr< weld::Button > m_xBtnModify
Definition: cuitabarea.hxx:601
virtual void Reset(const SfxItemSet *) override
Definition: tppattern.cxx:210
std::unique_ptr< weld::CustomWeld > m_xPatternLBWin
Definition: cuitabarea.hxx:604
void ChangeColor_Impl()
Definition: tppattern.cxx:506
std::unique_ptr< ColorListBox > m_xLbColor
Definition: cuitabarea.hxx:597
virtual bool FillItemSet(SfxItemSet *) override
Definition: tppattern.cxx:188
SvxXRectPreview m_aCtlPreview
Definition: cuitabarea.hxx:595
virtual ~SvxPatternTabPage() override
Definition: tppattern.cxx:117
std::unique_ptr< weld::CustomWeld > m_xCtlPixelWin
Definition: cuitabarea.hxx:602
std::unique_ptr< weld::CustomWeld > m_xCtlPreview
Definition: cuitabarea.hxx:603
std::unique_ptr< weld::Button > m_xBtnAdd
Definition: cuitabarea.hxx:600
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: tppattern.cxx:179
std::unique_ptr< SvxPresetListBox > m_xPatternLB
Definition: cuitabarea.hxx:599
ChangeType * m_pnColorListState
Definition: cuitabarea.hxx:590
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *)
Definition: tppattern.cxx:239
XFillAttrSetItem m_aXFillAttr
Definition: cuitabarea.hxx:592
std::unique_ptr< SvxPixelCtl > m_xCtlPixel
Definition: cuitabarea.hxx:596
sal_Int32 SearchPatternList(std::u16string_view rPatternName)
Definition: tppattern.cxx:536
virtual void PointChanged(weld::DrawingArea *, RectPoint eRP) override
Definition: tppattern.cxx:521
std::unique_ptr< SvxBitmapCtl > m_xBitmapCtl
Definition: cuitabarea.hxx:605
std::unique_ptr< ColorListBox > m_xLbBackgroundColor
Definition: cuitabarea.hxx:598
void SetAttributes(const SfxItemSet &rItemSet)
void disposeAndClear()
const GraphicObject & GetGraphicObject() const
bool isPattern() const
const GraphicObject & GetGraphicObject() const
OUString CuiResId(TranslateId aKey)
Definition: cuiresmgr.cxx:23
int nCount
SVXCORE_DLLPUBLIC OUString SvxResId(TranslateId aId)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
Size SFX2_DLLPUBLIC getDrawPreviewOptimalSize(const OutputDevice &rReference)
URL aURL
OUString aName
sal_uInt16 nPos
#define SAL_WARN_IF(condition, area, stream)
const SfxItemSet * GetItemSet(const SfxPoolItem &rAttr)
int i
long Long
bool isHistorical8x8(const BitmapEx &rBitmapEx, Color &o_rBack, Color &o_rFront)
BitmapEx createHistorical8x8FromArray(std::array< sal_uInt8, 64 > const &pArray, Color aColorPix, Color aColorBack)
sal_Int16 nId
RectPoint
static SfxItemSet & rSet
DeactivateRC
IMPL_LINK_NOARG(SvxPatternTabPage, ChangePatternHdl_Impl, ValueSet *, void)
Definition: tppattern.cxx:245
#define VALUESET_ITEM_NOTFOUND
RET_OK
RET_YES
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)