summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-14 12:26:05 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-14 15:32:25 +0200
commite23363f51e5d24710b032b795e715ad91adee8c9 (patch)
tree5a45c8b882f883f2fc55549906e52958ec2811a9 /svx
parentcfe2e4eb835c06b24adabd60c7a3fddbd3f4dbc9 (diff)
loplugin:unusedmethods
Change-Id: Ibd9f4757ec26da7acc645f33573ace3280e84834 Reviewed-on: https://gerrit.libreoffice.org/55788 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/fntctrl.cxx275
1 files changed, 0 insertions, 275 deletions
diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx
index 8b1d978bdfd1..311cfdd10d7b 100644
--- a/svx/source/dialog/fntctrl.cxx
+++ b/svx/source/dialog/fntctrl.cxx
@@ -818,17 +818,6 @@ bool SvxFontPrevWindow::IsTwoLines() const
return pImpl->mbTwoLines;
}
-void SvxFontPrevWindow::SetTwoLines(bool bSet)
-{
- pImpl->mbTwoLines = bSet;
-}
-
-void SvxFontPrevWindow::SetBrackets(sal_Unicode cStart, sal_Unicode cEnd)
-{
- pImpl->mcStartBracket = cStart;
- pImpl->mcEndBracket = cEnd;
-}
-
void SvxFontPrevWindow::SetFontWidthScale( sal_uInt16 n )
{
if (pImpl->SetFontWidthScale(n))
@@ -1551,39 +1540,12 @@ void FontPrevWindow::SetFontNameAsPreviewText()
pImpl->mbUseFontNameAsText = true;
}
-void FontPrevWindow::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 FontPrevWindow::SetColor(const Color &rColor)
-{
- pImpl->mpColor.reset(new Color(rColor));
- Invalidate();
-}
-
-void FontPrevWindow::ResetColor()
-{
- pImpl->mpColor.reset();
- Invalidate();
-}
-
void FontPrevWindow::SetBackColor(const Color &rColor)
{
pImpl->mpBackColor.reset(new Color(rColor));
Invalidate();
}
-void FontPrevWindow::UseResourceText()
-{
- pImpl->mbUseResText = true;
-}
-
void FontPrevWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&)
{
rRenderContext.Push(PushFlags::MAPMODE);
@@ -2071,243 +2033,6 @@ void FontPrevWindow::SetFromItemSet(const SfxItemSet &rSet, bool bPreviewBackgro
Invalidate();
}
-void FontPrevWindow::Init(const SfxItemSet& rSet)
-{
- SvxFont& rFont = GetFont();
- SvxFont& rCJKFont = GetCJKFont();
- SvxFont& rCTLFont = GetCTLFont();
-
- initFont(rFont);
- initFont(rCJKFont);
- initFont(rCTLFont);
- ResetSettings(true, true);
-
- sal_uInt16 nWhich;
- nWhich = rSet.GetPool()->GetWhich( SID_CHAR_DLG_PREVIEW_STRING );
- if (ISITEMSET)
- {
- const SfxStringItem& rItem = static_cast<const SfxStringItem&>( rSet.Get( nWhich ) );
- const OUString& aString = rItem.GetValue();
- if( !aString.isEmpty() )
- SetPreviewText( aString );
- else
- SetFontNameAsPreviewText();
- }
-
- // Underline
- FontLineStyle eUnderline;
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_UNDERLINE );
- if( ISITEMSET )
- {
- const SvxUnderlineItem& rItem = static_cast<const SvxUnderlineItem&>( rSet.Get( nWhich ) );
- eUnderline = rItem.GetValue();
- }
- else
- eUnderline = LINESTYLE_NONE;
-
- rFont.SetUnderline( eUnderline );
- rCJKFont.SetUnderline( eUnderline );
- rCTLFont.SetUnderline( eUnderline );
-
- // Overline
- FontLineStyle eOverline;
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_OVERLINE );
- if( ISITEMSET )
- {
- const SvxOverlineItem& rItem = static_cast<const SvxOverlineItem&>( rSet.Get( nWhich ) );
- eOverline = rItem.GetValue();
- }
- else
- eOverline = LINESTYLE_NONE;
-
- rFont.SetOverline( eOverline );
- rCJKFont.SetOverline( eOverline );
- rCTLFont.SetOverline( eOverline );
-
- // Strikeout
- FontStrikeout eStrikeout;
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_STRIKEOUT );
- if( ISITEMSET )
- {
- const SvxCrossedOutItem& rItem = static_cast<const SvxCrossedOutItem&>( rSet.Get( nWhich ) );
- eStrikeout = rItem.GetValue();
- }
- else
- eStrikeout = STRIKEOUT_NONE;
-
- rFont.SetStrikeout( eStrikeout );
- rCJKFont.SetStrikeout( eStrikeout );
- rCTLFont.SetStrikeout( eStrikeout );
-
- // WordLineMode
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_WORDLINEMODE );
- if( ISITEMSET )
- {
- const SvxWordLineModeItem& rItem = static_cast<const SvxWordLineModeItem&>( rSet.Get( nWhich ) );
- rFont.SetWordLineMode( rItem.GetValue() );
- rCJKFont.SetWordLineMode( rItem.GetValue() );
- rCTLFont.SetWordLineMode( rItem.GetValue() );
- }
-
- // Emphasis
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_EMPHASISMARK );
- if( ISITEMSET )
- {
- const SvxEmphasisMarkItem& rItem = static_cast<const SvxEmphasisMarkItem&>( rSet.Get( nWhich ) );
- FontEmphasisMark eMark = rItem.GetEmphasisMark();
- rFont.SetEmphasisMark( eMark );
- rCJKFont.SetEmphasisMark( eMark );
- rCTLFont.SetEmphasisMark( eMark );
- }
-
- // Relief
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_RELIEF );
- if( ISITEMSET )
- {
- const SvxCharReliefItem& rItem = static_cast<const SvxCharReliefItem&>( rSet.Get( nWhich ) );
- FontRelief eFontRelief = rItem.GetValue();
- rFont.SetRelief( eFontRelief );
- rCJKFont.SetRelief( eFontRelief );
- rCTLFont.SetRelief( eFontRelief );
- }
-
- // Effects
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_CASEMAP );
- if( ISITEMSET )
- {
- const SvxCaseMapItem& rItem = static_cast<const SvxCaseMapItem&>( rSet.Get( nWhich ) );
- SvxCaseMap eCaseMap = rItem.GetValue();
- rFont.SetCaseMap( eCaseMap );
- rCJKFont.SetCaseMap( eCaseMap );
- // #i78474# small caps do not exist in CTL fonts
- rCTLFont.SetCaseMap( eCaseMap == SvxCaseMap::SmallCaps ? SvxCaseMap::NotMapped : eCaseMap );
- }
-
- // Outline
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_CONTOUR );
- if( ISITEMSET )
- {
- const SvxContourItem& rItem = static_cast<const SvxContourItem&>( rSet.Get( nWhich ) );
- bool bOutline = rItem.GetValue();
- rFont.SetOutline( bOutline );
- rCJKFont.SetOutline( bOutline );
- rCTLFont.SetOutline( bOutline );
- }
-
- // Shadow
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_SHADOWED );
- if( ISITEMSET )
- {
- const SvxShadowedItem& rItem = static_cast<const SvxShadowedItem&>( rSet.Get( nWhich ) );
- bool bShadow = rItem.GetValue();
- rFont.SetShadow( bShadow );
- rCJKFont.SetShadow( bShadow );
- rCTLFont.SetShadow( bShadow );
- }
-
- // Background
- bool bTransparent;
- nWhich = SID_ATTR_BRUSH_CHAR;
- if (ISITEMSET)
- {
- const SvxBrushItem& rBrush = static_cast<const SvxBrushItem&>( rSet.Get( nWhich ) );
- const Color& rColor = rBrush.GetColor();
- bTransparent = rColor.GetTransparency() > 0;
- rFont.SetFillColor(rColor);
- rCJKFont.SetFillColor(rColor);
- rCTLFont.SetFillColor(rColor);
- }
- else
- bTransparent = true;
-
- rFont.SetTransparent( bTransparent );
- rCJKFont.SetTransparent( bTransparent );
- rCTLFont.SetTransparent( bTransparent );
-
- Color aBackCol( COL_TRANSPARENT );
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_BRUSH );
- if (ISITEMSET)
- {
- const SvxBrushItem& rBrush = static_cast<const SvxBrushItem&>(rSet.Get(nWhich));
- if (GPOS_NONE == rBrush.GetGraphicPos())
- aBackCol = rBrush.GetColor();
- }
- SetBackColor(aBackCol);
-
- // Font
- SetFont(rSet, SID_ATTR_CHAR_FONT, rFont);
- SetFont(rSet, SID_ATTR_CHAR_CJK_FONT, rCJKFont);
- SetFont(rSet, SID_ATTR_CHAR_CTL_FONT, rCTLFont);
-
- // Style
- SetFontStyle(rSet, SID_ATTR_CHAR_POSTURE, SID_ATTR_CHAR_WEIGHT, rFont);
- SetFontStyle(rSet, SID_ATTR_CHAR_CJK_POSTURE, SID_ATTR_CHAR_CJK_WEIGHT, rCJKFont);
- SetFontStyle(rSet, SID_ATTR_CHAR_CTL_POSTURE, SID_ATTR_CHAR_CTL_WEIGHT, rCTLFont);
-
- // Size
- SetFontSize(rSet, SID_ATTR_CHAR_FONTHEIGHT, rFont);
- SetFontSize(rSet, SID_ATTR_CHAR_CJK_FONTHEIGHT, rCJKFont);
- SetFontSize(rSet, SID_ATTR_CHAR_CTL_FONTHEIGHT, rCTLFont);
-
- // Language
- SetFontLang( rSet, SID_ATTR_CHAR_LANGUAGE, rFont );
- SetFontLang( rSet, SID_ATTR_CHAR_CJK_LANGUAGE, rCJKFont );
- SetFontLang( rSet, SID_ATTR_CHAR_CTL_LANGUAGE, rCTLFont );
-
- // Color
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_COLOR );
- if( ISITEMSET )
- {
- const SvxColorItem& rItem = static_cast<const SvxColorItem&>( rSet.Get( nWhich ) );
- Color aCol( rItem.GetValue() );
- rFont.SetColor( aCol );
- rCJKFont.SetColor( aCol );
- rCTLFont.SetColor( aCol );
-
- AutoCorrectFontColor(); // handle color COL_AUTO
- }
-
- // Kerning
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_KERNING );
- if( ISITEMSET )
- {
- const SvxKerningItem& rItem = static_cast<const SvxKerningItem&>( rSet.Get( nWhich ) );
- short nKern = static_cast<short>(OutputDevice::LogicToLogic(rItem.GetValue(), rSet.GetPool()->GetMetric(nWhich), MapUnit::MapTwip));
- rFont.SetFixKerning( nKern );
- rCJKFont.SetFixKerning( nKern );
- rCTLFont.SetFixKerning( nKern );
- }
-
- // Escapement
- nWhich = rSet.GetPool()->GetWhich( SID_ATTR_CHAR_ESCAPEMENT );
- const sal_uInt8 nProp = 100;
- short nEsc;
- sal_uInt8 nEscProp;
- if( ISITEMSET )
- {
- const SvxEscapementItem& rItem = static_cast<const SvxEscapementItem&>( rSet.Get( nWhich ) );
- nEsc = rItem.GetEsc();
- nEscProp = rItem.GetProportionalHeight();
-
- if( nEsc == DFLT_ESC_AUTO_SUPER )
- nEsc = DFLT_ESC_SUPER;
- else if( nEsc == DFLT_ESC_AUTO_SUB )
- nEsc = DFLT_ESC_SUB;
- }
- else
- {
- nEsc = 0;
- nEscProp = 100;
- }
-
- SetFontEscapement( nProp, nEscProp, nEsc );
-
- // Font width scale
- SetFontWidthScale( rSet );
-
- Invalidate();
-}
-
void FontPrevWindow::SetFont( const SfxItemSet& rSet, sal_uInt16 nSlot, SvxFont& rFont )
{
sal_uInt16 nWhich = rSet.GetPool()->GetWhich( nSlot );