summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-10-11 13:04:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-10-13 16:16:39 +0200
commitd854687a1316783e40d227756fef08af925e93e6 (patch)
treec6314a26cc9fa4d8dd43ecf4a101400b8562a33e /svx
parent226fcda0a888c4959b1f895de31856f1624f04ee (diff)
SvxFontPrevWindow is now unused
sc/uiconfig/scalc/ui/conditionalentrymobile.ui was already non-functional before this change Change-Id: I07743a8fcca4b3cf325ce3d3d0699bf68c0115f3 Reviewed-on: https://gerrit.libreoffice.org/80690 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/pch/precompiled_svx.hxx4
-rw-r--r--svx/inc/pch/precompiled_svxcore.hxx27
-rw-r--r--svx/source/dialog/fntctrl.cxx313
3 files changed, 11 insertions, 333 deletions
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index 083aff353175..85a2bc8ba450 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2019-10-02 17:03:44 using:
+ Generated on 2019-10-11 13:05:53 using:
./bin/update_pch svx svx --cutoff=3 --exclude:system --exclude:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -59,10 +59,8 @@
#include <rtl/instance.hxx>
#include <rtl/math.hxx>
#include <rtl/ref.hxx>
-#include <rtl/strbuf.h>
#include <rtl/string.h>
#include <rtl/string.hxx>
-#include <rtl/stringutils.hxx>
#include <rtl/tencinfo.h>
#include <rtl/textenc.h>
#include <rtl/uri.hxx>
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index a576a2da5eca..3978d42f17cd 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2019-05-12 16:57:24 using:
+ Generated on 2019-10-11 13:06:07 using:
./bin/update_pch svx svxcore --cutoff=7 --exclude:system --include:module --exclude:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -58,7 +58,6 @@
#include <osl/interlck.h>
#include <osl/mutex.hxx>
#include <osl/process.h>
-#include <osl/thread.h>
#include <osl/time.h>
#include <rtl/alloc.h>
#include <rtl/character.hxx>
@@ -91,10 +90,8 @@
#include <vcl/AccessibleBrowseBoxObjType.hxx>
#include <vcl/EnumContext.hxx>
#include <vcl/GraphicExternalLink.hxx>
-#include <vcl/GraphicObject.hxx>
-#include <vcl/IContext.hxx>
-#include <vcl/abstdlg.hxx>
-#include <vcl/accel.hxx>
+#include <vcl/NotebookBarAddonsMerger.hxx>
+#include <vcl/Scanline.hxx>
#include <vcl/alpha.hxx>
#include <vcl/animate/Animation.hxx>
#include <vcl/animate/AnimationBitmap.hxx>
@@ -116,8 +113,6 @@
#include <vcl/edit.hxx>
#include <vcl/errcode.hxx>
#include <vcl/event.hxx>
-#include <vcl/field.hxx>
-#include <vcl/fixed.hxx>
#include <vcl/floatwin.hxx>
#include <vcl/fntstyle.hxx>
#include <vcl/font.hxx>
@@ -133,10 +128,8 @@
#include <vcl/mapmod.hxx>
#include <vcl/menu.hxx>
#include <vcl/metaact.hxx>
-#include <vcl/mnemonicengine.hxx>
#include <vcl/outdev.hxx>
#include <vcl/ptrstyle.hxx>
-#include <vcl/quickselectionengine.hxx>
#include <vcl/region.hxx>
#include <vcl/scopedbitmapaccess.hxx>
#include <vcl/settings.hxx>
@@ -144,10 +137,9 @@
#include <vcl/svapp.hxx>
#include <vcl/syswin.hxx>
#include <vcl/task.hxx>
+#include <vcl/textfilter.hxx>
#include <vcl/timer.hxx>
#include <vcl/transfer.hxx>
-#include <vcl/treelist.hxx>
-#include <vcl/treelistentries.hxx>
#include <vcl/vclenum.hxx>
#include <vcl/vclevent.hxx>
#include <vcl/vclptr.hxx>
@@ -199,8 +191,10 @@
#include <com/sun/star/beans/XPropertyState.hpp>
#include <com/sun/star/beans/XVetoableChangeListener.hpp>
#include <com/sun/star/container/XChild.hpp>
+#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/datatransfer/DataFlavor.hpp>
#include <com/sun/star/datatransfer/XTransferable2.hpp>
+#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboardOwner.hpp>
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
#include <com/sun/star/datatransfer/dnd/DropTargetDragEvent.hpp>
@@ -216,8 +210,10 @@
#include <com/sun/star/embed/Aspects.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/form/FormComponentType.hpp>
+#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XStatusListener.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
+#include <com/sun/star/graphic/XGraphic.hpp>
#include <com/sun/star/graphic/XPrimitive2D.hpp>
#include <com/sun/star/graphic/XPrimitive3D.hpp>
#include <com/sun/star/i18n/Calendar2.hpp>
@@ -228,7 +224,6 @@
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/XEventListener.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
@@ -262,9 +257,7 @@
#include <comphelper/comphelperdllapi.h>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/propagg.hxx>
#include <comphelper/property.hxx>
-#include <comphelper/propertycontainerhelper.hxx>
#include <comphelper/propstate.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
@@ -371,7 +364,6 @@
#include <toolkit/helper/vclunohelper.hxx>
#include <tools/bigint.hxx>
#include <tools/color.hxx>
-#include <tools/contnr.hxx>
#include <tools/date.hxx>
#include <tools/datetime.hxx>
#include <tools/debug.hxx>
@@ -411,7 +403,6 @@
#include <xmloff/dllapi.h>
#endif // PCH_LEVEL >= 3
#if PCH_LEVEL >= 4
-#include <svx/SvxColorValueSet.hxx>
#include <svx/XPropertyTable.hxx>
#include <svx/cube3d.hxx>
#include <svx/dialmgr.hxx>
@@ -433,6 +424,7 @@
#include <svx/scene3d.hxx>
#include <svx/sdasitm.hxx>
#include <svx/sdmetitm.hxx>
+#include <svx/sdooitm.hxx>
#include <svx/sdr/animation/scheduler.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
#include <svx/sdr/contact/objectcontact.hxx>
@@ -526,6 +518,7 @@
#include <svx/xpoly.hxx>
#include <svx/xpool.hxx>
#include <svx/xtable.hxx>
+#include <svx/xtextit0.hxx>
#endif // PCH_LEVEL >= 4
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index c1b7a2d65895..96df4da9c639 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -20,7 +20,6 @@
#include <sfx2/dialoghelper.hxx>
#include <sfx2/viewsh.hxx>
#include <sfx2/printer.hxx>
-#include <vcl/builderfactory.hxx>
#include <vcl/event.hxx>
#include <vcl/metric.hxx>
#include <vcl/svapp.hxx>
@@ -141,7 +140,6 @@ bool CleanAndCheckEmpty(OUString& rText)
class FontPrevWin_Impl
{
- friend class SvxFontPrevWindow;
friend class FontPrevWindow;
SvxFont maFont;
@@ -461,312 +459,6 @@ void FontPrevWin_Impl::ScaleFontWidth(vcl::RenderContext const & rOutDev)
maCTLFont.SetAverageFontWidth(mn100PercentFontWidthCTL * mnFontWidthScale / 100);
}
-void SvxFontPrevWindow::ResetSettings(bool bForeground, bool bBackground)
-{
- mbResetForeground = bForeground;
- mbResetBackground = bBackground;
- Invalidate();
-}
-
-void SvxFontPrevWindow::ApplySettings(vcl::RenderContext& rRenderContext)
-{
- const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
-
- if (mbResetForeground)
- {
- svtools::ColorConfig aColorConfig;
- Color aTextColor(aColorConfig.GetColorValue(svtools::FONTCOLOR).nColor);
-
- if (IsControlForeground())
- aTextColor = GetControlForeground();
- rRenderContext.SetTextColor(aTextColor);
- mbResetForeground = false;
- }
-
- if (mbResetBackground)
- {
- if (IsControlBackground())
- rRenderContext.SetBackground(GetControlBackground());
- else
- rRenderContext.SetBackground(rStyleSettings.GetWindowColor());
- mbResetBackground = false;
- }
-}
-
-void SvxFontPrevWindow::Init()
-{
- pImpl.reset(new FontPrevWin_Impl);
- SfxViewShell* pSh = SfxViewShell::Current();
-
- if (pSh)
- pImpl->mpPrinter = pSh->GetPrinter();
-
- if (!pImpl->mpPrinter)
- {
- pImpl->mpPrinter = VclPtr<Printer>::Create();
- pImpl->mbDelPrinter = true;
- }
- SetMapMode(MapMode(MapUnit::MapTwip));
- initFont(pImpl->maFont);
- initFont(pImpl->maCJKFont);
- initFont(pImpl->maCTLFont);
-
- ResetSettings(true, true);
-
- SetBorderStyle(WindowBorderStyle::MONO);
-}
-
-SvxFontPrevWindow::SvxFontPrevWindow(vcl::Window* pParent, WinBits nStyle)
- : Window(pParent, nStyle)
- , mbResetForeground(true)
- , mbResetBackground(true)
-{
- Init();
-}
-
-VCL_BUILDER_FACTORY_CONSTRUCTOR(SvxFontPrevWindow, 0)
-
-SvxFontPrevWindow::~SvxFontPrevWindow()
-{
- disposeOnce();
-}
-
-void SvxFontPrevWindow::dispose()
-{
- pImpl.reset();
- vcl::Window::dispose();
-}
-
-void SvxFontPrevWindow::StateChanged( StateChangedType nType )
-{
- if (nType == StateChangedType::ControlForeground)
- ResetSettings(true, false);
- else if (nType == StateChangedType::ControlBackground)
- ResetSettings(false, true);
-
- Window::StateChanged(nType);
- Invalidate();
-}
-
-void SvxFontPrevWindow::DataChanged( const DataChangedEvent& rDCEvt )
-{
- if ((rDCEvt.GetType() == DataChangedEventType::SETTINGS) && (rDCEvt.GetFlags() & AllSettingsFlags::STYLE))
- ResetSettings(true, true);
- else
- Window::DataChanged( rDCEvt );
-}
-
-void SvxFontPrevWindow::SetFont( const SvxFont& rNormalOutFont, const SvxFont& rCJKOutFont, const SvxFont& rCTLFont )
-{
- setFont(rNormalOutFont, pImpl->maFont);
- setFont(rCJKOutFont, pImpl->maCJKFont);
- setFont(rCTLFont, pImpl->maCTLFont);
-
- pImpl->Invalidate100PercentFontWidth();
- Invalidate();
-}
-
-void SvxFontPrevWindow::SetBackColor(const Color &rColor)
-{
- pImpl->mpBackColor.reset(new Color(rColor));
- Invalidate();
-}
-
-void SvxFontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
-{
- ApplySettings(rRenderContext);
-
- Printer* pPrinter = pImpl->mpPrinter;
- const SvxFont& rFont = pImpl->maFont;
- const SvxFont& rCJKFont = pImpl->maCJKFont;
- const SvxFont& rCTLFont = pImpl->maCTLFont;
-
- if (!IsEnabled())
- {
- const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
- const Size aLogSize(rRenderContext.GetOutputSize());
-
- tools::Rectangle aRect(Point(0, 0), aLogSize);
- rRenderContext.SetLineColor();
- rRenderContext.SetFillColor(rStyleSettings.GetWindowColor());
- rRenderContext.DrawRect(aRect);
- }
- else
- {
- if (!pImpl->mbSelection && !pImpl->mbTextInited)
- {
- using namespace css::i18n::ScriptType;
-
- SfxViewShell* pSh = SfxViewShell::Current();
-
- if (pSh && !pImpl->mbGetSelection && !pImpl->mbUseFontNameAsText)
- {
- pImpl->maText = pSh->GetSelectionText();
- pImpl->mbGetSelection = true;
- pImpl->mbSelection = !CleanAndCheckEmpty(pImpl->maText);
- }
-
- if (!pImpl->mbSelection || pImpl->mbUseFontNameAsText)
- {
- //If we're showing multiple sample texts, then they're all
- //sample texts. If only showing Latin, continue to use
- //the fontname as the preview
- if ((pImpl->m_bCJKEnabled) || (pImpl->m_bCTLEnabled))
- pImpl->maText = makeRepresentativeTextForFont(LATIN, rFont);
- else
- pImpl->maText = rFont.GetFamilyName();
-
- if (pImpl->m_bCJKEnabled)
- {
- if (!pImpl->maText.isEmpty())
- pImpl->maText += " ";
- pImpl->maText += makeRepresentativeTextForFont(ASIAN, rCJKFont);
-
- }
- if (pImpl->m_bCTLEnabled)
- {
- if (!pImpl->maText.isEmpty())
- pImpl->maText += " ";
- pImpl->maText += makeRepresentativeTextForFont(COMPLEX, rCTLFont);
- }
- }
-
- if (pImpl->maText.isEmpty())
- pImpl->maText = GetText();
-
- if (pImpl->maText.isEmpty())
- { // fdo#58427: still no text? let's try that one...
- pImpl->maText = makeRepresentativeTextForFont(LATIN, rFont);
- }
-
- bool bEmpty = CleanAndCheckEmpty(pImpl->maText);
- if (bEmpty)
- pImpl->maText = GetText();
-
- if (pImpl->maText.getLength() > (TEXT_WIDTH - 1))
- {
- const sal_Int32 nSpaceIdx = pImpl->maText.indexOf(" ", TEXT_WIDTH);
- if (nSpaceIdx != -1)
- pImpl->maText = pImpl->maText.copy(0, nSpaceIdx);
- else
- pImpl->maText = pImpl->maText.copy(0, (TEXT_WIDTH - 1));
- }
- }
-
- // calculate text width scaling
- pImpl->ScaleFontWidth(rRenderContext);
-
- pImpl->CheckScript();
- Size aTxtSize = pImpl->CalcTextSize(rRenderContext, pPrinter, rFont);
-
- const Size aLogSize(rRenderContext.GetOutputSize());
-
- long nX = aLogSize.Width() / 2 - aTxtSize.Width() / 2;
- long nY = aLogSize.Height() / 2 - aTxtSize.Height() / 2;
-
- if (nY + pImpl->mnAscent > aLogSize.Height())
- nY = aLogSize.Height() - pImpl->mnAscent;
-
- if (pImpl->mpBackColor)
- {
- tools::Rectangle aRect(Point(0, 0), aLogSize);
- Color aLineCol = rRenderContext.GetLineColor();
- Color aFillCol = rRenderContext.GetFillColor();
- rRenderContext.SetLineColor();
- rRenderContext.SetFillColor(*pImpl->mpBackColor);
- rRenderContext.DrawRect(aRect);
- rRenderContext.SetLineColor(aLineCol);
- rRenderContext.SetFillColor(aFillCol);
- }
- if (pImpl->mpColor)
- {
- tools::Rectangle aRect(Point(nX, nY), aTxtSize);
- Color aLineCol = rRenderContext.GetLineColor();
- Color aFillCol = rRenderContext.GetFillColor();
- rRenderContext.SetLineColor();
- rRenderContext.SetFillColor(*pImpl->mpColor);
- rRenderContext.DrawRect(aRect);
- rRenderContext.SetLineColor(aLineCol);
- rRenderContext.SetFillColor(aFillCol);
- }
-
- long nStdAscent = pImpl->mnAscent;
- nY += nStdAscent;
-
- if (IsTwoLines())
- {
- SvxFont aSmallFont(rFont);
- Size aOldSize = pImpl->maCJKFont.GetFontSize();
- setFontSize(aSmallFont);
- setFontSize(pImpl->maCJKFont);
-
- long nStartBracketWidth = 0;
- long nEndBracketWidth = 0;
- long nTextWidth = 0;
- if (pImpl->mcStartBracket)
- {
- OUString sBracket(pImpl->mcStartBracket);
- nStartBracketWidth = rFont.GetTextSize(pPrinter, sBracket).Width();
- }
- if (pImpl->mcEndBracket)
- {
- OUString sBracket(pImpl->mcEndBracket);
- nEndBracketWidth = rFont.GetTextSize(pPrinter, sBracket).Width();
- }
- nTextWidth = pImpl->CalcTextSize(rRenderContext, pPrinter, aSmallFont).Width();
- long nResultWidth = nStartBracketWidth;
- nResultWidth += nEndBracketWidth;
- nResultWidth += nTextWidth;
-
- long _nX = (aLogSize.Width() - nResultWidth) / 2;
- rRenderContext.DrawLine(Point(0, nY), Point(_nX, nY));
- rRenderContext.DrawLine(Point(_nX + nResultWidth, nY), Point(aLogSize.Width(), nY));
-
- long nSmallAscent = pImpl->mnAscent;
- long nOffset = (nStdAscent - nSmallAscent) / 2;
-
- if (pImpl->mcStartBracket)
- {
- OUString sBracket(pImpl->mcStartBracket);
- rFont.DrawPrev(&rRenderContext, pPrinter, Point(_nX, nY - nOffset - 4), sBracket);
- _nX += nStartBracketWidth;
- }
-
- Point aTmpPoint1(_nX, nY - nSmallAscent - 2);
- Point aTmpPoint2(_nX, nY);
- pImpl->DrawPrev(rRenderContext, pPrinter, aTmpPoint1, aSmallFont);
- pImpl->DrawPrev(rRenderContext, pPrinter, aTmpPoint2, aSmallFont);
-
- _nX += nTextWidth;
- if (pImpl->mcEndBracket)
- {
- Point aTmpPoint( _nX + 1, nY - nOffset - 4);
- OUString sBracket(pImpl->mcEndBracket);
- rFont.DrawPrev(&rRenderContext, pPrinter, aTmpPoint, sBracket);
- }
- pImpl->maCJKFont.SetFontSize(aOldSize);
- }
- else
- {
-
- Color aLineCol = rRenderContext.GetLineColor();
-
- rRenderContext.SetLineColor(rFont.GetColor());
- rRenderContext.DrawLine(Point(0, nY), Point(nX, nY));
- rRenderContext.DrawLine(Point(nX + aTxtSize.Width(), nY), Point(aLogSize.Width(), nY));
- rRenderContext.SetLineColor(aLineCol);
-
- Point aTmpPoint(nX, nY);
- pImpl->DrawPrev(rRenderContext, pPrinter, aTmpPoint, rFont);
- }
- }
-}
-
-bool SvxFontPrevWindow::IsTwoLines() const
-{
- return pImpl->mbTwoLines;
-}
-
static bool GetWhich (const SfxItemSet& rSet, sal_uInt16 nSlot, sal_uInt16& rWhich)
{
rWhich = rSet.GetPool()->GetWhich(nSlot);
@@ -810,11 +502,6 @@ static void SetPrevFontEscapement(SvxFont& rFont, sal_uInt8 nProp, sal_uInt8 nEs
rFont.SetEscapement(nEsc);
}
-Size SvxFontPrevWindow::GetOptimalSize() const
-{
- return getPreviewStripSize(*this);
-}
-
void FontPrevWindow::ApplySettings(vcl::RenderContext& rRenderContext)
{
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();