LibreOffice Module sw (master)  1
unomod.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 <swtypes.hxx>
21 #include <o3tl/any.hxx>
22 #include <osl/diagnose.h>
23 #include <unomod.hxx>
24 #include <unomid.h>
25 #include <unoprnms.hxx>
26 #include <unomap.hxx>
27 #include <prtopt.hxx>
28 #include <swmodule.hxx>
29 #include <view.hxx>
30 #include <docsh.hxx>
31 #include <wrtsh.hxx>
32 #include <viewopt.hxx>
33 #include <vcl/svapp.hxx>
34 #include <doc.hxx>
36 #include <com/sun/star/beans/PropertyAttribute.hpp>
37 #include <com/sun/star/view/DocumentZoomType.hpp>
40 #include <edtwin.hxx>
41 #include <rtl/ustrbuf.hxx>
42 #include <tools/urlobj.hxx>
43 using namespace ::com::sun::star;
44 using namespace ::com::sun::star::uno;
45 using namespace ::com::sun::star::beans;
46 using namespace ::com::sun::star::lang;
47 using namespace ::comphelper;
48 
50 {
95 };
96 
98 {
117 };
118 
119 static ChainablePropertySetInfo * lcl_createViewSettingsInfo()
120 {
121  static PropertyInfo const aViewSettingsMap_Impl[] =
122  {
124  { OUString( "HorizontalRulerMetric"),HANDLE_VIEWSET_HORI_RULER_METRIC , cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE},
125  { OUString( "IsRasterVisible"), HANDLE_VIEWSET_IS_RASTER_VISIBLE, cppu::UnoType<bool>::get(), PROPERTY_NONE},
126  { OUString( "IsSnapToRaster"), HANDLE_VIEWSET_IS_SNAP_TO_RASTER, cppu::UnoType<bool>::get(), PROPERTY_NONE},
127  { OUString( "IsVertRulerRightAligned"),HANDLE_VIEWSET_VRULER_RIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE},
128  { OUString( "ShowContentTips" ), HANDLE_VIEWSET_SHOW_CONTENT_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
129  { OUString( "ShowInlineTooltips" ), HANDLE_VIEWSET_INLINECHANGES_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
130  { OUString( "UseHeaderFooterMenu" ), HANDLE_VIEWSET_USE_HEADERFOOTERMENU , cppu::UnoType<bool>::get(), PROPERTY_NONE},
135  { OUString( "ShowAnnotations" ), HANDLE_VIEWSET_ANNOTATIONS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
136  { OUString( "ShowBreaks"), HANDLE_VIEWSET_BREAKS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
137  { OUString( "ShowDrawings"), HANDLE_VIEWSET_DRAWINGS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
138  { OUString( "ShowFieldCommands"), HANDLE_VIEWSET_FIELD_COMMANDS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
139  { OUString( "ShowFootnoteBackground"),HANDLE_VIEWSET_FOOTNOTE_BACKGROUND , cppu::UnoType<bool>::get(), PROPERTY_NONE},
140  { OUString( "ShowGraphics"), HANDLE_VIEWSET_GRAPHICS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
141  { OUString( "ShowHiddenCharacters"), HANDLE_VIEWSET_HIDDEN_CHARACTERS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
142  { OUString( "HideWhitespace"), HANDLE_VIEWSET_HIDE_WHITESPACE , cppu::UnoType<bool>::get(), PROPERTY_NONE},
143  { OUString( "ShowHiddenParagraphs"), HANDLE_VIEWSET_HIDDEN_PARAGRAPHS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
144  { OUString( "ShowHiddenText"), HANDLE_VIEWSET_HIDDEN_TEXT , cppu::UnoType<bool>::get(), PROPERTY_NONE},
145  { OUString( "ShowHoriRuler"), HANDLE_VIEWSET_HRULER , cppu::UnoType<bool>::get(), PROPERTY_NONE},
146  { OUString( "ShowHoriScrollBar"), HANDLE_VIEWSET_HSCROLL , cppu::UnoType<bool>::get(), PROPERTY_NONE},
147  { OUString( "ShowIndexMarkBackground"),HANDLE_VIEWSET_INDEX_MARK_BACKGROUND, cppu::UnoType<bool>::get(),PROPERTY_NONE},
148  { OUString( "ShowNonprintingCharacters"),HANDLE_VIEWSET_NONPRINTING_CHARACTERS, cppu::UnoType<bool>::get(),PROPERTY_NONE},
149  { OUString( "ShowOnlineLayout"), HANDLE_VIEWSET_ONLINE_LAYOUT , cppu::UnoType<bool>::get(), PropertyAttribute::MAYBEVOID},
150  { OUString( "ShowParaBreaks"), HANDLE_VIEWSET_PARA_BREAKS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
151  { OUString( "ShowProtectedSpaces"), HANDLE_VIEWSET_PROTECTED_SPACES , cppu::UnoType<bool>::get(), PROPERTY_NONE},
152  { OUString( "ShowRulers"), HANDLE_VIEWSET_SHOW_RULER , cppu::UnoType<bool>::get(), PROPERTY_NONE},
153  { OUString( "ShowScrollBarTips"), HANDLE_VIEWSET_SCROLLBAR_TIPS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
154  { OUString( "ShowSoftHyphens"), HANDLE_VIEWSET_SOFT_HYPHENS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
155  { OUString( "ShowSpaces"), HANDLE_VIEWSET_SPACES , cppu::UnoType<bool>::get(), PROPERTY_NONE},
156  { OUString( "ShowTableBoundaries"), HANDLE_VIEWSET_TABLE_BOUNDARIES , cppu::UnoType<bool>::get(), PROPERTY_NONE},
157  { OUString( "ShowTables"), HANDLE_VIEWSET_TABLES , cppu::UnoType<bool>::get(), PROPERTY_NONE},
158  { OUString( "ShowTabstops"), HANDLE_VIEWSET_TABSTOPS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
159  { OUString( "ShowTextBoundaries"), HANDLE_VIEWSET_TEXT_BOUNDARIES , cppu::UnoType<bool>::get(), PROPERTY_NONE},
160  { OUString( "ShowTextFieldBackground"),HANDLE_VIEWSET_TEXT_FIELD_BACKGROUND, cppu::UnoType<bool>::get(),PROPERTY_NONE},
161  { OUString( "ShowVertRuler"), HANDLE_VIEWSET_VRULER , cppu::UnoType<bool>::get(), PROPERTY_NONE},
162  { OUString( "ShowVertScrollBar"), HANDLE_VIEWSET_VSCROLL , cppu::UnoType<bool>::get(), PROPERTY_NONE},
163  { OUString( "SmoothScrolling"), HANDLE_VIEWSET_SMOOTH_SCROLLING , cppu::UnoType<bool>::get(), PROPERTY_NONE},
164  { OUString( "VerticalRulerMetric"), HANDLE_VIEWSET_VERT_RULER_METRIC , cppu::UnoType<sal_Int32>::get(), PROPERTY_NONE},
166  { OUString( "ZoomValue"), HANDLE_VIEWSET_ZOOM , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE},
167  { OUString(), 0, css::uno::Type(), 0 }
168  };
169  return new ChainablePropertySetInfo ( aViewSettingsMap_Impl );
170 }
171 
172 static ChainablePropertySetInfo * lcl_createPrintSettingsInfo()
173 {
174  static PropertyInfo const aPrintSettingsMap_Impl[] =
175  {
176  { OUString( "PrintAnnotationMode" ), HANDLE_PRINTSET_ANNOTATION_MODE , cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE},
177  { OUString( "PrintBlackFonts" ), HANDLE_PRINTSET_BLACK_FONTS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
178  { OUString( "PrintControls" ), HANDLE_PRINTSET_CONTROLS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
179  { OUString( "PrintDrawings" ), HANDLE_PRINTSET_DRAWINGS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
180  { OUString( "PrintGraphics" ), HANDLE_PRINTSET_GRAPHICS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
181  { OUString( "PrintHiddenText"), HANDLE_PRINTSET_HIDDEN_TEXT , cppu::UnoType<bool>::get(), PROPERTY_NONE},
182  { OUString( "PrintLeftPages" ), HANDLE_PRINTSET_LEFT_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE},
183  { OUString( "PrintPageBackground" ), HANDLE_PRINTSET_PAGE_BACKGROUND , cppu::UnoType<bool>::get(), PROPERTY_NONE},
184  { OUString( "PrintProspect" ), HANDLE_PRINTSET_PROSPECT , cppu::UnoType<bool>::get(), PROPERTY_NONE},
185  { OUString( "PrintProspectRTL" ), HANDLE_PRINTSET_PROSPECT_RTL , cppu::UnoType<bool>::get(), PROPERTY_NONE},
186  { OUString( "PrintReversed" ), HANDLE_PRINTSET_REVERSED , cppu::UnoType<bool>::get(), PROPERTY_NONE},
187  { OUString( "PrintRightPages" ), HANDLE_PRINTSET_RIGHT_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE},
188  { OUString( "PrintFaxName" ), HANDLE_PRINTSET_FAX_NAME , cppu::UnoType<OUString>::get(), PROPERTY_NONE},
189  { OUString( "PrintPaperFromSetup" ), HANDLE_PRINTSET_PAPER_FROM_SETUP , cppu::UnoType<bool>::get(), PROPERTY_NONE},
190  { OUString( "PrintTables" ), HANDLE_PRINTSET_TABLES , cppu::UnoType<bool>::get(), PROPERTY_NONE},
191  { OUString( "PrintTextPlaceholder"), HANDLE_PRINTSET_PLACEHOLDER , cppu::UnoType<bool>::get(), PROPERTY_NONE},
192  { OUString( "PrintSingleJobs" ), HANDLE_PRINTSET_SINGLE_JOBS , cppu::UnoType<bool>::get(), PROPERTY_NONE},
193  { OUString( "PrintEmptyPages" ), HANDLE_PRINTSET_EMPTY_PAGES , cppu::UnoType<bool>::get(), PROPERTY_NONE},
194  { OUString(), 0, css::uno::Type(), 0}
195  };
196  return new ChainablePropertySetInfo ( aPrintSettingsMap_Impl );
197 }
198 
200  mxViewSettings(),
201  mxPrintSettings()
202 {
203 }
204 
206 {
207 }
208 
209 Reference< XPropertySet > SwXModule::getViewSettings()
210 {
211  SolarMutexGuard aGuard;
212  if(!mxViewSettings.is())
213  {
214  OSL_FAIL("Web or Text?");
215  mxViewSettings = new SwXViewSettings( nullptr );
216  }
217  return mxViewSettings;
218 }
219 
220 Reference< XPropertySet > SwXModule::getPrintSettings()
221 {
222  SolarMutexGuard aGuard;
223  if(!mxPrintSettings.is())
224  {
225  OSL_FAIL("Web or Text?");
227  }
228  return mxPrintSettings;
229 }
230 
232 {
233  return OUString( "SwXModule" );
234 }
235 
236 sal_Bool SwXModule::supportsService(const OUString& rServiceName)
237 {
238  return cppu::supportsService(this, rServiceName);
239 }
240 
242 {
243  OUString sService( "com.sun.star.text.GlobalSettings");
244  const Sequence< OUString > aSeq( &sService, 1 );
245  return aSeq;
246 }
247 
249 : ChainablePropertySet ( lcl_createPrintSettingsInfo (), &Application::GetSolarMutex() )
250 , meType(eType)
251 , mpPrtOpt ( nullptr )
252 , mpDoc ( pDoc )
253 {
254 }
255 
257  throw()
258 {
259 }
260 
262 {
263  switch (meType)
264  {
266  mpPrtOpt = SW_MOD()->GetPrtOptions( false );
267  break;
269  {
270  if (!mpDoc)
271  throw IllegalArgumentException ();
273  }
274  break;
275  }
276 }
277 
278 namespace
279 {
280  bool tryBoolAccess(const uno::Any &rValue)
281  {
282  const auto xPrSet = o3tl::tryAccess<bool>(rValue);
283  if (!xPrSet)
284  throw lang::IllegalArgumentException();
285  return *xPrSet;
286  }
287 }
288 
290 {
291  switch( rInfo.mnHandle )
292  {
294  {
295  mpPrtOpt->SetPrintLeftPage(tryBoolAccess(rValue));
296  }
297  break;
299  {
300  mpPrtOpt->SetPrintRightPage(tryBoolAccess(rValue));
301  }
302  break;
304  {
305  mpPrtOpt->SetPrintReverse(tryBoolAccess(rValue));
306  }
307  break;
309  {
310  mpPrtOpt->SetPrintProspect(tryBoolAccess(rValue));
311  }
312  break;
314  {
315  mpPrtOpt->SetPrintGraphic(tryBoolAccess(rValue));
316  }
317  break;
319  {
320  mpPrtOpt->SetPrintTable(tryBoolAccess(rValue));
321  }
322  break;
324  {
325  mpPrtOpt->SetPrintDraw(tryBoolAccess(rValue));
326  }
327  break;
329  {
330  mpPrtOpt->SetPrintControl(tryBoolAccess(rValue));
331  }
332  break;
334  {
335  mpPrtOpt->SetPrintPageBackground(tryBoolAccess(rValue));
336  }
337  break;
339  {
340  mpPrtOpt->SetPrintBlackFont(tryBoolAccess(rValue));
341  }
342  break;
344  {
345  mpPrtOpt->SetPrintSingleJobs(tryBoolAccess(rValue));
346  }
347  break;
349  {
350  mpPrtOpt->SetPaperFromSetup(tryBoolAccess(rValue));
351  }
352  break;
354  {
355  sal_Int16 nTmp = 0;
356  rValue >>= nTmp;
357  SwPostItMode nVal = static_cast<SwPostItMode>(nTmp);
358  if(nVal > SwPostItMode::EndPage)
359  throw lang::IllegalArgumentException();
360 
361  mpPrtOpt->SetPrintPostIts(nVal);
362  }
363  break;
365  {
366  mpPrtOpt->SetPrintEmptyPages(tryBoolAccess(rValue));
367  }
368  break;
370  {
371  OUString sString;
372  if ( !(rValue >>= sString))
373  throw lang::IllegalArgumentException();
374 
375  mpPrtOpt->SetFaxName(sString);
376  }
377  break;
379  {
380  mpPrtOpt->SetPrintProspect_RTL(tryBoolAccess(rValue));
381  }
382  break;
384  {
385  mpPrtOpt->SetPrintTextPlaceholder(tryBoolAccess(rValue));
386  }
387  break;
389  {
390  mpPrtOpt->SetPrintHiddenText(tryBoolAccess(rValue));
391  }
392  break;
393  default:
394  throw UnknownPropertyException();
395  }
396 }
397 
399 {
400  mpPrtOpt = nullptr;
401 }
402 
404 {
405  switch (meType)
406  {
408  mpPrtOpt = SW_MOD()->GetPrtOptions( false );
409  break;
411  {
412  if (!mpDoc)
413  throw IllegalArgumentException ();
415  }
416  break;
417  }
418 }
419 
421 {
422  switch( rInfo.mnHandle )
423  {
425  rValue <<= mpPrtOpt->IsPrintLeftPage();
426  break;
428  rValue <<= mpPrtOpt->IsPrintRightPage();
429  break;
431  rValue <<= mpPrtOpt->IsPrintReverse();
432  break;
434  rValue <<= mpPrtOpt->IsPrintProspect();
435  break;
437  rValue <<= mpPrtOpt->IsPrintGraphic();
438  break;
440  rValue <<= mpPrtOpt->IsPrintTable();
441  break;
443  rValue <<= mpPrtOpt->IsPrintDraw();
444  break;
446  rValue <<= mpPrtOpt->IsPrintControl();
447  break;
449  rValue <<= mpPrtOpt->IsPrintPageBackground();
450  break;
452  rValue <<= mpPrtOpt->IsPrintBlackFont();
453  break;
455  rValue <<= mpPrtOpt->IsPrintSingleJobs();
456  break;
458  rValue <<= mpPrtOpt->IsPrintEmptyPages();
459  break;
461  rValue <<= mpPrtOpt->IsPaperFromSetup();
462  break;
464  {
465  rValue <<= static_cast < sal_Int16 > ( mpPrtOpt->GetPrintPostIts() );
466  }
467  break;
469  {
470  rValue <<= mpPrtOpt->GetFaxName();
471  }
472  break;
474  {
475  rValue <<= mpPrtOpt->IsPrintProspectRTL();
476  }
477  break;
479  {
480  rValue <<= mpPrtOpt->IsPrintTextPlaceholder();
481  }
482  break;
484  {
485  rValue <<= mpPrtOpt->IsPrintHiddenText();
486  }
487  break;
488  default:
489  throw UnknownPropertyException();
490  }
491 }
492 
494 {
495  mpPrtOpt = nullptr;
496 }
497 
499 {
500  return OUString("SwXPrintSettings");
501 }
502 
503 sal_Bool SwXPrintSettings::supportsService(const OUString& rServiceName)
504 {
505  return cppu::supportsService(this, rServiceName);
506 }
507 
509 {
510  Sequence<OUString> aRet { "com.sun.star.text.PrintSettings" };
511  return aRet;
512 }
513 
515  : ChainablePropertySet( lcl_createViewSettingsInfo (), &Application::GetSolarMutex() )
516  , pView(pVw)
517  , mpConstViewOption(nullptr)
518  , bObjectValid(true)
519  , mbApplyZoom(false)
520  , eHRulerUnit(FieldUnit::CM)
521  , mbApplyHRulerMetric(false)
522  , eVRulerUnit(FieldUnit::CM)
523  , mbApplyVRulerMetric(false)
524 {
525  // This property only exists if we have a view (ie, not at the module )
526  if ( !pView )
527  mxInfo->remove ( "HelpURL" );
528 
529 }
530 
532  throw()
533 {
534 
535 }
536 
538 {
539  const SwViewOption* pVOpt = nullptr;
540  if(pView)
541  {
542  if(!IsValid())
543  return;
544  pVOpt = pView->GetWrtShell().GetViewOptions();
545  }
546  else
547  pVOpt = SW_MOD()->GetViewOption(false);
548 
549  mpViewOption.reset( new SwViewOption (*pVOpt) );
550  mbApplyZoom = false;
551  if(pView)
552  mpViewOption->SetStarOneSetting(true);
553 }
554 
556 {
557  // the API flag should not be set to the application's view settings
558  switch( rInfo.mnHandle )
559  {
560  case HANDLE_VIEWSET_SHOW_RULER : mpViewOption->SetViewAnyRuler(*o3tl::doAccess<bool>(rValue)); break;
561  case HANDLE_VIEWSET_HRULER : mpViewOption->SetViewHRuler(*o3tl::doAccess<bool>(rValue)); break;
562  case HANDLE_VIEWSET_VRULER : mpViewOption->SetViewVRuler(*o3tl::doAccess<bool>(rValue));break;
563  case HANDLE_VIEWSET_VRULER_RIGHT : mpViewOption->SetVRulerRight(*o3tl::doAccess<bool>(rValue));break;
564  case HANDLE_VIEWSET_HSCROLL : mpViewOption->SetViewHScrollBar(*o3tl::doAccess<bool>(rValue));break;
565  case HANDLE_VIEWSET_VSCROLL : mpViewOption->SetViewVScrollBar(*o3tl::doAccess<bool>(rValue));break;
566  case HANDLE_VIEWSET_GRAPHICS : mpViewOption->SetGraphic(*o3tl::doAccess<bool>(rValue));break;
567  case HANDLE_VIEWSET_TABLES : mpViewOption->SetTable(*o3tl::doAccess<bool>(rValue)); break;
568  case HANDLE_VIEWSET_DRAWINGS : mpViewOption->SetDraw(*o3tl::doAccess<bool>(rValue)); break;
569  case HANDLE_VIEWSET_FIELD_COMMANDS : mpViewOption->SetFieldName(*o3tl::doAccess<bool>(rValue)); break;
570  case HANDLE_VIEWSET_ANNOTATIONS : mpViewOption->SetPostIts(*o3tl::doAccess<bool>(rValue)); break;
572  case HANDLE_VIEWSET_NONPRINTING_CHARACTERS: mpViewOption->SetViewMetaChars( *o3tl::doAccess<bool>(rValue) ); break;
573  case HANDLE_VIEWSET_FOOTNOTE_BACKGROUND : SwViewOption::SetAppearanceFlag(ViewOptFlags::FieldShadings, *o3tl::doAccess<bool>(rValue), true); break;
575  case HANDLE_VIEWSET_PARA_BREAKS : mpViewOption->SetParagraph(*o3tl::doAccess<bool>(rValue)); break;
576  case HANDLE_VIEWSET_SOFT_HYPHENS : mpViewOption->SetSoftHyph(*o3tl::doAccess<bool>(rValue)); break;
577  case HANDLE_VIEWSET_SPACES : mpViewOption->SetBlank(*o3tl::doAccess<bool>(rValue)); break;
578  case HANDLE_VIEWSET_PROTECTED_SPACES : mpViewOption->SetHardBlank(*o3tl::doAccess<bool>(rValue)); break;
579  case HANDLE_VIEWSET_TABSTOPS : mpViewOption->SetTab(*o3tl::doAccess<bool>(rValue)); break;
580  case HANDLE_VIEWSET_BREAKS : mpViewOption->SetLineBreak(*o3tl::doAccess<bool>(rValue)); break;
581  case HANDLE_VIEWSET_HIDDEN_TEXT : mpViewOption->SetShowHiddenField(*o3tl::doAccess<bool>(rValue)); break;
582  case HANDLE_VIEWSET_HIDDEN_CHARACTERS : mpViewOption->SetShowHiddenChar(*o3tl::doAccess<bool>(rValue)); break;
583  case HANDLE_VIEWSET_HIDDEN_PARAGRAPHS : mpViewOption->SetShowHiddenPara(*o3tl::doAccess<bool>(rValue)); break;
584  case HANDLE_VIEWSET_TABLE_BOUNDARIES : SwViewOption::SetAppearanceFlag(ViewOptFlags::TableBoundaries, *o3tl::doAccess<bool>(rValue), true); break;
585  case HANDLE_VIEWSET_TEXT_BOUNDARIES : SwViewOption::SetDocBoundaries(*o3tl::doAccess<bool>(rValue)); break;
586  case HANDLE_VIEWSET_SMOOTH_SCROLLING : mpViewOption->SetSmoothScroll(*o3tl::doAccess<bool>(rValue)); break;
587  case HANDLE_VIEWSET_SHOW_CONTENT_TIPS : mpViewOption->SetShowContentTips(*o3tl::doAccess<bool>(rValue)); break;
588  case HANDLE_VIEWSET_IS_RASTER_VISIBLE : mpViewOption->SetGridVisible(*o3tl::doAccess<bool>(rValue)); break;
589  case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : mpViewOption->SetSnap(*o3tl::doAccess<bool>(rValue)); break;
590  case HANDLE_VIEWSET_SCROLLBAR_TIPS : mpViewOption->SetShowScrollBarTips(*o3tl::doAccess<bool>(rValue)); break;
591  case HANDLE_VIEWSET_INLINECHANGES_TIPS : mpViewOption->SetShowInlineTooltips(*o3tl::doAccess<bool>(rValue)); break;
592  case HANDLE_VIEWSET_USE_HEADERFOOTERMENU : mpViewOption->SetUseHeaderFooterMenu(*o3tl::doAccess<bool>(rValue)); break;
594  {
595  sal_Int32 nTmp = 0;
596  if(!(rValue >>= nTmp) || nTmp < 10)
597  throw IllegalArgumentException();
598  Size aSize( mpViewOption->GetSnapSize() );
599  aSize.setWidth( convertMm100ToTwip( nTmp ) );
600  mpViewOption->SetSnapSize( aSize );
601  }
602  break;
604  {
605  sal_Int32 nTmp = 0;
606  if(!(rValue >>= nTmp) || nTmp < 10)
607  throw IllegalArgumentException();
608  Size aSize( mpViewOption->GetSnapSize() );
609  aSize.setHeight( convertMm100ToTwip( nTmp ) );
610  mpViewOption->SetSnapSize( aSize );
611  }
612  break;
614  {
615  sal_Int32 nTmp = 0;
616  if(!(rValue >>= nTmp) || !(0 <= nTmp && nTmp < 100))
617  throw IllegalArgumentException();
618  mpViewOption->SetDivisionX( static_cast<short>(nTmp) );
619  }
620  break;
622  {
623  sal_Int32 nTmp = 0;
624  if(!(rValue >>= nTmp) || !(0 <= nTmp && nTmp < 100))
625  throw IllegalArgumentException();
626  mpViewOption->SetDivisionY( static_cast<short>(nTmp) );
627  }
628  break;
629  case HANDLE_VIEWSET_ZOOM :
630  {
631  sal_Int16 nZoom = 0;
632  if(!(rValue >>= nZoom) || nZoom > MAXZOOM || nZoom < MINZOOM)
633  throw lang::IllegalArgumentException();
634  mpViewOption->SetZoom(static_cast<sal_uInt16>(nZoom));
635  mbApplyZoom = true;
636  }
637  break;
639  {
640  sal_Int16 nZoom = 0;
641  if(!(rValue >>= nZoom))
642  throw IllegalArgumentException();
643  SvxZoomType eZoom;
644  switch (nZoom)
645  {
646  case view::DocumentZoomType::OPTIMAL:
647  eZoom = SvxZoomType::OPTIMAL;
648  break;
649  case view::DocumentZoomType::PAGE_WIDTH:
650  eZoom = SvxZoomType::PAGEWIDTH;
651  break;
652  case view::DocumentZoomType::ENTIRE_PAGE:
653  eZoom = SvxZoomType::WHOLEPAGE;
654  break;
655  case view::DocumentZoomType::BY_VALUE:
656  eZoom = SvxZoomType::PERCENT;
657  break;
658  case view::DocumentZoomType::PAGE_WIDTH_EXACT:
659  eZoom = SvxZoomType::PAGEWIDTH_NOBORDER;
660  break;
661  default:
662  throw IllegalArgumentException(
663  "SwXViewSettings: invalid zoom type", nullptr, 0);
664  }
665  mpViewOption->SetZoomType( eZoom );
666  mbApplyZoom = true;
667  }
668  break;
670  {
671  if ( pView )
672  {
673  bool bVal = *o3tl::doAccess<bool>(rValue);
675  if (!bVal != !aOpt.getBrowseMode())
676  {
677  aOpt.setBrowseMode( bVal );
679 
680  // must be set in mpViewOption as this will overwrite settings in _post!
681  if(mpViewOption)
682  mpViewOption->setBrowseMode(bVal);
683 
685  }
686  }
687  }
688  break;
690  {
691  if ( pView )
692  {
693  bool bVal = *o3tl::doAccess<bool>(rValue);
695  if (!bVal != !aOpt.IsHideWhitespaceMode())
696  {
697  aOpt.SetHideWhitespaceMode( bVal );
699 
700  // must be set in mpViewOption as this will overwrite settings in _post!
701  if(mpViewOption)
702  mpViewOption->SetHideWhitespaceMode(bVal);
703  }
704  }
705  }
706  break;
708  {
709  if ( !pView )
710  throw UnknownPropertyException();
711 
712  OUString sHelpURL;
713  if ( ! ( rValue >>= sHelpURL ) )
714  throw IllegalArgumentException();
715 
716  INetURLObject aHID( sHelpURL );
717  if ( aHID.GetProtocol() != INetProtocol::Hid )
718  throw IllegalArgumentException ();
719 
720  pView->GetEditWin().SetHelpId( OUStringToOString( aHID.GetURLPath(), RTL_TEXTENCODING_UTF8 ) );
721  }
722  break;
725  {
726  sal_uInt16 nUnit;
727  if( rValue >>= nUnit )
728  switch (static_cast<FieldUnit>(nUnit))
729  {
730  case FieldUnit::MM:
731  case FieldUnit::CM:
732  case FieldUnit::POINT:
733  case FieldUnit::PICA:
734  case FieldUnit::INCH:
736  {
737  eHRulerUnit = static_cast<FieldUnit>(nUnit);
738  mbApplyHRulerMetric = true;
739  }
740  else
741  {
742  eVRulerUnit = static_cast<FieldUnit>(nUnit);
743  mbApplyVRulerMetric = true;
744  }
745  break;
746  default:
747  throw IllegalArgumentException();
748  }
749  }
750  break;
751  default:
752  throw UnknownPropertyException();
753  }
754 }
755 
757 {
758  if( pView )
759  {
760  if(mbApplyZoom )
761  pView->SetZoom( mpViewOption->GetZoomType(),
762  mpViewOption->GetZoom(), true );
767 
768  }
769  else
770  {
772  SW_MOD()->ApplyRulerMetric( eHRulerUnit, true, false );
774  SW_MOD()->ApplyRulerMetric( eVRulerUnit, false, false );
775  }
776 
779 
780  mpViewOption.reset();
781 }
782 
784 {
785  if(pView)
786  {
787  if(!IsValid())
788  return;
790  }
791  else
792  mpConstViewOption = SW_MOD()->GetViewOption(false);
793 }
794 
796 {
797  bool bBool = true;
798  bool bBoolVal = false;
799  switch( rInfo.mnHandle )
800  {
802  case HANDLE_VIEWSET_HRULER : bBoolVal = mpConstViewOption->IsViewHRuler(true); break;
803  case HANDLE_VIEWSET_VRULER : bBoolVal = mpConstViewOption->IsViewVRuler(true);break;
807  case HANDLE_VIEWSET_GRAPHICS : bBoolVal = mpConstViewOption->IsGraphic();break;
808  case HANDLE_VIEWSET_TABLES : bBoolVal = mpConstViewOption->IsTable(); break;
809  case HANDLE_VIEWSET_DRAWINGS : bBoolVal = mpConstViewOption->IsDraw(); break;
810  case HANDLE_VIEWSET_FIELD_COMMANDS : bBoolVal = mpConstViewOption->IsFieldName(); break;
811  case HANDLE_VIEWSET_ANNOTATIONS : bBoolVal = mpConstViewOption->IsPostIts(); break;
816  case HANDLE_VIEWSET_PARA_BREAKS : bBoolVal = mpConstViewOption->IsParagraph(true); break;
817  case HANDLE_VIEWSET_SOFT_HYPHENS : bBoolVal = mpConstViewOption->IsSoftHyph(); break;
818  case HANDLE_VIEWSET_SPACES : bBoolVal = mpConstViewOption->IsBlank(true); break;
820  case HANDLE_VIEWSET_TABSTOPS : bBoolVal = mpConstViewOption->IsTab(true); break;
821  case HANDLE_VIEWSET_BREAKS : bBoolVal = mpConstViewOption->IsLineBreak(true); break;
832  case HANDLE_VIEWSET_IS_SNAP_TO_RASTER : bBoolVal = mpConstViewOption->IsSnap(); break;
835  bBool = false;
836  rValue <<= static_cast<sal_Int32>(convertTwipToMm100(mpConstViewOption->GetSnapSize().Width()));
837  break;
839  bBool = false;
840  rValue <<= static_cast<sal_Int32>(convertTwipToMm100(mpConstViewOption->GetSnapSize().Height()));
841  break;
843  bBool = false;
844  rValue <<= static_cast<sal_Int32>(mpConstViewOption->GetDivisionX());
845  break;
847  bBool = false;
848  rValue <<= static_cast<sal_Int32>(mpConstViewOption->GetDivisionY());
849  break;
850  case HANDLE_VIEWSET_ZOOM :
851  bBool = false;
852  rValue <<= static_cast<sal_Int16>(mpConstViewOption->GetZoom());
853  break;
855  {
856  bBool = false;
857  sal_Int16 nRet(0);
858  switch (mpConstViewOption->GetZoomType())
859  {
860  case SvxZoomType::OPTIMAL:
861  nRet = view::DocumentZoomType::OPTIMAL;
862  break;
863  case SvxZoomType::PAGEWIDTH:
864  nRet = view::DocumentZoomType::PAGE_WIDTH;
865  break;
866  case SvxZoomType::WHOLEPAGE:
867  nRet = view::DocumentZoomType::ENTIRE_PAGE;
868  break;
869  case SvxZoomType::PERCENT:
870  nRet = view::DocumentZoomType::BY_VALUE;
871  break;
872  case SvxZoomType::PAGEWIDTH_NOBORDER:
873  nRet = view::DocumentZoomType::PAGE_WIDTH_EXACT;
874  break;
875  default:
876  OSL_FAIL("SwXViewSettings: invalid zoom type");
877  break;
878  }
879  rValue <<= nRet;
880  }
881  break;
883  if(pView)
884  bBoolVal = pView->GetWrtShell().GetViewOptions()->getBrowseMode();
885  break;
887  {
888  if ( !pView )
889  throw UnknownPropertyException();
890 
891  bBool = false;
892  OUStringBuffer sHelpURL;
893  sHelpURL.append ( INET_HID_SCHEME );
894  SwEditWin &rEditWin = pView->GetEditWin();
895  sHelpURL.append( OUString::fromUtf8( rEditWin.GetHelpId() ) );
896  rValue <<= sHelpURL.makeStringAndClear();
897  }
898  break;
900  {
901  if ( pView )
902  {
903  FieldUnit eUnit;
904  pView->GetHRulerMetric( eUnit );
905  rValue <<= static_cast<sal_Int32>(eUnit);
906  }
907  else
908  {
909  const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref( false );
910  rValue <<= static_cast<sal_Int32>(pUsrPref->GetHScrollMetric());
911  }
912  bBool = false;
913  }
914  break;
916  {
917  if ( pView )
918  {
919  FieldUnit eUnit;
920  pView->GetVRulerMetric( eUnit );
921  rValue <<= static_cast<sal_Int32>(eUnit);
922  }
923  else
924  {
925  const SwMasterUsrPref* pUsrPref = SW_MOD()->GetUsrPref( false );
926  rValue <<= static_cast<sal_Int32>(pUsrPref->GetVScrollMetric());
927  }
928  bBool = false;
929  }
930  break;
931  default: OSL_FAIL("there is no such ID!");
932  }
933  if( bBool )
934  rValue <<= bBoolVal;
935 }
936 
938 {
939  mpConstViewOption = nullptr;
940 }
941 
943 {
944  return OUString("SwXViewSettings");
945 }
946 
947 sal_Bool SwXViewSettings::supportsService(const OUString& rServiceName)
948 {
949  return cppu::supportsService(this, rServiceName);
950 }
951 
953 {
954  Sequence<OUString> aRet { "com.sun.star.text.ViewSettings" };
955  return aRet;
956 }
957 
958 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
959 SwXModule_get_implementation(css::uno::XComponentContext*,
960  css::uno::Sequence<css::uno::Any> const &)
961 {
962  return cppu::acquire(new SwXModule());
963 }
964 
965 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool IsPaperFromSetup() const
Definition: printdata.hxx:138
css::uno::Reference< css::beans::XPropertySet > mxPrintSettings
Definition: unomod.hxx:47
void SetPrintPostIts(SwPostItMode n)
Definition: printdata.hxx:159
long Width() const
#define MAXZOOM
Definition: view.hxx:83
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unomod.cxx:236
static ChainablePropertySetInfo * lcl_createPrintSettingsInfo()
Definition: unomod.cxx:172
bool IsViewMetaChars() const
Definition: viewopt.hxx:329
bool IsSmoothScroll() const
Definition: viewopt.hxx:357
#define MINZOOM
Definition: view.hxx:82
FieldUnit
bool IsShowScrollBarTips() const
Definition: viewopt.hxx:497
static ChainablePropertySetInfo * lcl_createViewSettingsInfo()
Definition: unomod.cxx:119
void GetHRulerMetric(FieldUnit &rToFill) const
Definition: viewmdi.cxx:602
FieldUnit GetVScrollMetric() const
Definition: usrpref.hxx:225
void SetPrintLeftPage(bool b)
Definition: printdata.hxx:154
void SetPrintRightPage(bool b)
Definition: printdata.hxx:155
static bool IsDocBoundaries()
Definition: viewopt.hxx:619
SwPostItMode GetPrintPostIts() const
Definition: printdata.hxx:145
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unomod.cxx:503
bool IsShowContentTips() const
Definition: viewopt.hxx:493
bool IsViewAnyRuler() const
Definition: viewopt.hxx:535
PrimitiveType meType
SwXPrintSettingsType const meType
Definition: unomod.hxx:76
SwXModule()
Definition: unomod.cxx:199
IDocumentDeviceAccess const & getIDocumentDeviceAccess() const
Definition: doc.cxx:270
void ToggleLayoutMode(SwView *pView)
Definition: docsh2.cxx:172
long Height() const
void SetPrintControl(bool b)
Definition: printdata.hxx:153
bool IsGraphic() const
Definition: viewopt.hxx:287
void ChangeTabMetric(FieldUnit eUnit)
Definition: viewmdi.cxx:579
OUString GetURLPath(DecodeMechanism eMechanism=DecodeMechanism::ToIUri, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) const
void SetPrintTextPlaceholder(bool b)
Definition: printdata.hxx:167
bool IsPostIts() const
Definition: viewopt.hxx:255
static void SetDocBoundaries(bool bSet)
Definition: viewopt.hxx:631
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getPrintSettings() override
Definition: unomod.cxx:220
FieldUnit eVRulerUnit
Definition: unomod.hxx:111
Definition: doc.hxx:185
bool IsPrintTable() const
Definition: printdata.hxx:132
bool IsHardBlank() const
Definition: viewopt.hxx:223
SwEditWin & GetEditWin()
Definition: view.hxx:403
virtual ~SwXViewSettings() override
Definition: unomod.cxx:531
void SetHelpId(const OString &)
bool IsShowHiddenPara() const
Definition: viewopt.hxx:351
virtual OUString SAL_CALL getImplementationName() override
Definition: unomod.cxx:498
bool IsPrintProspectRTL() const
Definition: printdata.hxx:141
void SetPrintGraphic(bool b)
Definition: printdata.hxx:150
bool mbApplyZoom
Definition: unomod.hxx:107
bool IsPrintHiddenText() const
Definition: printdata.hxx:147
FieldUnit GetHScrollMetric() const
Definition: usrpref.hxx:217
SwWrtShell & GetWrtShell() const
Definition: view.hxx:400
virtual void _postSetValues() override
Definition: unomod.cxx:756
SvxZoomType GetZoomType() const
Definition: viewopt.hxx:500
bool IsPrintReverse() const
Definition: printdata.hxx:137
virtual void _preGetValues() override
Definition: unomod.cxx:783
SwXPrintSettingsType
Definition: unomod.hxx:66
SwXPrintSettings(SwXPrintSettingsType eType, SwDoc *pDoc=nullptr)
Definition: unomod.cxx:248
bool IsFieldName() const
Definition: viewopt.hxx:251
#define PROPERTY_NONE
Definition: unomap.hxx:27
SwXViewSettings(SwView *pView)
Definition: unomod.cxx:514
const OUString & GetFaxName() const
Definition: printdata.hxx:146
short GetDivisionX() const
Definition: viewopt.hxx:398
bool getBrowseMode() const
Definition: viewopt.hxx:426
short GetDivisionY() const
Definition: viewopt.hxx:400
virtual ~SwXPrintSettings() override
Definition: unomod.cxx:256
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
void setBrowseMode(bool bSet)
Definition: viewopt.hxx:427
bool mbApplyHRulerMetric
Definition: unomod.hxx:110
bool IsViewVScrollBar() const
Definition: viewopt.hxx:473
bool IsPrintGraphic() const
Definition: printdata.hxx:131
virtual void _preSetValues() override
Definition: unomod.cxx:261
void SetPrintEmptyPages(bool b)
Definition: printdata.hxx:158
bool IsViewHRuler(bool bDirect=false) const
Definition: viewopt.hxx:546
void SetFaxName(const OUString &rSet)
Definition: printdata.hxx:165
bool IsPrintPageBackground() const
Definition: printdata.hxx:142
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unomod.cxx:952
#define INET_HID_SCHEME
bool IsBlank(bool bHard=false) const
Definition: viewopt.hxx:217
virtual void _postGetValues() override
Definition: unomod.cxx:937
void SetHideWhitespaceMode(bool bMode)
Definition: viewopt.hxx:438
static void SetAppearanceFlag(ViewOptFlags nFlag, bool bSet, bool bSaveInConfig=false)
Definition: viewopt.cxx:523
void SetPrintProspect_RTL(bool b)
Definition: printdata.hxx:161
const OString & GetHelpId() const
void SetPrintBlackFont(bool b)
Definition: printdata.hxx:163
bool IsPrintRightPage() const
Definition: printdata.hxx:136
virtual void _setSingleValue(const comphelper::PropertyInfo &rInfo, const css::uno::Any &rValue) override
Definition: unomod.cxx:555
bool IsDraw() const
Definition: viewopt.hxx:302
#define SW_MOD()
Definition: swmodule.hxx:255
void SetPrintHiddenText(bool b)
Definition: printdata.hxx:166
virtual const SwPrintData & getPrintData() const =0
Returns the PrintData.
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:59
bool IsPrintSingleJobs() const
Definition: printdata.hxx:144
void SetPrintReverse(bool b)
Definition: printdata.hxx:156
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getViewSettings() override
Definition: unomod.cxx:209
bool IsParagraph(bool bHard=false) const
Definition: viewopt.hxx:228
bool IsViewVRuler(bool bDirect=false) const
Definition: viewopt.hxx:560
void SetPrintTable(bool b)
Definition: printdata.hxx:151
bool mbApplyVRulerMetric
Definition: unomod.hxx:112
unsigned char sal_Bool
bool IsTab(bool bHard=false) const
Definition: viewopt.hxx:211
SwView * pView
Definition: unomod.hxx:104
void SetPaperFromSetup(bool b)
Definition: printdata.hxx:157
bool IsPrintControl() const
Definition: printdata.hxx:134
virtual OUString SAL_CALL getImplementationName() override
Definition: unomod.cxx:231
css::uno::Type const & get()
bool IsLineBreak(bool bHard=false) const
Definition: viewopt.hxx:234
virtual void _postGetValues() override
Definition: unomod.cxx:493
void SetPrintPageBackground(bool b)
Definition: printdata.hxx:162
bool IsPrintTextPlaceholder() const
Definition: printdata.hxx:148
static bool IsFieldShadings()
Definition: viewopt.hxx:625
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unomod.cxx:508
bool IsPrintBlackFont() const
Definition: printdata.hxx:143
SwPostItMode
this must match the definitions in css::text::NotePrintMode
Definition: printdata.hxx:42
SwDocShell * GetDocShell()
Definition: view.cxx:1115
bool IsTable() const
Definition: viewopt.hxx:297
const SwViewOption * mpConstViewOption
Definition: unomod.hxx:106
OString OUStringToOString(const OUString &str, ConnectionSettings const *settings)
bool IsHideWhitespaceMode() const
Definition: viewopt.hxx:437
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unomod.cxx:947
virtual OUString SAL_CALL getImplementationName() override
Definition: unomod.cxx:942
bool IsVRulerRight() const
Definition: viewopt.hxx:581
void SetZoom(SvxZoomType eZoomType, short nFactor=100, bool bViewOnly=false)
Definition: viewmdi.cxx:82
virtual ~SwXModule() override
Definition: unomod.cxx:205
virtual void _getSingleValue(const comphelper::PropertyInfo &rInfo, css::uno::Any &rValue) override
Definition: unomod.cxx:420
SwPrintSettingsPropertyHandles
Definition: unomod.cxx:97
void SetPrintSingleJobs(bool b)
Definition: printdata.hxx:164
bool IsPrintDraw() const
Definition: printdata.hxx:133
bool IsShowInlineTooltips() const
Definition: viewopt.hxx:264
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:426
bool IsPrintEmptyPages() const
Definition: printdata.hxx:139
bool IsValid() const
Definition: unomod.hxx:132
const Size & GetSnapSize() const
Definition: viewopt.hxx:318
INetProtocol GetProtocol() const
SwPrintData * mpPrtOpt
Definition: unomod.hxx:77
css::uno::Reference< css::beans::XPropertySet > mxViewSettings
Definition: unomod.hxx:46
void ChangeVRulerMetric(FieldUnit eUnit)
Definition: viewmdi.cxx:588
sal_uInt16 GetZoom() const
Definition: viewopt.hxx:459
static bool IsTableBoundaries()
Definition: viewopt.hxx:621
virtual void _preSetValues() override
Definition: unomod.cxx:537
void GetVRulerMetric(FieldUnit &rToFill) const
Definition: viewmdi.cxx:597
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unomod.cxx:241
virtual void _getSingleValue(const comphelper::PropertyInfo &rInfo, css::uno::Any &rValue) override
Definition: unomod.cxx:795
bool IsSoftHyph() const
Definition: viewopt.hxx:246
void SetPrintProspect(bool b)
Definition: printdata.hxx:160
rtl::Reference< ChainablePropertySetInfo > mxInfo
constexpr sal_Int64 convertTwipToMm100(sal_Int64 n)
bool IsGridVisible() const
Definition: viewopt.hxx:320
std::unique_ptr< SwViewOption > mpViewOption
Definition: unomod.hxx:105
SwViewSettingsPropertyHandles
Definition: unomod.cxx:49
detail::Optional< bool >::type tryAccess< bool >(css::uno::Any const &any)
SvxZoomType
FieldUnit eHRulerUnit
Definition: unomod.hxx:109
bool IsShowHiddenChar(bool bHard=false) const
Definition: viewopt.hxx:275
SwDoc * mpDoc
Definition: unomod.hxx:78
bool IsShowHiddenField() const
Definition: viewopt.hxx:282
bool IsPrintLeftPage() const
Definition: printdata.hxx:135
virtual void _preGetValues() override
Definition: unomod.cxx:403
bool IsPrintProspect() const
Definition: printdata.hxx:140
constexpr sal_Int64 convertMm100ToTwip(sal_Int64 n)
bool IsSnap() const
Definition: viewopt.hxx:312
virtual void ApplyViewOptions(const SwViewOption &rOpt) override
Apply ViewOptions with Start-/EndAction.
Definition: wrtsh1.cxx:1765
void SetPrintDraw(bool b)
Definition: printdata.hxx:152
bool IsViewHScrollBar() const
Definition: viewopt.hxx:481
virtual void _postSetValues() override
Definition: unomod.cxx:398
void setWidth(long nWidth)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SwXModule_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: unomod.cxx:959
virtual void _setSingleValue(const comphelper::PropertyInfo &rInfo, const css::uno::Any &rValue) override
Definition: unomod.cxx:289
sal_Int32 const mnHandle
Definition: view.hxx:146
void setHeight(long nHeight)