LibreOffice Module reportdesign (master)  1
UITools.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 
21 #include <memory>
24 #include <SectionView.hxx>
25 #include <UITools.hxx>
26 #include <Formula.hxx>
27 #include <FunctionHelper.hxx>
28 #include <reportformula.hxx>
29 
30 #include <tools/diagnose_ex.h>
31 
32 #include <vcl/settings.hxx>
33 #include <vcl/syswin.hxx>
34 #include <vcl/svapp.hxx>
35 #include <vcl/unohelp.hxx>
36 #include <vcl/window.hxx>
37 
38 #include <com/sun/star/lang/NullPointerException.hpp>
39 #include <com/sun/star/beans/NamedValue.hpp>
40 #include <com/sun/star/beans/PropertyAttribute.hpp>
41 #include <svx/svdpool.hxx>
42 
44 #include <editeng/brushitem.hxx>
45 #include <editeng/fontitem.hxx>
47 #include <editeng/postitem.hxx>
48 #include <editeng/udlnitem.hxx>
50 #include <editeng/contouritem.hxx>
51 #include <editeng/langitem.hxx>
52 #include <editeng/wghtitem.hxx>
53 #include <editeng/fhgtitem.hxx>
54 #include <editeng/shdditem.hxx>
56 #include <editeng/wrlmitem.hxx>
57 #include <editeng/cmapitem.hxx>
58 #include <editeng/kernitem.hxx>
59 #include <editeng/blinkitem.hxx>
60 #include <editeng/flstitem.hxx>
61 #include <editeng/autokernitem.hxx>
62 #include <editeng/colritem.hxx>
63 #include <editeng/justifyitem.hxx>
64 #include <svx/drawitem.hxx>
65 #include <editeng/twolinesitem.hxx>
69 #include <editeng/memberids.h>
70 #include <svx/xgrscit.hxx>
71 #include <svx/svditer.hxx>
72 #include <svx/xtable.hxx>
73 #include <svx/svdview.hxx>
74 #include <svx/svdpage.hxx>
75 #include <svx/svxdlg.hxx>
76 #include <svx/unoprov.hxx>
77 #include <svx/svxids.hrc>
78 
79 #include <unotools/charclass.hxx>
80 #include <svtools/ctrltool.hxx>
81 #include <svl/itempool.hxx>
82 #include <svl/itemset.hxx>
83 #include <svl/sharedstringpool.hxx>
84 
87 
89 #include <connectivity/dbtools.hxx>
90 
91 #include <com/sun/star/style/VerticalAlignment.hpp>
92 #include <com/sun/star/report/XShape.hpp>
93 #include <com/sun/star/sdb/XParametersSupplier.hpp>
94 #include <com/sun/star/sdb/SQLContext.hpp>
96 #include <dlgpage.hxx>
97 #include <strings.hxx>
98 #include <core_resource.hxx>
99 #include <RptObject.hxx>
100 #include <RptDef.hxx>
101 #include <strings.hrc>
102 #include <ReportDefinition.hxx>
103 #include <RptModel.hxx>
104 
105 #include <svx/xflbckit.hxx>
106 #include <svx/xflbmpit.hxx>
107 #include <svx/xflbmsli.hxx>
108 #include <svx/xflbmsxy.hxx>
109 #include <svx/xflbmtit.hxx>
110 #include <svx/xflboxy.hxx>
111 #include <svx/xflbstit.hxx>
112 #include <svx/xflbtoxy.hxx>
113 
114 #include <svx/xbtmpit.hxx>
115 #include <svx/xfillit0.hxx>
116 #include <svx/xfltrit.hxx>
117 #include <svx/xflclit.hxx>
118 #include <svx/xflgrit.hxx>
119 #include <svx/xflhtit.hxx>
120 #include <svx/xflftrit.hxx>
121 #include <svx/xsflclit.hxx>
122 
123 #define ITEMID_FONT TypedWhichId<SvxFontItem>(XATTR_FILL_LAST + 1)
124 #define ITEMID_FONTHEIGHT TypedWhichId<SvxFontHeightItem>(XATTR_FILL_LAST + 2)
125 #define ITEMID_LANGUAGE TypedWhichId<SvxLanguageItem>(XATTR_FILL_LAST + 3)
126 
127 #define ITEMID_POSTURE TypedWhichId<SvxPostureItem>(XATTR_FILL_LAST + 4)
128 #define ITEMID_WEIGHT TypedWhichId<SvxWeightItem>(XATTR_FILL_LAST + 5)
129 #define ITEMID_SHADOWED TypedWhichId<SvxShadowedItem>(XATTR_FILL_LAST + 6)
130 #define ITEMID_WORDLINEMODE TypedWhichId<SvxWordLineModeItem>(XATTR_FILL_LAST + 7)
131 #define ITEMID_CONTOUR TypedWhichId<SvxContourItem>(XATTR_FILL_LAST + 8)
132 #define ITEMID_CROSSEDOUT TypedWhichId<SvxCrossedOutItem>(XATTR_FILL_LAST + 9)
133 #define ITEMID_UNDERLINE TypedWhichId<SvxUnderlineItem>(XATTR_FILL_LAST + 10)
134 
135 #define ITEMID_COLOR TypedWhichId<SvxColorItem>(XATTR_FILL_LAST + 11)
136 #define ITEMID_KERNING TypedWhichId<SvxKerningItem>(XATTR_FILL_LAST + 12)
137 #define ITEMID_CASEMAP TypedWhichId<SvxCaseMapItem>(XATTR_FILL_LAST + 13)
138 
139 #define ITEMID_ESCAPEMENT TypedWhichId<SvxEscapementItem>(XATTR_FILL_LAST + 14)
140 #define ITEMID_FONTLIST XATTR_FILL_LAST + 15
141 #define ITEMID_AUTOKERN TypedWhichId<SvxAutoKernItem>(XATTR_FILL_LAST + 16)
142 #define ITEMID_COLOR_TABLE TypedWhichId<SvxColorListItem>(XATTR_FILL_LAST + 17)
143 #define ITEMID_BLINK TypedWhichId<SvxBlinkItem>(XATTR_FILL_LAST + 18)
144 #define ITEMID_EMPHASISMARK TypedWhichId<SvxEmphasisMarkItem>(XATTR_FILL_LAST + 19)
145 #define ITEMID_TWOLINES TypedWhichId<SvxTwoLinesItem>(XATTR_FILL_LAST + 20)
146 #define ITEMID_CHARROTATE TypedWhichId<SvxCharRotateItem>(XATTR_FILL_LAST + 21)
147 #define ITEMID_CHARSCALE_W TypedWhichId<SvxCharScaleWidthItem>(XATTR_FILL_LAST + 22)
148 #define ITEMID_CHARRELIEF TypedWhichId<SvxCharReliefItem>(XATTR_FILL_LAST + 23)
149 #define ITEMID_CHARHIDDEN TypedWhichId<SvxCharHiddenItem>(XATTR_FILL_LAST + 24)
150 #define ITEMID_BRUSH TypedWhichId<SvxBrushItem>(XATTR_FILL_LAST + 25)
151 #define ITEMID_HORJUSTIFY TypedWhichId<SvxHorJustifyItem>(XATTR_FILL_LAST + 26)
152 #define ITEMID_VERJUSTIFY TypedWhichId<SvxVerJustifyItem>(XATTR_FILL_LAST + 27)
153 #define ITEMID_FONT_ASIAN TypedWhichId<SvxFontItem>(XATTR_FILL_LAST + 28)
154 #define ITEMID_FONTHEIGHT_ASIAN TypedWhichId<SvxFontHeightItem>(XATTR_FILL_LAST + 29)
155 #define ITEMID_LANGUAGE_ASIAN TypedWhichId<SvxLanguageItem>(XATTR_FILL_LAST + 30)
156 #define ITEMID_POSTURE_ASIAN TypedWhichId<SvxPostureItem>(XATTR_FILL_LAST + 31)
157 #define ITEMID_WEIGHT_ASIAN TypedWhichId<SvxWeightItem>(XATTR_FILL_LAST + 32)
158 #define ITEMID_FONT_COMPLEX TypedWhichId<SvxFontItem>(XATTR_FILL_LAST + 33)
159 #define ITEMID_FONTHEIGHT_COMPLEX TypedWhichId<SvxFontHeightItem>(XATTR_FILL_LAST + 34)
160 #define ITEMID_LANGUAGE_COMPLEX TypedWhichId<SvxLanguageItem>(XATTR_FILL_LAST + 35)
161 #define ITEMID_POSTURE_COMPLEX TypedWhichId<SvxPostureItem>(XATTR_FILL_LAST + 36)
162 #define ITEMID_WEIGHT_COMPLEX TypedWhichId<SvxWeightItem>(XATTR_FILL_LAST + 37)
163 
164 #define WESTERN 0
165 #define ASIAN 1
166 #define COMPLEX 2
167 
168 namespace rptui
169 {
170 using namespace ::com::sun::star;
171 using namespace formula;
172 
173 void adjustSectionName(const uno::Reference< report::XGroup >& _xGroup,sal_Int32 _nPos)
174 {
175  OSL_ENSURE(_xGroup.is(),"Group is NULL -> GPF");
176  if ( _xGroup->getHeaderOn() && _xGroup->getHeader()->getName().isEmpty() )
177  {
178  OUString sName = RptResId(RID_STR_GROUPHEADER) + OUString::number(_nPos);
179  _xGroup->getHeader()->setName(sName);
180  }
181 
182  if ( _xGroup->getFooterOn() && _xGroup->getFooter()->getName().isEmpty() )
183  {
184  OUString sName = RptResId(RID_STR_GROUPFOOTER) + OUString::number(_nPos);
185  _xGroup->getFooter()->setName(sName);
186  }
187 }
188 
189 ::rtl::Reference< comphelper::OPropertyChangeMultiplexer> addStyleListener(const uno::Reference< report::XReportDefinition >& _xReportDefinition,::comphelper::OPropertyChangeListener* _pListener)
190 {
192  if ( _xReportDefinition.is() )
193  {
194  uno::Reference<beans::XPropertySet> xPageStyle(getUsedStyle(_xReportDefinition),uno::UNO_QUERY);
195  if ( xPageStyle.is() )
196  {
197  pRet = new comphelper::OPropertyChangeMultiplexer(_pListener,xPageStyle);
198  pRet->addProperty(PROPERTY_LEFTMARGIN);
199  pRet->addProperty(PROPERTY_RIGHTMARGIN);
200  pRet->addProperty(PROPERTY_PAPERSIZE);
201  pRet->addProperty(PROPERTY_BACKCOLOR);
202  }
203  }
204  return pRet;
205 }
206 
207 
208 namespace
209 {
210 
211  vcl::Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat, awt::FontDescriptor& _out_rControlFont ,sal_uInt16 _nWichFont)
212  {
213  if ( !_rxReportControlFormat.is() )
214  throw uno::RuntimeException();
215 
216  switch(_nWichFont)
217  {
218  case WESTERN:
219  _out_rControlFont = _rxReportControlFormat->getFontDescriptor();
220  break;
221  case ASIAN:
222  _out_rControlFont = _rxReportControlFormat->getFontDescriptorAsian();
223  break;
224  case COMPLEX:
225  _out_rControlFont = _rxReportControlFormat->getFontDescriptorComplex();
226  break;
227 
228  }
229 
231  return VCLUnoHelper::CreateFont( _out_rControlFont, aDefaultFont );
232  }
233 
234 
235  vcl::Font lcl_getReportControlFont( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,sal_uInt16 _nWhich )
236  {
237  awt::FontDescriptor aAwtFont;
238  return lcl_getReportControlFont( _rxReportControlFormat, aAwtFont, _nWhich );
239  }
240 
241  vcl::Font lcl_setFont(const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
242  SfxItemSet& _rItemSet,sal_uInt16 _nWhich,sal_uInt16 _nFont, sal_uInt16 _nFontHeight,sal_uInt16 _nLanguage,sal_uInt16 _nPosture, sal_uInt16 _nWeight)
243  {
244  // fill it
245  awt::FontDescriptor aControlFont;
246  const vcl::Font aFont( lcl_getReportControlFont( _rxReportControlFormat, aControlFont,_nWhich ) );
247 
248  SvxFontItem aFontItem(_nFont);
249  aFontItem.PutValue( uno::Any( aControlFont ), 0 );
250  _rItemSet.Put(aFontItem);
251 
252  _rItemSet.Put(SvxFontHeightItem(o3tl::convert(aFont.GetFontHeight(), o3tl::Length::pt, o3tl::Length::twip), 100, _nFontHeight));
253  lang::Locale aLocale;
254  switch(_nWhich)
255  {
256  default:
257  aLocale = _rxReportControlFormat->getCharLocale();
258  break;
259  case ASIAN:
260  aLocale = _rxReportControlFormat->getCharLocaleAsian();
261  break;
262  case COMPLEX:
263  aLocale = _rxReportControlFormat->getCharLocaleComplex();
264  break;
265  }
266 
267  _rItemSet.Put(SvxLanguageItem(LanguageTag(aLocale).makeFallback().getLanguageType(),_nLanguage));
268 
269  _rItemSet.Put(SvxPostureItem(aFont.GetItalic(),_nPosture));
270  _rItemSet.Put(SvxWeightItem(aFont.GetWeight(),_nWeight));
271  return aFont;
272  }
273 
274  void lcl_fillShapeToItems( const uno::Reference<report::XShape >& _xShape,SfxItemSet& _rItemSet )
275  {
276  uno::Reference< beans::XPropertySetInfo> xInfo = _xShape->getPropertySetInfo();
278  const SfxItemPropertyMap& rPropertyMap = aMap.GetPropertySet(SVXMAP_CUSTOMSHAPE, SdrObject::GetGlobalDrawObjectItemPool())->getPropertyMap();
279  for (const auto pProp : rPropertyMap.getPropertyEntries())
280  {
281  if ( xInfo->hasPropertyByName(pProp->aName) )
282  {
283  const SfxPoolItem* pItem = _rItemSet.GetItem(pProp->nWID);
284  if ( pItem )
285  {
286  ::std::unique_ptr<SfxPoolItem> pClone(pItem->CloneSetWhich(pProp->nWID));
287  pClone->PutValue(_xShape->getPropertyValue(pProp->aName), pProp->nMemberId);
288  _rItemSet.Put(std::move(pClone));
289  }
290  }
291  }
292  }
293 
294  void lcl_fillItemsToShape( const uno::Reference<report::XShape >& _xShape,const SfxItemSet& _rItemSet )
295  {
296  const uno::Reference< beans::XPropertySetInfo> xInfo = _xShape->getPropertySetInfo();
298  const SfxItemPropertyMap& rPropertyMap = aMap.GetPropertySet(SVXMAP_CUSTOMSHAPE, SdrObject::GetGlobalDrawObjectItemPool())->getPropertyMap();
299  for (const auto pProp : rPropertyMap.getPropertyEntries())
300  {
301  if ( SfxItemState::SET == _rItemSet.GetItemState(pProp->nWID) && xInfo->hasPropertyByName(pProp->aName) )
302  {
303  if ( ( pProp->nFlags & beans::PropertyAttribute::READONLY ) != beans::PropertyAttribute::READONLY )
304  {
305  const SfxPoolItem* pItem = _rItemSet.GetItem(pProp->nWID);
306  if ( pItem )
307  {
308  uno::Any aValue;
309  pItem->QueryValue(aValue, pProp->nMemberId);
310  try
311  {
312  _xShape->setPropertyValue(pProp->aName, aValue);
313  }
314  catch(uno::Exception&)
315  { // shapes have a bug so we ignore this one.
316  }
317  }
318  }
319  }
320  }
321  }
322 
323  void lcl_CharPropertiesToItems( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
324  SfxItemSet& _rItemSet )
325  {
326  if ( !_rxReportControlFormat.is() )
327  throw lang::NullPointerException();
328 
329  uno::Reference< beans::XPropertySet > xSet(_rxReportControlFormat,uno::UNO_QUERY_THROW);
330 
331  // fill it
332  const vcl::Font aFont( lcl_setFont(_rxReportControlFormat, _rItemSet,WESTERN,ITEMID_FONT,ITEMID_FONTHEIGHT,ITEMID_LANGUAGE,ITEMID_POSTURE,ITEMID_WEIGHT ) );
333 
334  _rItemSet.Put(SvxShadowedItem(_rxReportControlFormat->getCharShadowed(),ITEMID_SHADOWED));
335  _rItemSet.Put(SvxWordLineModeItem(aFont.IsWordLineMode(),ITEMID_WORDLINEMODE));
336  _rItemSet.Put(SvxContourItem(_rxReportControlFormat->getCharContoured(),ITEMID_CONTOUR));
337  _rItemSet.Put(SvxAutoKernItem(_rxReportControlFormat->getCharAutoKerning(),ITEMID_AUTOKERN));
338  _rItemSet.Put(SvxCrossedOutItem(aFont.GetStrikeout(),ITEMID_CROSSEDOUT));
339  _rItemSet.Put(SvxCaseMapItem(static_cast<SvxCaseMap>(_rxReportControlFormat->getCharCaseMap()),ITEMID_CASEMAP));
340 
341  _rItemSet.Put(SvxEscapementItem(_rxReportControlFormat->getCharEscapement(),_rxReportControlFormat->getCharEscapementHeight(),ITEMID_ESCAPEMENT));
342  _rItemSet.Put(SvxBlinkItem(_rxReportControlFormat->getCharFlash(),ITEMID_BLINK));
343  _rItemSet.Put(SvxCharHiddenItem(_rxReportControlFormat->getCharHidden(),ITEMID_CHARHIDDEN));
344  _rItemSet.Put(SvxTwoLinesItem(_rxReportControlFormat->getCharCombineIsOn(),_rxReportControlFormat->getCharCombinePrefix().toChar(),_rxReportControlFormat->getCharCombineSuffix().toChar(),ITEMID_TWOLINES));
345  SvxUnderlineItem aUnderLineItem(aFont.GetUnderline(),ITEMID_UNDERLINE);
346  aUnderLineItem.SetColor(Color(ColorTransparency, _rxReportControlFormat->getCharUnderlineColor()));
347  _rItemSet.Put(aUnderLineItem);
348  _rItemSet.Put(SvxKerningItem(_rxReportControlFormat->getCharKerning(),ITEMID_KERNING));
349  _rItemSet.Put(SvxEmphasisMarkItem(static_cast<FontEmphasisMark>(_rxReportControlFormat->getCharEmphasis()),ITEMID_EMPHASISMARK));
350  _rItemSet.Put(SvxCharReliefItem(static_cast<FontRelief>(_rxReportControlFormat->getCharRelief()),ITEMID_CHARRELIEF));
351  _rItemSet.Put(SvxColorItem(::Color(ColorTransparency, _rxReportControlFormat->getCharColor()),ITEMID_COLOR));
352  _rItemSet.Put(SvxCharRotateItem(Degree10(_rxReportControlFormat->getCharRotation()),false,ITEMID_CHARROTATE));
353  _rItemSet.Put(SvxCharScaleWidthItem(_rxReportControlFormat->getCharScaleWidth(),ITEMID_CHARSCALE_W));
354 
355  SvxHorJustifyItem aHorJustifyItem(ITEMID_HORJUSTIFY);
356  aHorJustifyItem.PutValue(xSet->getPropertyValue(PROPERTY_PARAADJUST),MID_HORJUST_ADJUST);
357  _rItemSet.Put(aHorJustifyItem);
358  SvxVerJustifyItem aVerJustifyItem(ITEMID_VERJUSTIFY);
359  aVerJustifyItem.PutValue(xSet->getPropertyValue(PROPERTY_VERTICALALIGN),MID_HORJUST_ADJUST);
360  _rItemSet.Put(aVerJustifyItem);
361 
362  uno::Reference< report::XShape> xShape(_rxReportControlFormat,uno::UNO_QUERY);
363  if ( !xShape.is() )
364  _rItemSet.Put(SvxBrushItem(::Color(ColorTransparency, _rxReportControlFormat->getControlBackground()),ITEMID_BRUSH));
365 
368  }
369 
370 
371  void lcl_pushBack( uno::Sequence< beans::NamedValue >& _out_rProperties, const OUString& _sName, const uno::Any& _rValue )
372  {
373  sal_Int32 nLen( _out_rProperties.getLength() );
374  _out_rProperties.realloc( nLen + 1 );
375  _out_rProperties.getArray()[ nLen ] = beans::NamedValue( _sName, _rValue );
376  }
377 
378 
379  void lcl_initAwtFont( const vcl::Font& _rOriginalFont, const SfxItemSet& _rItemSet, awt::FontDescriptor& _out_rAwtFont,
382  {
383  vcl::Font aNewFont( _rOriginalFont );
384  if ( const SvxFontItem* pFontItem = _rItemSet.GetItemIfSet( _nFont) )
385  {
386  aNewFont.SetFamilyName(pFontItem->GetFamilyName());
387  aNewFont.SetStyleName(pFontItem->GetStyleName());
388  aNewFont.SetFamily(pFontItem->GetFamily());
389  aNewFont.SetPitch(pFontItem->GetPitch());
390  aNewFont.SetCharSet(pFontItem->GetCharSet());
391  }
392  if ( const SvxFontHeightItem* pFontItem = _rItemSet.GetItemIfSet( _nFontHeight ) )
393  {
394  aNewFont.SetFontHeight(o3tl::convert(pFontItem->GetHeight(), o3tl::Length::twip, o3tl::Length::pt));
395  }
396  if ( const SvxPostureItem* pPostureItem = _rItemSet.GetItemIfSet( _nPosture) )
397  {
398  aNewFont.SetItalic(pPostureItem->GetPosture());
399  }
400  if ( const SvxWeightItem* pWeightItem = _rItemSet.GetItemIfSet( _nWeight ) )
401  {
402  aNewFont.SetWeight(pWeightItem->GetWeight());
403  }
404  if ( const SvxWordLineModeItem* pWordLineItem = _rItemSet.GetItemIfSet( ITEMID_WORDLINEMODE ) )
405  {
406  aNewFont.SetWordLineMode(pWordLineItem->GetValue());
407  }
408  if ( const SvxCrossedOutItem* pCrossedOutItem = _rItemSet.GetItemIfSet( ITEMID_CROSSEDOUT ) )
409  {
410  aNewFont.SetStrikeout(pCrossedOutItem->GetStrikeout());
411  }
412  if ( const SvxCharRotateItem* pRotateItem = _rItemSet.GetItemIfSet( ITEMID_CHARROTATE ) )
413  {
414  aNewFont.SetOrientation(pRotateItem->GetValue());
415  }
416  if ( const SvxCharScaleWidthItem* pCharItem = _rItemSet.GetItemIfSet( ITEMID_CHARSCALE_W ) )
417  {
418  aNewFont.SetWidthType(vcl::unohelper::ConvertFontWidth(pCharItem->GetValue()));
419  }
420  if ( const SvxUnderlineItem* pUnderlineItem = _rItemSet.GetItemIfSet( ITEMID_UNDERLINE ) )
421  {
422  aNewFont.SetUnderline(pUnderlineItem->GetLineStyle());
423  }
424  if ( const SvxColorItem* pColorItem = _rItemSet.GetItemIfSet( ITEMID_COLOR ) )
425  {
426  aNewFont.SetColor(pColorItem->GetValue());
427  }
428 
429  _out_rAwtFont = VCLUnoHelper::CreateFontDescriptor( aNewFont );
430  }
431 
432 
433  void lcl_itemsToCharProperties( const vcl::Font& _rOriginalControlFont,const vcl::Font& _rOriginalControlFontAsian,const vcl::Font& _rOriginalControlFontComplex, const SfxItemSet& _rItemSet, uno::Sequence< beans::NamedValue >& _out_rProperties )
434  {
435  // create an AWT font
436  awt::FontDescriptor aAwtFont;
437  lcl_initAwtFont( _rOriginalControlFont, _rItemSet, aAwtFont,ITEMID_FONT,ITEMID_FONTHEIGHT,ITEMID_POSTURE, ITEMID_WEIGHT);
438  lcl_pushBack( _out_rProperties, "Font", uno::Any( aAwtFont ) );
439  lcl_initAwtFont( _rOriginalControlFontAsian, _rItemSet, aAwtFont,ITEMID_FONT_ASIAN,ITEMID_FONTHEIGHT_ASIAN,ITEMID_POSTURE_ASIAN, ITEMID_WEIGHT_ASIAN);
440  lcl_pushBack( _out_rProperties, "FontAsian", uno::Any( aAwtFont ) );
441  lcl_initAwtFont( _rOriginalControlFontComplex, _rItemSet, aAwtFont,ITEMID_FONT_COMPLEX,ITEMID_FONTHEIGHT_COMPLEX,ITEMID_POSTURE_COMPLEX, ITEMID_WEIGHT_COMPLEX);
442  lcl_pushBack( _out_rProperties, "FontComplex", uno::Any( aAwtFont ) );
443 
444  // properties which cannot be represented in an AWT font need to be preserved directly
445  if ( const SvxShadowedItem* pShadowedItem = _rItemSet.GetItemIfSet( ITEMID_SHADOWED) )
446  lcl_pushBack( _out_rProperties, PROPERTY_CHARSHADOWED, uno::Any( pShadowedItem->GetValue() ) );
447  if ( const SvxContourItem* pContourItem = _rItemSet.GetItemIfSet( ITEMID_CONTOUR ) )
448  lcl_pushBack( _out_rProperties, PROPERTY_CHARCONTOURED, uno::Any( pContourItem->GetValue() ) );
449  if ( const SvxUnderlineItem* pUnderlineItem = _rItemSet.GetItemIfSet( ITEMID_UNDERLINE ) )
450  lcl_pushBack( _out_rProperties, PROPERTY_CHARUNDERLINECOLOR, uno::Any( pUnderlineItem->GetColor() ) );
451  if ( const SvxHorJustifyItem* pJustifyItem = _rItemSet.GetItemIfSet( ITEMID_HORJUSTIFY ) )
452  {
453  uno::Any aValue;
454  pJustifyItem->QueryValue(aValue,MID_HORJUST_ADJUST);
455  lcl_pushBack( _out_rProperties, PROPERTY_PARAADJUST, aValue );
456  }
457  if ( const SvxVerJustifyItem* pJustifyItem = _rItemSet.GetItemIfSet( ITEMID_VERJUSTIFY ) )
458  {
459  uno::Any aValue;
460  pJustifyItem->QueryValue(aValue,MID_HORJUST_ADJUST);
461  lcl_pushBack( _out_rProperties, PROPERTY_VERTICALALIGN, aValue );
462  }
463  if ( const SvxCharReliefItem* pReliefItem = _rItemSet.GetItemIfSet( ITEMID_CHARRELIEF ) )
464  lcl_pushBack( _out_rProperties, PROPERTY_CHARRELIEF, uno::Any( static_cast< sal_Int16 >( pReliefItem->GetEnumValue() ) ) );
465  if ( const SvxCharHiddenItem* pHiddenItem = _rItemSet.GetItemIfSet( ITEMID_CHARHIDDEN ) )
466  lcl_pushBack( _out_rProperties, PROPERTY_CHARHIDDEN, uno::Any( pHiddenItem->GetValue() ) );
467  if ( const SvxAutoKernItem* pKernItem = _rItemSet.GetItemIfSet( ITEMID_AUTOKERN ) )
468  lcl_pushBack( _out_rProperties, PROPERTY_CHARAUTOKERNING, uno::Any( pKernItem->GetValue() ) );
469  if ( const SvxBrushItem* pBrushItem = _rItemSet.GetItemIfSet( ITEMID_BRUSH ) )
470  lcl_pushBack( _out_rProperties, PROPERTY_CONTROLBACKGROUND, uno::Any( pBrushItem->GetColor() ) );
471  if ( const SvxBlinkItem* pBlinkItem = _rItemSet.GetItemIfSet( ITEMID_BLINK ) )
472  lcl_pushBack( _out_rProperties, PROPERTY_CHARFLASH, uno::Any( pBlinkItem->GetValue() ) );
473  if ( const SvxEmphasisMarkItem* pMarkItem = _rItemSet.GetItemIfSet( ITEMID_EMPHASISMARK ) )
474  lcl_pushBack( _out_rProperties, PROPERTY_CHAREMPHASIS, uno::Any( static_cast< sal_Int16 >( pMarkItem->GetEmphasisMark() ) ) );
475  if ( const SvxTwoLinesItem* pLinesItem = _rItemSet.GetItemIfSet( ITEMID_TWOLINES ) )
476  {
477  lcl_pushBack( _out_rProperties, PROPERTY_CHARCOMBINEISON, uno::Any( pLinesItem->GetValue() ) );
478  lcl_pushBack( _out_rProperties, PROPERTY_CHARCOMBINEPREFIX, uno::Any( OUString( pLinesItem->GetStartBracket() ) ) );
479  lcl_pushBack( _out_rProperties, PROPERTY_CHARCOMBINESUFFIX, uno::Any( OUString( pLinesItem->GetEndBracket() ) ) );
480  }
481  if ( const SvxColorItem* pColorItem = _rItemSet.GetItemIfSet( ITEMID_COLOR ) )
482  lcl_pushBack( _out_rProperties, PROPERTY_CHARCOLOR, uno::Any( pColorItem->GetValue() ) );
483  if ( const SvxKerningItem* pKernItem = _rItemSet.GetItemIfSet( ITEMID_KERNING ) )
484  lcl_pushBack( _out_rProperties, PROPERTY_CHARKERNING, uno::Any( pKernItem->GetValue() ) );
485  if ( const SvxCaseMapItem* pCaseMapItem = _rItemSet.GetItemIfSet( ITEMID_CASEMAP ) )
486  lcl_pushBack( _out_rProperties, PROPERTY_CHARCASEMAP, uno::Any( pCaseMapItem->GetEnumValue() ) );
487  struct Items {
489  OUString sPropertyName;
490  };
491  const Items pItems[] = { {ITEMID_LANGUAGE,OUString(PROPERTY_CHARLOCALE)}
494  };
495  for(const auto & k : pItems)
496  {
497  if ( const SvxLanguageItem* pLanguageItem = _rItemSet.GetItemIfSet( k.nWhich ) )
498  {
499  lang::Locale aCharLocale( LanguageTag( pLanguageItem->GetLanguage()).getLocale());
500  lcl_pushBack( _out_rProperties, k.sPropertyName, uno::Any( aCharLocale ) );
501  }
502  }
503  if ( const SvxEscapementItem* pEscapementItem = _rItemSet.GetItemIfSet( ITEMID_ESCAPEMENT ) )
504  {
505  lcl_pushBack( _out_rProperties, PROPERTY_CHARESCAPEMENT, uno::Any( pEscapementItem->GetEsc() ) );
506  lcl_pushBack( _out_rProperties, PROPERTY_CHARESCAPEMENTHEIGHT, uno::Any(static_cast<sal_Int8>(pEscapementItem->GetProportionalHeight())) );
507  }
508  }
509 
510 
511  template< class ATTRIBUTE_TYPE >
512  void lcl_applyFontAttribute( const ::comphelper::NamedValueCollection& _rAttrValues, const OUString& _pAttributeName,
513  const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
514  void (SAL_CALL report::XReportControlFormat::*pSetter)( ATTRIBUTE_TYPE ) )
515  {
516  ATTRIBUTE_TYPE aAttributeValue = ATTRIBUTE_TYPE();
517  if ( _rAttrValues.get_ensureType( _pAttributeName, aAttributeValue ) )
518  (_rxReportControlFormat.get()->*pSetter)( aAttributeValue );
519  }
520 
521 
522  void lcl_applyFontAttribute( const ::comphelper::NamedValueCollection& _rAttrValues, const OUString& _pAttributeName,
523  const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
524  void (SAL_CALL report::XReportControlFormat::*pSetter)( const OUString& ) )
525  {
526  OUString aAttributeValue;
527  if ( _rAttrValues.get_ensureType( _pAttributeName, aAttributeValue ) )
528  (_rxReportControlFormat.get()->*pSetter)( aAttributeValue );
529  }
530 
531 
532  void lcl_applyFontAttribute( const ::comphelper::NamedValueCollection& _rAttrValues, const OUString& _pAttributeName,
533  const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
534  void (SAL_CALL report::XReportControlFormat::*pSetter)( const lang::Locale& ) )
535  {
536  lang::Locale aAttributeValue;
537  if ( _rAttrValues.get_ensureType( _pAttributeName, aAttributeValue ) )
538  (_rxReportControlFormat.get()->*pSetter)( aAttributeValue );
539  }
540 }
541 
542 
543 bool openCharDialog( const uno::Reference<report::XReportControlFormat >& _rxReportControlFormat,
544  const uno::Reference< awt::XWindow>& _rxParentWindow, uno::Sequence< beans::NamedValue >& _out_rNewValues )
545 {
546  OSL_PRECOND( _rxReportControlFormat.is() && _rxParentWindow.is(), "openCharDialog: invalid parameters!" );
547  if ( !_rxReportControlFormat.is() || !_rxParentWindow.is() )
548  return false;
549 
550  _out_rNewValues = uno::Sequence< beans::NamedValue >();
551 
552 
553  // UNO->ItemSet
554  static SfxItemInfo aItemInfos[] =
555  {
556  { XATTR_FILLSTYLE, true },
557  { XATTR_FILLCOLOR, true },
558  { XATTR_FILLGRADIENT, true },
559  { XATTR_FILLHATCH, true },
560  { XATTR_FILLBITMAP, true },
561  { XATTR_FILLTRANSPARENCE, true },
562  { XATTR_GRADIENTSTEPCOUNT, true },
563  { XATTR_FILLBMP_TILE, true },
564  { XATTR_FILLBMP_POS, true },
565  { XATTR_FILLBMP_SIZEX, true },
566  { XATTR_FILLBMP_SIZEY, true },
567  { XATTR_FILLFLOATTRANSPARENCE, true },
568  { XATTR_SECONDARYFILLCOLOR, true },
569  { XATTR_FILLBMP_SIZELOG, true },
570  { XATTR_FILLBMP_TILEOFFSETX, true },
571  { XATTR_FILLBMP_TILEOFFSETY, true },
572  { XATTR_FILLBMP_STRETCH, true },
573  { XATTR_FILLBMP_POSOFFSETX, true },
574  { XATTR_FILLBMP_POSOFFSETY, true },
575  { XATTR_FILLBACKGROUND, true },
576 
577  { SID_ATTR_CHAR_FONT, true },
578  { SID_ATTR_CHAR_FONTHEIGHT, true },
579  { SID_ATTR_CHAR_LANGUAGE, true },
580  { SID_ATTR_CHAR_POSTURE, true },
581  { SID_ATTR_CHAR_WEIGHT, true },
582  { SID_ATTR_CHAR_SHADOWED, true },
583  { SID_ATTR_CHAR_WORDLINEMODE, true },
584  { SID_ATTR_CHAR_CONTOUR, true },
585  { SID_ATTR_CHAR_STRIKEOUT, true },
586  { SID_ATTR_CHAR_UNDERLINE, true },
587  { SID_ATTR_CHAR_COLOR, true },
588  { SID_ATTR_CHAR_KERNING, true },
589  { SID_ATTR_CHAR_CASEMAP, true },
590  { SID_ATTR_CHAR_ESCAPEMENT, true },
591  { SID_ATTR_CHAR_FONTLIST, true },
592  { SID_ATTR_CHAR_AUTOKERN, true },
593  { SID_COLOR_TABLE, true },
594  { SID_ATTR_FLASH, true },
595  { SID_ATTR_CHAR_EMPHASISMARK, true },
596  { SID_ATTR_CHAR_TWO_LINES, true },
597  { SID_ATTR_CHAR_ROTATED, true },
598  { SID_ATTR_CHAR_SCALEWIDTH, true },
599  { SID_ATTR_CHAR_RELIEF, true },
600  { SID_ATTR_CHAR_HIDDEN, true },
601  { SID_ATTR_BRUSH, true },
602  { SID_ATTR_ALIGN_HOR_JUSTIFY, true },
603  { SID_ATTR_ALIGN_VER_JUSTIFY, true },
604 
605  // Asian
606  { SID_ATTR_CHAR_CJK_FONT, true },
607  { SID_ATTR_CHAR_CJK_FONTHEIGHT, true },
608  { SID_ATTR_CHAR_CJK_LANGUAGE, true },
609  { SID_ATTR_CHAR_CJK_POSTURE, true },
610  { SID_ATTR_CHAR_CJK_WEIGHT, true },
611  // Complex
612  { SID_ATTR_CHAR_CTL_FONT, true },
613  { SID_ATTR_CHAR_CTL_FONTHEIGHT, true },
614  { SID_ATTR_CHAR_CTL_LANGUAGE, true },
615  { SID_ATTR_CHAR_CTL_POSTURE, true },
616  { SID_ATTR_CHAR_CTL_WEIGHT, true }
617  };
620  const Graphic aNullGraphic;
621  const ::Color aNullLineCol(COL_DEFAULT_SHAPE_STROKE); // #i121448# Use defined default color
622  const ::Color aNullFillCol(COL_DEFAULT_SHAPE_FILLING); // #i121448# Use defined default color
623  const XGradient aNullGrad(COL_BLACK, COL_WHITE);
624  const XHatch aNullHatch(aNullLineCol);
625  std::vector<SfxPoolItem*> pDefaults
626  {
627  new XFillStyleItem,
628  new XFillColorItem("", aNullFillCol),
629  new XFillGradientItem(aNullGrad),
630  new XFillHatchItem(aNullHatch),
631  new XFillBitmapItem(aNullGraphic),
634  new XFillBmpTileItem,
635  new XFillBmpPosItem,
636  new XFillBmpSizeXItem,
637  new XFillBmpSizeYItem,
638  new XFillFloatTransparenceItem(aNullGrad, false),
639  new XSecondaryFillColorItem("", aNullFillCol),
647 
653 
654  new SvxShadowedItem(false,ITEMID_SHADOWED),
656  new SvxContourItem(false,ITEMID_CONTOUR),
659 
662  new SvxCaseMapItem(SvxCaseMap::NotMapped,ITEMID_CASEMAP),
664  new SvxFontListItem(&aFontList,ITEMID_FONTLIST),
665  new SvxAutoKernItem(false,ITEMID_AUTOKERN),
666  new SvxColorListItem(pColorList,ITEMID_COLOR_TABLE),
667  new SvxBlinkItem(false,ITEMID_BLINK),
668  new SvxEmphasisMarkItem(FontEmphasisMark::NONE,ITEMID_EMPHASISMARK),
669  new SvxTwoLinesItem(true,0,0,ITEMID_TWOLINES),
670  new SvxCharRotateItem(0_deg10,false,ITEMID_CHARROTATE),
672  new SvxCharReliefItem(FontRelief::NONE,ITEMID_CHARRELIEF),
677 // Asian
683 // Complex
689 
690  };
691 
692  OSL_ASSERT( pDefaults.size() == SAL_N_ELEMENTS(aItemInfos) );
693 
694  static const WhichRangesContainer pRanges(svl::Items<
696  >);
697 
698  rtl::Reference<SfxItemPool> pPool(new SfxItemPool("ReportCharProperties", XATTR_FILL_FIRST,ITEMID_WEIGHT_COMPLEX, aItemInfos, &pDefaults));
699  // not needed for font height pPool->SetDefaultMetric( MapUnit::Map100thMM ); // ripped, don't understand why
700  pPool->FreezeIdRanges(); // the same
701  bool bSuccess = false;
702  try
703  {
704  SfxItemSet aDescriptor( *pPool, pRanges );
705  lcl_CharPropertiesToItems( _rxReportControlFormat, aDescriptor );
706 
707  { // want the dialog to be destroyed before our set
708  ORptPageDialog aDlg(Application::GetFrameWeld(_rxParentWindow), &aDescriptor, "CharDialog");
709  uno::Reference< report::XShape > xShape( _rxReportControlFormat, uno::UNO_QUERY );
710  if ( xShape.is() )
711  aDlg.RemoveTabPage("background");
712  bSuccess = aDlg.run() == RET_OK;
713  if ( bSuccess )
714  {
715  lcl_itemsToCharProperties( lcl_getReportControlFont( _rxReportControlFormat,WESTERN ),
716  lcl_getReportControlFont( _rxReportControlFormat,ASIAN ),
717  lcl_getReportControlFont( _rxReportControlFormat,COMPLEX ), *aDlg.GetOutputItemSet(), _out_rNewValues );
718  }
719  }
720  }
721  catch(uno::Exception&)
722  {
723  DBG_UNHANDLED_EXCEPTION("reportdesign");
724  }
725 
726  pPool.clear();
727  for (SfxPoolItem* pDefault : pDefaults)
728  delete pDefault;
729 
730  return bSuccess;
731 }
732 
733 bool openAreaDialog( const uno::Reference<report::XShape >& _xShape,const uno::Reference< awt::XWindow>& _rxParentWindow )
734 {
735  OSL_PRECOND( _xShape.is() && _rxParentWindow.is(), "openAreaDialog: invalid parameters!" );
736  if ( !_xShape.is() || !_rxParentWindow.is() )
737  return false;
738 
739  std::shared_ptr<rptui::OReportModel> pModel = ::reportdesign::OReportDefinition::getSdrModel(_xShape->getSection()->getReportDefinition());
740 
741  weld::Window* pParent = Application::GetFrameWeld(_rxParentWindow);
742 
743  bool bSuccess = false;
744  try
745  {
746  SfxItemPool& rItemPool = pModel->GetItemPool();
747  SfxItemSet aDescriptor( rItemPool, rItemPool.GetFirstWhich(), rItemPool.GetLastWhich() );
748  lcl_fillShapeToItems(_xShape, aDescriptor);
749 
750  { // want the dialog to be destroyed before our set
752  ScopedVclPtr<AbstractSvxAreaTabDialog> pDialog(pFact->CreateSvxAreaTabDialog(pParent, &aDescriptor, pModel.get(), true));
753  if ( RET_OK == pDialog->Execute() )
754  {
755  bSuccess = true;
756  lcl_fillItemsToShape(_xShape,*pDialog->GetOutputItemSet());
757  }
758  }
759  }
760  catch(uno::Exception&)
761  {
762  DBG_UNHANDLED_EXCEPTION("reportdesign");
763  }
764 
765  return bSuccess;
766 }
767 
768 
769 void applyCharacterSettings( const uno::Reference< report::XReportControlFormat >& _rxReportControlFormat, const uno::Sequence< beans::NamedValue >& _rSettings )
770 {
771  ::comphelper::NamedValueCollection aSettings( _rSettings );
772 
773  try
774  {
775  awt::FontDescriptor aAwtFont;
776  if ( aSettings.get( "Font" ) >>= aAwtFont )
777  {
778  OUString sTemp = aAwtFont.Name;
779  aAwtFont.Name.clear(); // hack to
780  _rxReportControlFormat->setFontDescriptor( aAwtFont );
781  _rxReportControlFormat->setCharFontName( sTemp );
782  }
783  if ( aSettings.get( "FontAsian" ) >>= aAwtFont )
784  {
785  OUString sTemp = aAwtFont.Name;
786  aAwtFont.Name.clear(); // hack to
787  _rxReportControlFormat->setFontDescriptorAsian( aAwtFont );
788  _rxReportControlFormat->setCharFontNameAsian( sTemp );
789  }
790  if ( aSettings.get( "FontComplex" ) >>= aAwtFont )
791  {
792  OUString sTemp = aAwtFont.Name;
793  aAwtFont.Name.clear(); // hack to
794  _rxReportControlFormat->setFontDescriptorComplex( aAwtFont );
795  _rxReportControlFormat->setCharFontNameComplex( sTemp );
796  }
797 
798  lcl_applyFontAttribute( aSettings, PROPERTY_CHARSHADOWED, _rxReportControlFormat, &report::XReportControlFormat::setCharShadowed );
799  lcl_applyFontAttribute( aSettings, PROPERTY_CHARCONTOURED, _rxReportControlFormat, &report::XReportControlFormat::setCharContoured );
800  lcl_applyFontAttribute( aSettings, PROPERTY_CHARUNDERLINECOLOR, _rxReportControlFormat, &report::XReportControlFormat::setCharUnderlineColor );
801  lcl_applyFontAttribute( aSettings, PROPERTY_PARAADJUST, _rxReportControlFormat, &report::XReportControlFormat::setParaAdjust );
802  lcl_applyFontAttribute( aSettings, PROPERTY_VERTICALALIGN, _rxReportControlFormat, &report::XReportControlFormat::setVerticalAlign );
803  lcl_applyFontAttribute( aSettings, PROPERTY_CHARRELIEF, _rxReportControlFormat, &report::XReportControlFormat::setCharRelief );
804  lcl_applyFontAttribute( aSettings, PROPERTY_CHARHIDDEN, _rxReportControlFormat, &report::XReportControlFormat::setCharHidden );
805  lcl_applyFontAttribute( aSettings, PROPERTY_CHARAUTOKERNING, _rxReportControlFormat, &report::XReportControlFormat::setCharAutoKerning );
806  lcl_applyFontAttribute( aSettings, PROPERTY_CONTROLBACKGROUND, _rxReportControlFormat, &report::XReportControlFormat::setControlBackground );
807  lcl_applyFontAttribute( aSettings, PROPERTY_CHARFLASH, _rxReportControlFormat, &report::XReportControlFormat::setCharFlash );
808  lcl_applyFontAttribute( aSettings, PROPERTY_CHAREMPHASIS, _rxReportControlFormat, &report::XReportControlFormat::setCharEmphasis );
809  lcl_applyFontAttribute( aSettings, PROPERTY_CHARCOMBINEISON, _rxReportControlFormat, &report::XReportControlFormat::setCharCombineIsOn );
810  lcl_applyFontAttribute( aSettings, PROPERTY_CHARCOMBINEPREFIX, _rxReportControlFormat, &report::XReportControlFormat::setCharCombinePrefix );
811  lcl_applyFontAttribute( aSettings, PROPERTY_CHARCOMBINESUFFIX, _rxReportControlFormat, &report::XReportControlFormat::setCharCombineSuffix );
812  lcl_applyFontAttribute( aSettings, PROPERTY_CHARCOLOR, _rxReportControlFormat, &report::XReportControlFormat::setCharColor );
813  lcl_applyFontAttribute( aSettings, PROPERTY_CHARKERNING, _rxReportControlFormat, &report::XReportControlFormat::setCharKerning );
814  lcl_applyFontAttribute( aSettings, PROPERTY_CHARCASEMAP, _rxReportControlFormat, &report::XReportControlFormat::setCharCaseMap );
815  lcl_applyFontAttribute( aSettings, PROPERTY_CHARLOCALE, _rxReportControlFormat, &report::XReportControlFormat::setCharLocale );
816  lcl_applyFontAttribute( aSettings, PROPERTY_CHARESCAPEMENT, _rxReportControlFormat, &report::XReportControlFormat::setCharEscapement );
817  lcl_applyFontAttribute( aSettings, PROPERTY_CHARESCAPEMENTHEIGHT, _rxReportControlFormat, &report::XReportControlFormat::setCharEscapementHeight );
818  lcl_applyFontAttribute( aSettings, PROPERTY_CHARLOCALEASIAN, _rxReportControlFormat, &report::XReportControlFormat::setCharLocaleAsian );
819  lcl_applyFontAttribute( aSettings, PROPERTY_CHARLOCALECOMPLEX, _rxReportControlFormat, &report::XReportControlFormat::setCharLocaleComplex );
820  }
821  catch( const uno::Exception& )
822  {
823  DBG_UNHANDLED_EXCEPTION("reportdesign");
824  }
825 }
826 
827 void notifySystemWindow(vcl::Window const * _pWindow, vcl::Window* _pToRegister, const ::comphelper::mem_fun1_t<TaskPaneList,vcl::Window*>& rMemFunc)
828 {
829  OSL_ENSURE(_pWindow,"Window can not be null!");
830  SystemWindow* pSystemWindow = _pWindow ? _pWindow->GetSystemWindow() : nullptr;
831  if ( pSystemWindow )
832  {
833  rMemFunc( pSystemWindow->GetTaskPaneList(), _pToRegister );
834  }
835 }
836 
837 SdrObject* isOver(const tools::Rectangle& _rRect, SdrPage const & _rPage, SdrView const & _rView, bool _bAllObjects, SdrObject const * _pIgnore, sal_Int16 _nIgnoreType)
838 {
839  SdrObject* pOverlappedObj = nullptr;
840  SdrObjListIter aIter(&_rPage,SdrIterMode::DeepNoGroups);
841 
842  while( !pOverlappedObj )
843  {
844  SdrObject* pObjIter = aIter.Next();
845  if( !pObjIter )
846  break;
847  if ( _pIgnore != pObjIter
848  && (_bAllObjects || !_rView.IsObjMarked(pObjIter))
849  && (dynamic_cast<OUnoObject*>(pObjIter) != nullptr || dynamic_cast<OOle2Obj*>(pObjIter) != nullptr))
850  {
851  if (_nIgnoreType == ISOVER_IGNORE_CUSTOMSHAPES && pObjIter->GetObjIdentifier() == SdrObjKind::CustomShape)
852  {
853  continue;
854  }
855 
856  if (dynamic_cast<OUnoObject*>(pObjIter) != nullptr || dynamic_cast<OOle2Obj*>(pObjIter) != nullptr)
857  {
858  tools::Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect());
859  if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) )
860  pOverlappedObj = pObjIter;
861  }
862  }
863  }
864  return pOverlappedObj;
865 }
866 
867 static bool checkArrayForOccurrence(SdrObject const * _pObjToCheck, std::unique_ptr<SdrUnoObj, SdrObjectFreeOp> _pIgnore[], int _nListLength)
868 {
869  for(int i=0;i<_nListLength;i++)
870  {
871  SdrObject *pIgnore = _pIgnore[i].get();
872  if (pIgnore == _pObjToCheck)
873  {
874  return true;
875  }
876  }
877  return false;
878 }
879 
880 SdrObject* isOver(const tools::Rectangle& _rRect,SdrPage const & _rPage,SdrView const & _rView,bool _bAllObjects, std::unique_ptr<SdrUnoObj, SdrObjectFreeOp> _pIgnoreList[], int _nIgnoreListLength)
881 {
882  SdrObject* pOverlappedObj = nullptr;
883  SdrObjListIter aIter(&_rPage,SdrIterMode::DeepNoGroups);
884 
885  while( !pOverlappedObj )
886  {
887  SdrObject* pObjIter = aIter.Next();
888  if( !pObjIter )
889  break;
890  if (checkArrayForOccurrence(pObjIter, _pIgnoreList, _nIgnoreListLength))
891  {
892  continue;
893  }
894 
895  if ( (_bAllObjects || !_rView.IsObjMarked(pObjIter))
896  && (dynamic_cast<OUnoObject*>(pObjIter) != nullptr || dynamic_cast<OOle2Obj*>(pObjIter) != nullptr) )
897  {
898  tools::Rectangle aRect = _rRect.GetIntersection(pObjIter->GetLastBoundRect());
899  if ( !aRect.IsEmpty() && (aRect.Left() != aRect.Right() && aRect.Top() != aRect.Bottom() ) )
900  pOverlappedObj = pObjIter;
901  }
902  }
903  return pOverlappedObj;
904 }
905 
906 
907 SdrObject* isOver(SdrObject const * _pObj,SdrPage const & _rPage,SdrView const & _rView)
908 {
909  SdrObject* pOverlappedObj = nullptr;
910  if (dynamic_cast<OUnoObject const *>(_pObj) != nullptr || dynamic_cast<OOle2Obj const *>(_pObj) != nullptr) // this doesn't need to be done for shapes
911  {
912  tools::Rectangle aRect = _pObj->GetCurrentBoundRect();
913  pOverlappedObj = isOver(aRect,_rPage,_rView,false/*_bUnMarkedObjects*/,_pObj);
914  }
915  return pOverlappedObj;
916 }
917 
918 
919 uno::Sequence< OUString > getParameterNames( const uno::Reference< sdbc::XRowSet >& _rxRowSet )
920 {
921  uno::Sequence< OUString > aNames;
922 
923  try
924  {
925  uno::Reference< sdb::XParametersSupplier > xSuppParams( _rxRowSet, uno::UNO_QUERY_THROW );
926  uno::Reference< container::XIndexAccess > xParams( xSuppParams->getParameters() );
927  if ( xParams.is() )
928  {
929  sal_Int32 count( xParams->getCount() );
930  aNames.realloc( count );
931  auto pNames = aNames.getArray();
932 
933  uno::Reference< beans::XPropertySet > xParam;
934  OUString sParamName;
935  for ( sal_Int32 i=0; i<count; ++i )
936  {
937  xParam.set( xParams->getByIndex(i), uno::UNO_QUERY_THROW );
938  OSL_VERIFY( xParam->getPropertyValue( PROPERTY_NAME ) >>= sParamName );
939  pNames[i] = sParamName;
940  }
941  }
942  }
943  catch( const uno::Exception& )
944  {
945  DBG_UNHANDLED_EXCEPTION("reportdesign");
946  }
947 
948  return aNames;
949 }
950 
952 {
953  if (_pControl)
954  {
955  uno::Reference< report::XReportComponent > xComponent( _pControl->getUnoShape(), uno::UNO_QUERY);
956  if (xComponent.is())
957  {
958  tools::Rectangle aRect(VCLPoint(xComponent->getPosition()),VCLSize(xComponent->getSize()));
959  aRect.setHeight(aRect.getHeight() + 1);
960  aRect.setWidth(aRect.getWidth() + 1);
961  return aRect;
962  }
963  }
964  return tools::Rectangle();
965 }
966 
967 // check overlapping
968 void correctOverlapping(SdrObject* _pControl,OReportSection const & _aReportSection,bool _bInsert)
969 {
970  OSectionView& rSectionView = _aReportSection.getSectionView();
971  uno::Reference< report::XReportComponent> xComponent(_pControl->getUnoShape(),uno::UNO_QUERY);
972  tools::Rectangle aRect = getRectangleFromControl(_pControl);
973 
974  bool bOverlapping = true;
975  while ( bOverlapping )
976  {
977  SdrObject* pOverlappedObj = isOver(aRect,*_aReportSection.getPage(),rSectionView,true, _pControl);
978  bOverlapping = pOverlappedObj != nullptr;
979  if ( bOverlapping )
980  {
981  const tools::Rectangle& aLogicRect = pOverlappedObj->GetLogicRect();
982  aRect.Move(0,aLogicRect.Top() + aLogicRect.getHeight() - aRect.Top());
983  xComponent->setPositionY(aRect.Top());
984  }
985  }
986  if (_bInsert) // now insert objects
987  rSectionView.InsertObjectAtView(_pControl,*rSectionView.GetSdrPageView(), SdrInsertFlags::ADDMARK);
988 }
989 
990 void setZoomFactor(const Fraction& _aZoom, vcl::Window& _rWindow)
991 {
992  MapMode aMapMode( _rWindow.GetMapMode() );
993  aMapMode.SetScaleX(_aZoom);
994  aMapMode.SetScaleY(_aZoom);
995  _rWindow.SetMapMode(aMapMode);
996 }
997 
998 bool openDialogFormula_nothrow( OUString& _in_out_rFormula
999  , const css::uno::Reference< css::uno::XComponentContext >& _xContext
1000  , const uno::Reference< awt::XWindow>& _xInspectorWindow
1001  , const css::uno::Reference < css::beans::XPropertySet >& _xRowSet
1002  )
1003 {
1004  OSL_PRECOND( _xInspectorWindow.is(), "openDialogFormula_nothrow: invalid parameters!" );
1005  if ( !_xInspectorWindow.is() )
1006  return false;
1007  bool bSuccess = false;
1008  ::dbtools::SQLExceptionInfo aErrorInfo;
1009  uno::Reference< awt::XWindow > xInspectorWindow;
1010  uno::Reference< lang::XMultiComponentFactory > xFactory;
1011  uno::Reference<lang::XMultiServiceFactory> xServiceFactory;
1012  try
1013  {
1014  xFactory = _xContext->getServiceManager();
1015  xServiceFactory.set(xFactory,uno::UNO_QUERY);
1016 
1017  uno::Reference< report::meta::XFunctionManager> xMgr(xFactory->createInstanceWithContext("org.libreoffice.report.pentaho.SOFunctionManager",_xContext),uno::UNO_QUERY);
1018  if ( xMgr.is() )
1019  {
1020  auto pFormulaManager = std::make_shared<FunctionManager>(xMgr);
1021  ReportFormula aFormula( _in_out_rFormula );
1022 
1023  LanguageTag aLangTag(LANGUAGE_SYSTEM);
1024  CharClass aCC(_xContext, aLangTag);
1025  svl::SharedStringPool aStringPool(aCC);
1026 
1027  FormulaDialog aDlg(
1028  Application::GetFrameWeld(_xInspectorWindow), xServiceFactory, pFormulaManager,
1029  aFormula.getUndecoratedContent(), _xRowSet, aStringPool);
1030 
1031  bSuccess = aDlg.run() == RET_OK;
1032  if ( bSuccess )
1033  {
1034  OUString sFormula = aDlg.getCurrentFormula();
1035  if ( sFormula[0] == '=' )
1036  _in_out_rFormula = OUString::Concat("rpt:") + sFormula.subView(1);
1037  else
1038  _in_out_rFormula = "rpt:" + sFormula;
1039  }
1040  }
1041  }
1042  catch (const sdb::SQLContext& e) { aErrorInfo = e; }
1043  catch (const sdbc::SQLWarning& e) { aErrorInfo = e; }
1044  catch (const sdbc::SQLException& e) { aErrorInfo = e; }
1045  catch( const uno::Exception& )
1046  {
1047  TOOLS_WARN_EXCEPTION( "reportdesign", "GeometryHandler::impl_dialogFilter_nothrow" );
1048  }
1049 
1050  if ( aErrorInfo.isValid() )
1051  ::dbtools::showError( aErrorInfo, xInspectorWindow, _xContext );
1052 
1053  return bSuccess;
1054 }
1055 
1056 } // namespace rptui
1057 
1058 
1059 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define LANGUAGE_GERMAN
#define ITEMID_CASEMAP
Definition: UITools.cxx:137
#define ITEMID_FONTHEIGHT
Definition: UITools.cxx:124
const T * GetItemIfSet(TypedWhichId< T > nWhich, bool bSrchInParent=true) const
virtual const tools::Rectangle & GetCurrentBoundRect() const
#define ITEMID_AUTOKERN
Definition: UITools.cxx:141
SystemWindow * GetSystemWindow() const
constexpr TypedWhichId< XFillBmpTileOffsetYItem > XATTR_FILLBMP_TILEOFFSETY(XATTR_FILL_FIRST+15)
#define PROPERTY_RIGHTMARGIN
Definition: strings.hxx:103
SdrObject * isOver(const tools::Rectangle &_rRect, SdrPage const &_rPage, SdrView const &_rView, bool _bAllObjects=false, SdrObject const *_pIgnore=nullptr, sal_Int16 _nIgnoreType=0)
checks whether the given rectangle overlapps another OUnoObject object in that view.
Definition: UITools.cxx:837
static constexpr auto Items
#define PROPERTY_CHARSHADOWED
Definition: strings.hxx:231
tools::Long getWidth() const
#define ITEMID_FONT_COMPLEX
Definition: UITools.cxx:158
const SfxItemSet * GetOutputItemSet() const
#define COL_DEFAULT_SHAPE_FILLING
void SetColor(const Color &rCol)
constexpr tools::Long Left() const
static XColorListRef CreateStdColorList()
OString sFormula
void notifySystemWindow(vcl::Window const *pWindow, vcl::Window *pToRegister, const ::comphelper::mem_fun1_t< TaskPaneList, vcl::Window * > &rMemFunc)
notifySystemWindow adds or remove the given window _pToRegister at the Systemwindow found when search...
Definition: UITools.cxx:827
constexpr TypedWhichId< SfxMetricItem > XATTR_FILLBMP_SIZEX(XATTR_FILL_FIRST+9)
#define ITEMID_SHADOWED
Definition: UITools.cxx:129
static SvxAbstractDialogFactory * Create()
#define PROPERTY_CHARCOMBINEPREFIX
Definition: strings.hxx:228
const StyleSettings & GetStyleSettings() const
constexpr TypedWhichId< XFillStyleItem > XATTR_FILLSTYLE(XATTR_FILL_FIRST)
#define PROPERTY_CHARESCAPEMENT
Definition: strings.hxx:225
#define ITEMID_EMPHASISMARK
Definition: UITools.cxx:144
constexpr Point convert(const Point &rPoint, o3tl::Length eFrom, o3tl::Length eTo)
#define PROPERTY_CHARCOMBINEISON
Definition: strings.hxx:227
sal_uInt16 GetLastWhich() const
void RemoveTabPage(const OString &rName)
#define ASIAN
Definition: UITools.cxx:165
#define ITEMID_VERJUSTIFY
Definition: UITools.cxx:152
#define ITEMID_CHARROTATE
Definition: UITools.cxx:146
constexpr TypedWhichId< XFillHatchItem > XATTR_FILLHATCH(XATTR_FILL_FIRST+3)
#define PROPERTY_CHARHIDDEN
Definition: strings.hxx:230
#define ITEMID_FONTHEIGHT_COMPLEX
Definition: UITools.cxx:159
virtual SdrObjKind GetObjIdentifier() const
uno::Reference< style::XStyle > getUsedStyle(const uno::Reference< report::XReportDefinition > &_xReport)
Definition: RptObject.cxx:1196
constexpr TypedWhichId< XFillBackgroundItem > XATTR_FILLBACKGROUND(XATTR_FILL_FIRST+19)
#define PROPERTY_CHARUNDERLINECOLOR
Definition: strings.hxx:88
tools::Rectangle getRectangleFromControl(SdrObject *pControl)
returns a Rectangle of a given SdrObject
Definition: UITools.cxx:951
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
#define PROPERTY_CHARCASEMAP
Definition: strings.hxx:226
static OutputDevice * GetDefaultDevice()
tools::Long getHeight() const
HashMap_OWString_Interface aMap
#define ITEMID_WEIGHT_COMPLEX
Definition: UITools.cxx:162
bool openDialogFormula_nothrow(OUString &_in_out_rFormula, const css::uno::Reference< css::uno::XComponentContext > &_xContext, const css::uno::Reference< css::awt::XWindow > &_xWindow, const css::uno::Reference< css::beans::XPropertySet > &_xRowSet)
opens the formula dialog
LINESTYLE_NONE
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const
#define ITEMID_FONTLIST
Definition: UITools.cxx:140
#define PROPERTY_LEFTMARGIN
Definition: strings.hxx:102
virtual css::uno::Reference< css::drawing::XShape > getUnoShape()
static bool checkArrayForOccurrence(SdrObject const *_pObjToCheck, std::unique_ptr< SdrUnoObj, SdrObjectFreeOp > _pIgnore[], int _nListLength)
Definition: UITools.cxx:867
#define PROPERTY_VERTICALALIGN
Definition: strings.hxx:86
VCL_DLLPUBLIC float ConvertFontWidth(FontWidth eWidth)
#define ITEMID_BLINK
Definition: UITools.cxx:143
#define ITEMID_CROSSEDOUT
Definition: UITools.cxx:132
tools::Rectangle GetIntersection(const tools::Rectangle &rRect) const
#define WESTERN
Definition: UITools.cxx:164
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId)
#define PROPERTY_CHARCOLOR
Definition: strings.hxx:85
#define PROPERTY_CHARKERNING
Definition: strings.hxx:234
const char * sName
constexpr bool IsEmpty() const
#define SAL_N_ELEMENTS(arr)
#define MID_HORJUST_ADJUST
#define PROPERTY_CHARESCAPEMENTHEIGHT
Definition: strings.hxx:223
#define ITEMID_UNDERLINE
Definition: UITools.cxx:133
#define PROPERTY_CONTROLBACKGROUND
Definition: strings.hxx:40
virtual short run() override
#define DBG_UNHANDLED_EXCEPTION(...)
#define PROPERTY_NAME
Definition: strings.hxx:36
#define ITEMID_FONT_ASIAN
Definition: UITools.cxx:153
#define TOOLS_WARN_EXCEPTION(area, stream)
#define PROPERTY_CHARRELIEF
Definition: strings.hxx:84
constexpr TypedWhichId< XFillTransparenceItem > XATTR_FILLTRANSPARENCE(XATTR_FILL_FIRST+5)
constexpr TypedWhichId< XFillGradientItem > XATTR_FILLGRADIENT(XATTR_FILL_FIRST+2)
OUString RptResId(TranslateId aId)
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
int i
#define PROPERTY_PAPERSIZE
Definition: strings.hxx:62
constexpr TypedWhichId< XSecondaryFillColorItem > XATTR_SECONDARYFILLCOLOR(XATTR_FILL_FIRST+12)
#define ITEMID_WEIGHT_ASIAN
Definition: UITools.cxx:157
void correctOverlapping(SdrObject *pControl, OReportSection const &_aReportSection, bool _bInsert=true)
ensures that no control overlaps the given one.
Definition: UITools.cxx:968
constexpr TypedWhichId< XFillBitmapItem > XATTR_FILLBITMAP(XATTR_FILL_FIRST+4)
#define ITEMID_WEIGHT
Definition: UITools.cxx:128
#define LANGUAGE_SYSTEM
const MapMode & GetMapMode() const
void adjustSectionName(const css::uno::Reference< css::report::XGroup > &_xGroup, sal_Int32 _nPos)
set the name of the header and footer of the group by the expression appended by the localized name o...
static weld::Window * GetFrameWeld(const css::uno::Reference< css::awt::XWindow > &rWindow)
#define ITEMID_POSTURE_ASIAN
Definition: UITools.cxx:156
constexpr TypedWhichId< XFillBmpPosItem > XATTR_FILLBMP_POS(XATTR_FILL_FIRST+8)
constexpr tools::Long Right() const
constexpr sal_uInt16 XATTR_FILL_FIRST(XATTRSET_LINE+1)
const css::uno::Any & get(const OUString &_rValueName) const
WEIGHT_NORMAL
#define ITEMID_BRUSH
Definition: UITools.cxx:150
constexpr tools::Long Top() const
#define ITEMID_FONT
Definition: UITools.cxx:123
inline::Point VCLPoint(const css::awt::Point &rAWTPoint)
bool openCharDialog(const css::uno::Reference< css::report::XReportControlFormat > &_xReportControlFormat, const css::uno::Reference< css::awt::XWindow > &_xWindow, css::uno::Sequence< css::beans::NamedValue > &_out_rNewValues)
opens the common character font dialog
#define PROPERTY_PARAADJUST
Definition: strings.hxx:79
#define ITEMID_KERNING
Definition: UITools.cxx:136
const AllSettings & GetSettings() const
ITALIC_NONE
#define PROPERTY_CHARCOMBINESUFFIX
Definition: strings.hxx:229
std::unique_ptr< SfxPoolItem > CloneSetWhich(sal_uInt16 nNewWhich) const
constexpr tools::Long Bottom() const
const LanguageTag & getLocale()
static std::shared_ptr< rptui::OReportModel > getSdrModel(const css::uno::Reference< css::report::XReportDefinition > &_xReportDefinition)
#define ITEMID_LANGUAGE_COMPLEX
Definition: UITools.cxx:160
virtual const tools::Rectangle & GetLastBoundRect() const
SdrObject * Next()
constexpr TypedWhichId< XFillColorItem > XATTR_FILLCOLOR(XATTR_FILL_FIRST+1)
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
inline::Size VCLSize(const css::awt::Size &rAWTSize)
constexpr TypedWhichId< XGradientStepCountItem > XATTR_GRADIENTSTEPCOUNT(XATTR_FILL_FIRST+6)
#define COL_DEFAULT_SHAPE_STROKE
#define ITEMID_COLOR_TABLE
Definition: UITools.cxx:142
void applyCharacterSettings(const css::uno::Reference< css::report::XReportControlFormat > &_rxReportControlFormat, const css::uno::Sequence< css::beans::NamedValue > &_rSettings)
applies the character settings previously obtained via openCharDialog
#define PROPERTY_CHARLOCALEASIAN
Definition: strings.hxx:163
const sal_Int16 ISOVER_IGNORE_CUSTOMSHAPES
Definition: UITools.hxx:131
void showError(const SQLExceptionInfo &_rInfo, const Reference< XWindow > &_xParent, const Reference< XComponentContext > &_rxContext)
constexpr TypedWhichId< XFillFloatTransparenceItem > XATTR_FILLFLOATTRANSPARENCE(XATTR_FILL_FIRST+11)
#define ITEMID_LANGUAGE_ASIAN
Definition: UITools.cxx:155
static SdrItemPool & GetGlobalDrawObjectItemPool()
::rtl::Reference< comphelper::OPropertyChangeMultiplexer > addStyleListener(const css::uno::Reference< css::report::XReportDefinition > &_xReportDefinition,::comphelper::OPropertyChangeListener *_pListener)
add a listener for the properties size, left margin, right margin to the page style ...
#define PROPERTY_CHARLOCALECOMPLEX
Definition: strings.hxx:179
constexpr TypedWhichId< XFillBmpPosOffsetYItem > XATTR_FILLBMP_POSOFFSETY(XATTR_FILL_FIRST+18)
static vcl::Font CreateFont(const css::awt::FontDescriptor &rDescr, const vcl::Font &rInitFont)
#define PROPERTY_CHARLOCALE
Definition: strings.hxx:224
void setWidth(tools::Long n)
constexpr TypedWhichId< XFillBmpStretchItem > XATTR_FILLBMP_STRETCH(XATTR_FILL_FIRST+16)
#define ITEMID_TWOLINES
Definition: UITools.cxx:145
virtual VclPtr< AbstractSvxAreaTabDialog > CreateSvxAreaTabDialog(weld::Window *pParent, const SfxItemSet *pAttr, SdrModel *pModel, bool bShadow)=0
#define PROPERTY_CHARCONTOURED
Definition: strings.hxx:232
sal_uInt16 GetFirstWhich() const
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_WHITE
#define ITEMID_LANGUAGE
Definition: UITools.cxx:125
RET_OK
SfxItemInfo const aItemInfos[]
constexpr TypedWhichId< XFillBmpPosOffsetXItem > XATTR_FILLBMP_POSOFFSETX(XATTR_FILL_FIRST+17)
#define ITEMID_COLOR
Definition: UITools.cxx:135
const o3tl::sorted_vector< const SfxItemPropertyMapEntry *, SfxItemPropertyMapCompare > & getPropertyEntries() const
constexpr TypedWhichId< XFillBmpTileItem > XATTR_FILLBMP_TILE(XATTR_FILL_FIRST+7)
#define ITEMID_FONTHEIGHT_ASIAN
Definition: UITools.cxx:154
css::uno::Sequence< OUString > getParameterNames(const css::uno::Reference< css::sdbc::XRowSet > &_rxRowSet)
retrieves the names of the parameters of the command which the given RowSet is bound to ...
const ::std::vector< Color > ImpSvNumberformatScan::StandardColor COL_BLACK
#define ITEMID_CHARHIDDEN
Definition: UITools.cxx:149
constexpr TypedWhichId< XFillBmpSizeLogItem > XATTR_FILLBMP_SIZELOG(XATTR_FILL_FIRST+13)
OReportPage * getPage() const
SdrPageView * GetSdrPageView() const
const vcl::Font & GetAppFont() const
void Move(tools::Long nHorzMoveDelta, tools::Long nVertMoveDelta)
#define PROPERTY_CHARAUTOKERNING
Definition: strings.hxx:233
#define ITEMID_CHARSCALE_W
Definition: UITools.cxx:147
#define ITEMID_HORJUSTIFY
Definition: UITools.cxx:151
Reference< XSingleServiceFactory > xFactory
#define ITEMID_POSTURE_COMPLEX
Definition: UITools.cxx:161
const SvxItemPropertySet * GetPropertySet(sal_uInt16 nPropertyId, SfxItemPool &rPool)
TaskPaneList * GetTaskPaneList()
void setZoomFactor(const Fraction &_aZoom, vcl::Window &_rWindow)
sets the map mode at the window
Definition: UITools.cxx:990
virtual const tools::Rectangle & GetLogicRect() const
#define ITEMID_POSTURE
Definition: UITools.cxx:127
const SfxItemPropertyMap & getPropertyMap() const
bool openAreaDialog(const css::uno::Reference< css::report::XShape > &_xShape, const css::uno::Reference< css::awt::XWindow > &_xWindow)
opens the area dialog for shapes
#define ITEMID_CHARRELIEF
Definition: UITools.cxx:148
#define PROPERTY_BACKCOLOR
Definition: strings.hxx:38
STRIKEOUT_NONE
constexpr TypedWhichId< XFillBmpTileOffsetXItem > XATTR_FILLBMP_TILEOFFSETX(XATTR_FILL_FIRST+14)
#define PROPERTY_CHAREMPHASIS
Definition: strings.hxx:135
#define ITEMID_WORDLINEMODE
Definition: UITools.cxx:130
static css::awt::FontDescriptor CreateFontDescriptor(const vcl::Font &rFont)
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
constexpr TypedWhichId< XFillBmpSizeYItem > XATTR_FILLBMP_SIZEY(XATTR_FILL_FIRST+10)
void SetMapMode()
#define ITEMID_CONTOUR
Definition: UITools.cxx:131
#define COMPLEX
Definition: UITools.cxx:166
#define ITEMID_ESCAPEMENT
Definition: UITools.cxx:139
void setHeight(tools::Long n)
#define PROPERTY_CHARFLASH
Definition: strings.hxx:222
OSectionView & getSectionView() const
bool IsObjMarked(SdrObject const *pObj) const