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