LibreOffice Module sw (master)  1
unotools.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 
22 #include <strings.hrc>
23 #include <unotools.hxx>
24 #include <unoprnms.hxx>
25 #include <i18nutil/unicode.hxx>
26 #include <svtools/colorcfg.hxx>
27 #include <vcl/commandevent.hxx>
28 #include <vcl/jobset.hxx>
29 #include <vcl/settings.hxx>
30 #include <vcl/svapp.hxx>
31 #include <vcl/virdev.hxx>
32 #include <vcl/weld.hxx>
33 #include <com/sun/star/frame/Desktop.hpp>
34 #include <com/sun/star/text/XTextViewCursorSupplier.hpp>
35 #include <com/sun/star/view/XScreenCursor.hpp>
36 #include <com/sun/star/view/DocumentZoomType.hpp>
37 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
38 #include <com/sun/star/style/XStyle.hpp>
39 #include <com/sun/star/text/XTextDocument.hpp>
40 #include <com/sun/star/awt/PosSize.hpp>
41 #include <com/sun/star/view/XViewSettingsSupplier.hpp>
42 #include <com/sun/star/container/XNameContainer.hpp>
43 #include <com/sun/star/frame/XLayoutManager.hpp>
47 #include <docsh.hxx>
48 #include <editsh.hxx>
49 #include <swmodule.hxx>
50 #include <TextCursorHelper.hxx>
51 #include <doc.hxx>
52 
53 using namespace ::com::sun::star;
54 
55 const char cFactory[] = "private:factory/swriter";
56 
57 static void disableScrollBars(uno::Reference< beans::XPropertySet > const & xViewProps,
58  bool bEnableOnlineMode)
59 {
60  //the scrollbar logic is kind of busted looking in writer, when the hori scrollbar
61  //property is changed then the hori scrollbar is enabled if the property is
62  //true or browse (online) mode is enabled. So...
63  //disable online mode
64  //turn off scrollbars
65  //turn back on online mode if that's what we want
66  //which subverts the (dodgy/buggy) scrollbar setting
67 
68  //To reproduce this problem, in edit->autotext and click through
69  //the examples and see if the preview gets a horizontal scrollbar
70  uno::Any aFalseSet(uno::makeAny(false));
71  xViewProps->setPropertyValue(UNO_NAME_SHOW_ONLINE_LAYOUT, aFalseSet);
72 
73  xViewProps->setPropertyValue(UNO_NAME_SHOW_HORI_SCROLL_BAR, aFalseSet);
74  xViewProps->setPropertyValue(UNO_NAME_SHOW_VERT_SCROLL_BAR, aFalseSet);
75 
76  if (bEnableOnlineMode)
77  {
78  xViewProps->setPropertyValue(UNO_NAME_SHOW_ONLINE_LAYOUT, uno::makeAny(true));
79  }
80 }
81 
82 const sal_Int16 nZoomValues[] =
83 {
84  20,
85  40,
86  50,
87  75,
88  100
89 };
90 
92  const Link<SwOneExampleFrame&,void>* pInitializedLink,
93  const OUString* pURL)
94  : m_aLoadedIdle("sw uibase SwOneExampleFrame Loaded")
95  , m_pModuleView(SW_MOD()->GetView())
96  , m_nStyleFlags(nFlags)
97  , m_bIsInitialized(false)
98 {
99  if (pURL && !pURL->isEmpty())
100  m_sArgumentURL = *pURL;
101 
102  if( pInitializedLink )
103  m_aInitializedLink = *pInitializedLink;
104 
105  // the controller is asynchronously set
107  m_aLoadedIdle.SetPriority(TaskPriority::HIGH_IDLE);
108 }
109 
111 {
112  CustomWidgetController::SetDrawingArea(pDrawingArea);
114  Size aSize(m_xVirDev->LogicToPixel(Size(150, 188), MapMode(MapUnit::MapAppFont)));
115  pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
116  SetOutputSizePixel(aSize);
117  CreateControl();
118 }
119 
121 {
122  switch (rCEvt.GetCommand())
123  {
124  case CommandEventId::ContextMenu:
125  {
126  //#125881# quickly clicking crashes because the control is not fully initialized
127  if (m_xController.is())
128  return CreatePopup(rCEvt.GetMousePosPixel());
129  }
130  break;
131  default:;
132  break;
133  }
134  return CustomWidgetController::Command(rCEvt);
135 }
136 
138 {
139  Size aSize(GetOutputSizePixel());
140  // m_xVirDev instead of rRenderContext just to avoid overlays in writer re-triggering
141  // invalidate on rRenderContext if it is a vcl::Window, which is the "classic" gen mode
142  m_xVirDev->SetOutputSizePixel(aSize);
143 
144  Color aBgColor = SW_MOD()->GetColorConfig().GetColorValue(::svtools::DOCCOLOR).nColor;
145  m_xVirDev->DrawWallpaper(tools::Rectangle(Point(), aSize), aBgColor);
146 
147  auto pCursor = comphelper::getUnoTunnelImplementation<OTextCursorHelper>(m_xCursor);
148  if (pCursor)
149  {
150  uno::Reference<view::XViewSettingsSupplier> xSettings(m_xController, uno::UNO_QUERY);
151  uno::Reference<beans::XPropertySet> xViewProps = xSettings->getViewSettings();
152  uno::Any aZoom = xViewProps->getPropertyValue(UNO_NAME_ZOOM_VALUE);
153  sal_Int16 nZoom = 100;
154  aZoom >>= nZoom;
155 
156  double fZoom = 100.0 / nZoom;
157 
158  m_xVirDev->Push(PushFlags::ALL);
159  m_xVirDev->SetMapMode(MapMode(MapUnit::MapTwip));
160  SwDoc *pDoc = pCursor->GetDoc();
161  SwDocShell* pShell = pDoc->GetDocShell();
162  tools::Rectangle aRect(Point(), m_xVirDev->PixelToLogic(aSize));
163  pShell->SetVisArea(tools::Rectangle(Point(), Size(aRect.GetWidth() * fZoom,
164  aRect.GetHeight() * fZoom)));
165  pShell->DoDraw(m_xVirDev.get(), aRect.TopLeft(), aRect.GetSize(), JobSetup(), ASPECT_CONTENT);
166  m_xVirDev->Pop();
167  }
168 
169  rRenderContext.DrawOutDev(Point(), aSize, Point(), aSize, *m_xVirDev);
170 }
171 
173 {
174  DisposeControl();
175 }
176 
178 {
179  // create new doc
180  OUString sTempURL(cFactory);
181  if(!m_sArgumentURL.isEmpty())
182  sTempURL = m_sArgumentURL;
183 
184  uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create(::comphelper::getProcessComponentContext());
185  uno::Sequence<beans::PropertyValue> args( comphelper::InitPropertySequence({
186  { "DocumentService", uno::Any(OUString("com.sun.star.text.TextDocument")) },
187  { "OpenFlags", uno::Any(OUString("-RB")) },
188  { "Referer", uno::Any(OUString("private:user")) },
189  { "ReadOnly", uno::Any(true) },
190  { "Hidden", uno::Any(true) }
191  }));
192 
193  m_xModel.set(xDesktop->loadComponentFromURL(sTempURL, "_blank", 0, args), uno::UNO_QUERY);
194 
196 }
197 
199 {
201  m_xCursor = nullptr;
202  if (m_xModel)
203  {
204  m_xModel->dispose();
205  m_xModel = nullptr;
206  }
207  m_xController = nullptr;
208 }
209 
210 IMPL_LINK( SwOneExampleFrame, TimeoutHdl, Timer*, pTimer, void )
211 {
212  if (!m_xModel.is())
213  return;
214 
215  m_xController = m_xModel->getCurrentController();
216 
217  if (m_xController.is())
218  {
219  uno::Reference<frame::XFrame> xFrame = m_xController->getFrame();
220  uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY );
221  if ( xPropSet.is() )
222  {
223  try
224  {
225  uno::Reference< frame::XLayoutManager > xLayoutManager;
226  uno::Any aValue = xPropSet->getPropertyValue("LayoutManager");
227  aValue >>= xLayoutManager;
228  if ( xLayoutManager.is() )
229  xLayoutManager->setVisible( false );
230  }
231  catch (const uno::Exception&)
232  {
233  }
234  }
235 
236  //now the ViewOptions should be set properly
237  uno::Reference< view::XViewSettingsSupplier > xSettings(m_xController, uno::UNO_QUERY);
238  uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings();
239 
240  const uno::Any aTrueSet( true );
241  const uno::Any aFalseSet( false );
242 
243  if( !m_bIsInitialized )
244  {
245  xViewProps->setPropertyValue(UNO_NAME_SHOW_BREAKS, aFalseSet);
246  xViewProps->setPropertyValue(UNO_NAME_SHOW_DRAWINGS, aTrueSet);
247  xViewProps->setPropertyValue(UNO_NAME_SHOW_FIELD_COMMANDS, aFalseSet);
248  xViewProps->setPropertyValue(UNO_NAME_SHOW_GRAPHICS, aTrueSet);
249  xViewProps->setPropertyValue(UNO_NAME_HIDE_WHITESPACE, aFalseSet);
250  xViewProps->setPropertyValue(UNO_NAME_SHOW_HIDDEN_PARAGRAPHS, aFalseSet);
251  xViewProps->setPropertyValue(UNO_NAME_SHOW_HIDDEN_TEXT, aFalseSet);
252  xViewProps->setPropertyValue(UNO_NAME_SHOW_HORI_RULER, aFalseSet);
253  xViewProps->setPropertyValue(UNO_NAME_SHOW_PARA_BREAKS, aFalseSet);
254  xViewProps->setPropertyValue(UNO_NAME_SHOW_PROTECTED_SPACES, aFalseSet);
255  xViewProps->setPropertyValue(UNO_NAME_SHOW_SOFT_HYPHENS, aFalseSet);
256  xViewProps->setPropertyValue(UNO_NAME_SHOW_SPACES, aFalseSet);
257  xViewProps->setPropertyValue(UNO_NAME_SHOW_TABLES, aTrueSet);
258  xViewProps->setPropertyValue(UNO_NAME_SHOW_TABSTOPS, aFalseSet);
259  xViewProps->setPropertyValue(UNO_NAME_SHOW_VERT_RULER, aFalseSet);
260 
261  if(0 ==(m_nStyleFlags&EX_SHOW_ONLINE_LAYOUT))
262  {
263  uno::Any aZoom;
264  aZoom <<= sal_Int16(view::DocumentZoomType::PAGE_WIDTH_EXACT);
265  xViewProps->setPropertyValue(UNO_NAME_ZOOM_TYPE, aZoom);
266  }
267  else
268  {
269  uno::Any aZoom;
270  aZoom <<= sal_Int16(view::DocumentZoomType::BY_VALUE);
271  xViewProps->setPropertyValue(UNO_NAME_ZOOM_TYPE, aZoom);
272 
273  sal_Int16 nZoomValue = 75;
274  if(EX_SHOW_BUSINESS_CARDS == m_nStyleFlags)
275  {
276  nZoomValue = 80;
277  }
278  aZoom <<= nZoomValue;
279  xViewProps->setPropertyValue(UNO_NAME_ZOOM_VALUE, aZoom);
280  }
281 
282  // set onlinelayout property after setting the zoom
283  disableScrollBars(xViewProps, (m_nStyleFlags&EX_SHOW_ONLINE_LAYOUT) != 0);
284  m_bIsInitialized = true;
285  }
286 
287  uno::Reference< text::XTextDocument > xDoc(m_xModel, uno::UNO_QUERY);
288  uno::Reference< text::XText > xText = xDoc->getText();
289  m_xCursor = xText->createTextCursor();
290 
291  //From here, a cursor is defined, which goes through the template,
292  //and overwrites the template words where it is necessary.
293 
294  auto pCursor = comphelper::getUnoTunnelImplementation<OTextCursorHelper>(m_xCursor);
295 
296  SwDoc *pDoc = pCursor ? pCursor->GetDoc() : nullptr;
297  if (pDoc && (m_nStyleFlags & EX_LOCALIZE_TOC_STRINGS))
298  {
299  SwEditShell* pSh = pDoc->GetEditShell();
300 
301  do
302  {
303  if (pSh->GetCurWord() == "HEADING1")
304  {
305  pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_HEADING1));
306  }
307  else if (pSh->GetCurWord() == "ENTRY1")
308  {
309  pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_ENTRY1));
310  }
311  else if (pSh->GetCurWord() == "HEADING11")
312  {
313  pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_HEADING11));
314  }
315  else if (pSh->GetCurWord() == "ENTRY11")
316  {
317  pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_ENTRY11));
318  }
319  else if (pSh->GetCurWord() == "HEADING12")
320  {
321  pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_HEADING12));
322  }
323  else if (pSh->GetCurWord() == "ENTRY12")
324  {
325  pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_ENTRY12));
326  }
327  else if (pSh->GetCurWord() == "TABLE1")
328  {
329  pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_TABLE1));
330  }
331  else if (pSh->GetCurWord() == "IMAGE1")
332  {
333  pSh->Overwrite(SwResId(STR_IDXEXAMPLE_IDXTXT_IMAGE1));
334  }
335  }
336  while(pSh->Right(sal_uInt16(1), sal_uInt16(1), true));
337 
338  TOXTypes eTypes[] = { TOX_INDEX, TOX_USER, TOX_CONTENT };
339  for (auto eType : eTypes)
340  {
341  const SwTOXType* pTOXType = pDoc->GetTOXType(eType, 0);
342  SwTOXMarks aMarks;
343  pTOXType->CollectTextMarks(aMarks);
344  for (auto pMark : aMarks)
345  {
346  if (pMark->GetAlternativeText() == "Chapter")
347  pMark->SetAlternativeText(SwResId(STR_IDXEXAMPLE_IDXMARK_CHAPTER));
348  else if (pMark->GetAlternativeText() == "Keyword")
349  pMark->SetAlternativeText(SwResId(STR_IDXEXAMPLE_IDXMARK_KEYWORD));
350  else if (pMark->GetAlternativeText() == "this")
351  pMark->SetAlternativeText(SwResId(STR_IDXEXAMPLE_IDXMARK_THIS));
352  else if (pMark->GetAlternativeText() == "User Directory Entry")
353  pMark->SetAlternativeText(SwResId(STR_IDXEXAMPLE_IDXMARK_USER_DIR_ENTRY));
354  else if (pMark->GetAlternativeText() == "Entry")
355  pMark->SetAlternativeText(SwResId(STR_IDXEXAMPLE_IDXMARK_ENTRY));
356 
357  if (pMark->GetPrimaryKey() == "Primary key")
358  pMark->SetPrimaryKey(SwResId(STR_IDXEXAMPLE_IDXMARK_PRIMARY_KEY));
359 
360  if (pMark->GetSecondaryKey() == "Secondary key")
361  pMark->SetSecondaryKey(SwResId(STR_IDXEXAMPLE_IDXMARK_SECONDARY_KEY));
362  }
363  }
364  }
365 
366  uno::Reference< beans::XPropertySet > xCursorProp(m_xCursor, uno::UNO_QUERY);
367  uno::Any aPageStyle = xCursorProp->getPropertyValue(UNO_NAME_PAGE_STYLE_NAME);
368  OUString sPageStyle;
369  aPageStyle >>= sPageStyle;
370 
371  uno::Reference< style::XStyleFamiliesSupplier > xSSupp( xDoc, uno::UNO_QUERY);
372  uno::Reference< container::XNameAccess > xStyles = xSSupp->getStyleFamilies();
373  uno::Any aPFamily = xStyles->getByName( "PageStyles" );
374  uno::Reference< container::XNameContainer > xPFamily;
375 
376  if( EX_SHOW_DEFAULT_PAGE != m_nStyleFlags
377  && (aPFamily >>= xPFamily) && !sPageStyle.isEmpty() )
378  {
379  uno::Any aPStyle = xPFamily->getByName( sPageStyle );
380  uno::Reference< style::XStyle > xPStyle;
381  aPStyle >>= xPStyle;
382  uno::Reference< beans::XPropertySet > xPProp(xPStyle, uno::UNO_QUERY);
383  uno::Any aSize = xPProp->getPropertyValue(UNO_NAME_SIZE);
384  awt::Size aPSize;
385  aSize >>= aPSize;
386  //TODO: set page width to card width
387  aPSize.Width = 10000;
388  aSize <<= aPSize;
389  xPProp->setPropertyValue(UNO_NAME_SIZE, aSize);
390 
391  uno::Any aZero; aZero <<= sal_Int32(0);
392  xPProp->setPropertyValue(UNO_NAME_LEFT_MARGIN, aZero);
393  xPProp->setPropertyValue(UNO_NAME_RIGHT_MARGIN, aZero);
394  }
395 
396  uno::Reference<awt::XWindow> xWin = xFrame->getContainerWindow();
397  Size aWinSize(GetOutputSizePixel());
398  xWin->setPosSize(0, 0, aWinSize.Width(), aWinSize.Height(), awt::PosSize::SIZE);
399 
400  // can only be done here - the SFX changes the ScrollBar values
401  disableScrollBars(xViewProps, (m_nStyleFlags&EX_SHOW_ONLINE_LAYOUT) != 0);
402 
403  m_aInitializedLink.Call(*this);
404 
405  uno::Reference< text::XTextViewCursorSupplier > xCursorSupp(m_xController, uno::UNO_QUERY);
406  uno::Reference< view::XScreenCursor > xScrCursor(xCursorSupp->getViewCursor(), uno::UNO_QUERY);
407  if(xScrCursor.is())
408  xScrCursor->screenUp();
409 
410  if (pDoc)
411  {
412  SwEditShell* pSh = pDoc->GetEditShell();
413  if( pSh->ActionCount() )
414  {
415  pSh->EndAllAction();
416  pSh->UnlockPaint();
417  }
418  }
419 
420  SW_MOD()->SetView(m_pModuleView);
421 
422  Invalidate();
423  }
424  else
425  pTimer->Start();
426 }
427 
429 {
430  uno::Reference< lang::XUnoTunnel> xTunnel( m_xCursor, uno::UNO_QUERY);
431  if( xTunnel.is() )
432  {
433  OTextCursorHelper* pCursor = reinterpret_cast<OTextCursorHelper*>(xTunnel->getSomething(
435  if( pCursor )
436  {
437  SwDoc* pDoc = pCursor->GetDoc();
438  SwEditShell* pSh = pDoc->GetEditShell();
439  pSh->LockPaint();
440  pSh->StartAllAction();
441  pSh->KillPams();
442  pSh->ClearMark();
443  pDoc->ClearDoc();
444  pSh->ClearUpCursors();
445 
446  if( m_aLoadedIdle.IsActive())
447  {
448  pSh->EndAllAction();
449  pSh->UnlockPaint();
450  }
452  }
453  else
454  {
455  m_xCursor->gotoStart(false);
456  m_xCursor->gotoEnd(true);
457  m_xCursor->setString(OUString());
458  }
459  }
460 }
461 
462 bool SwOneExampleFrame::CreatePopup(const Point& rPt)
463 {
465  return false;
466 
467  std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(nullptr, "modules/swriter/ui/previewmenu.ui"));
468  std::unique_ptr<weld::Menu> xPop(xBuilder->weld_menu("previewmenu"));
469 
470  uno::Reference< view::XViewSettingsSupplier > xSettings(m_xController, uno::UNO_QUERY);
471  uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings();
472 
473  uno::Any aZoom = xViewProps->getPropertyValue(UNO_NAME_ZOOM_VALUE);
474  sal_Int16 nZoom = 0;
475  aZoom >>= nZoom;
476 
477  for (size_t i = 0; i < SAL_N_ELEMENTS(nZoomValues); ++i)
478  {
479  OUString sTemp = unicode::formatPercent(nZoomValues[i],
480  Application::GetSettings().GetUILanguageTag());
481  OString sIdent = "zoom" + OString::number(nZoomValues[i]);
482  xPop->set_label(sIdent, sTemp);
483  if (nZoom == nZoomValues[i])
484  xPop->set_active(sIdent, true);
485  }
486 
487  PopupHdl(xPop->popup_at_rect(GetDrawingArea(), tools::Rectangle(rPt, Size(1, 1))));
488 
489  return true;
490 }
491 
492 void SwOneExampleFrame::PopupHdl(const OString& rId)
493 {
494  OString sZoomValue;
495  if (rId.startsWith("zoom", &sZoomValue))
496  {
497  sal_Int16 nZoom = sZoomValue.toInt32();
498  uno::Reference< view::XViewSettingsSupplier > xSettings(m_xController, uno::UNO_QUERY);
499  uno::Reference< beans::XPropertySet > xViewProps = xSettings->getViewSettings();
500 
501  uno::Any aZoom;
502  aZoom <<= nZoom;
503  xViewProps->setPropertyValue(UNO_NAME_ZOOM_VALUE, aZoom);
504  aZoom <<= sal_Int16(view::DocumentZoomType::BY_VALUE);
505  xViewProps->setPropertyValue(UNO_NAME_ZOOM_TYPE, aZoom);
506  }
507  Invalidate();
508 }
509 
510 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
long Width() const
TOXTypes
Definition: toxe.hxx:39
void KillPams()
Definition: crsrsh.cxx:1021
bool CreatePopup(const Point &rPt)
Definition: unotools.cxx:462
Reference< frame::XModel > m_xModel
virtual void SetDrawingArea(weld::DrawingArea *pDrawingArea) override
Definition: unotools.cxx:110
IMPL_LINK(SwOneExampleFrame, TimeoutHdl, Timer *, pTimer, void)
Definition: unotools.cxx:210
virtual const SwDoc * GetDoc() const =0
void ClearDocument()
Definition: unotools.cxx:428
bool Right(sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual=false)
Definition: crsrsh.hxx:351
#define UNO_NAME_ZOOM_VALUE
Definition: unoprnms.hxx:420
#define EX_SHOW_DEFAULT_PAGE
Definition: unotools.hxx:33
SwDocShell * GetDocShell()
Definition: doc.hxx:1348
long Height() const
virtual ~SwOneExampleFrame() override
Definition: unotools.cxx:172
#define UNO_NAME_ZOOM_TYPE
Definition: unoprnms.hxx:421
std::vector< SwTOXMark * > SwTOXMarks
Definition: tox.hxx:44
SwOneExampleFrame(sal_uInt32 nStyleFlags, const Link< SwOneExampleFrame &, void > *pInitalizedLink, const OUString *pURL=nullptr)
Definition: unotools.cxx:91
Reference< XFrame > xFrame
static const AllSettings & GetSettings()
void CollectTextMarks(SwTOXMarks &rMarks) const
Definition: tox.hxx:175
Definition: doc.hxx:184
static weld::Builder * CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false)
tuple args
#define UNO_NAME_SHOW_VERT_SCROLL_BAR
Definition: unoprnms.hxx:213
#define UNO_NAME_SHOW_HORI_SCROLL_BAR
Definition: unoprnms.hxx:214
css::uno::Reference< css::frame::XModel > m_xModel
Definition: unotools.hxx:42
void EndAllAction()
Definition: edws.cxx:97
Size const & GetOutputSizePixel() const
bool IsActive() const
#define UNO_NAME_SHOW_VERT_RULER
Definition: unoprnms.hxx:209
#define UNO_NAME_SIZE
Definition: unoprnms.hxx:302
virtual void Start() override
virtual void Paint(vcl::RenderContext &rRenderContext, const tools::Rectangle &rRect) override
Definition: unotools.cxx:137
static void disableScrollBars(uno::Reference< beans::XPropertySet > const &xViewProps, bool bEnableOnlineMode)
Definition: unotools.cxx:57
css::uno::Sequence< css::beans::PropertyValue > InitPropertySequence(::std::initializer_list< ::std::pair< OUString, css::uno::Any > > vInit)
const sal_Int16 nZoomValues[]
Definition: unotools.cxx:82
css::uno::Reference< css::text::XTextCursor > m_xCursor
Definition: unotools.hxx:44
OUString m_sArgumentURL
Definition: unotools.hxx:49
#define EX_SHOW_BUSINESS_CARDS
Definition: unotools.hxx:31
#define SAL_N_ELEMENTS(arr)
DocumentType eType
#define UNO_NAME_HIDE_WHITESPACE
Definition: unoprnms.hxx:218
#define UNO_NAME_SHOW_SOFT_HYPHENS
Definition: unoprnms.hxx:212
sal_uInt32 m_nStyleFlags
Definition: unotools.hxx:53
#define SW_MOD()
Definition: swmodule.hxx:255
int i
SwEditShell const * GetEditShell() const
Definition: doccorr.cxx:327
#define UNO_NAME_SHOW_DRAWINGS
Definition: unoprnms.hxx:207
sal_uInt16 ActionCount() const
Definition: viewsh.hxx:196
#define UNO_NAME_SHOW_TABLES
Definition: unoprnms.hxx:204
CommandEventId GetCommand() const
#define UNO_NAME_SHOW_PARA_BREAKS
Definition: unoprnms.hxx:210
void ClearUpCursors()
Definition: crsrsh.cxx:3563
void LockPaint()
Definition: viewsh.hxx:602
OUString SwResId(const char *pId)
Definition: swmodule.cxx:178
#define EX_LOCALIZE_TOC_STRINGS
Definition: unotools.hxx:35
#define ASPECT_CONTENT
#define UNO_NAME_SHOW_BREAKS
Definition: unoprnms.hxx:202
SAL_DLLPRIVATE void CreateControl()
Definition: unotools.cxx:177
const char cFactory[]
Definition: unotools.cxx:55
void SetOutputSizePixel(const Size &rSize)
void PopupHdl(const OString &rId)
Definition: unotools.cxx:492
#define UNO_NAME_RIGHT_MARGIN
Definition: unoprnms.hxx:68
#define UNO_NAME_SHOW_SPACES
Definition: unoprnms.hxx:203
#define UNO_NAME_SHOW_FIELD_COMMANDS
Definition: unoprnms.hxx:215
virtual bool Command(const CommandEvent &rCEvt) override
Definition: unotools.cxx:120
SAL_DLLPRIVATE void DisposeControl()
Definition: unotools.cxx:198
const Point & GetMousePosPixel() const
css::uno::Reference< css::frame::XController > m_xController
Definition: unotools.hxx:43
OUString GetCurWord() const
request current word
Definition: editsh.cxx:409
Link< SwOneExampleFrame &, void > m_aInitializedLink
Definition: unotools.hxx:47
weld::DrawingArea * GetDrawingArea() const
static OUString formatPercent(double dNumber, const LanguageTag &rLangTag)
void Stop()
#define UNO_NAME_LEFT_MARGIN
Definition: unoprnms.hxx:67
void ClearDoc()
Definition: docnew.cxx:620
#define UNO_NAME_SHOW_HORI_RULER
Definition: unoprnms.hxx:301
static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId()
void DoDraw(OutputDevice *, const Point &rObjPos, const Size &rSize, const JobSetup &rSetup, sal_uInt16 nAspect=ASPECT_CONTENT)
static VclPtr< reference_type > Create(Arg &&...arg)
Reference< XComponentContext > getProcessComponentContext()
void SetInvokeHandler(const Link< Timer *, void > &rLink)
virtual void SetVisArea(const tools::Rectangle &rRect) override
OLE-stuff.
Definition: docsh.cxx:894
void ClearMark()
Definition: crsrsh.cxx:938
void Overwrite(const OUString &)
Definition: editsh.cxx:168
VirtualDevice * get() const
#define UNO_NAME_SHOW_HIDDEN_TEXT
Definition: unoprnms.hxx:211
void SetPriority(TaskPriority ePriority)
#define UNO_NAME_SHOW_ONLINE_LAYOUT
Definition: unoprnms.hxx:457
virtual void set_size_request(int nWidth, int nHeight)=0
void StartAllAction()
For all views of this document.
Definition: edws.cxx:86
#define UNO_NAME_SHOW_PROTECTED_SPACES
Definition: unoprnms.hxx:216
#define EX_SHOW_ONLINE_LAYOUT
Definition: unotools.hxx:29
#define UNO_NAME_PAGE_STYLE_NAME
Definition: unoprnms.hxx:167
#define UNO_NAME_SHOW_TABSTOPS
Definition: unoprnms.hxx:208
SAL_DLLPRIVATE void DrawOutDev(const Point &, const Size &, const Point &, const Size &, const Printer &)=delete
void UnlockPaint(bool bVirDev=false)
Definition: viewsh.hxx:607
ScopedVclPtr< VirtualDevice > m_xVirDev
Definition: unotools.hxx:41
#define UNO_NAME_SHOW_HIDDEN_PARAGRAPHS
Definition: unoprnms.hxx:217
#define UNO_NAME_SHOW_GRAPHICS
Definition: unoprnms.hxx:205