summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Writer.xcs8
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs8
-rw-r--r--sw/inc/viewopt.hxx14
-rw-r--r--sw/source/core/inc/scriptinfo.hxx10
-rw-r--r--sw/source/core/text/itradj.cxx6
-rw-r--r--sw/source/core/text/porlay.cxx10
-rw-r--r--sw/source/core/text/portxt.cxx4
-rw-r--r--sw/source/core/txtnode/fntcache.cxx128
-rw-r--r--sw/source/ui/config/optpage.cxx3
-rw-r--r--sw/source/uibase/config/cfgitems.cxx6
-rw-r--r--sw/source/uibase/config/usrpref.cxx77
-rw-r--r--sw/source/uibase/config/viewopt.cxx3
-rw-r--r--sw/source/uibase/inc/cfgitems.hxx3
-rw-r--r--sw/source/uibase/inc/optpage.hxx1
-rw-r--r--sw/uiconfig/swriter/ui/viewoptionspage.ui46
15 files changed, 61 insertions, 266 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
index dd96056b4f67..89c63d849cf7 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs
@@ -1459,14 +1459,6 @@
</info>
<value>false</value>
</prop>
- <prop oor:name="GlyphPositioningMode" oor:type="xs:int" oor:nillable="false">
- <!-- UIHints: Tools - Option - Text document - Layout - [Section] Window -->
- <info>
- <desc>Specifies the Glyph Positioning Mode.</desc>
- <label>Glyph Positioning Mode</label>
- </info>
- <value>2</value>
- </prop>
</group>
<group oor:name="Other">
<info>
diff --git a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
index b4fdab4b8890..8d633caae4f0 100644
--- a/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/WriterWeb.xcs
@@ -340,14 +340,6 @@
</info>
<value>false</value>
</prop>
- <prop oor:name="GlyphPositioningMode" oor:type="xs:int" oor:nillable="false">
- <!-- UIHints: Tools - Option - HTML-Document - Layout - [Section] Window -->
- <info>
- <desc>Specifies the Glyph Positioning Mode.</desc>
- <label>Glyph Positioning Mode</label>
- </info>
- <value>2</value>
- </prop>
</group>
<group oor:name="Other">
<info>
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index a6ac48b31581..e8a1c299b496 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -126,12 +126,6 @@ namespace o3tl {
template<> struct typed_flags<ViewOptFlags> : is_typed_flags<ViewOptFlags, 0x01ff> {};
}
-enum class GlyphPositioningMode {
- Classic,
- Layout,
- LayoutAndMatchRender
-};
-
class SW_DLLPUBLIC SwViewOption
{
static Color s_aDocColor; // color of document boundaries
@@ -169,7 +163,6 @@ class SW_DLLPUBLIC SwViewOption
sal_uInt8 m_nPagePreviewRow; // Page Preview Row/Columns.
sal_uInt8 m_nPagePreviewCol; // Page Preview Row/Columns.
SwFillMode m_nShadowCursorFillMode; // FillMode for ShadowCursor.
- GlyphPositioningMode m_eGlyphPositioningMode; // Positioning strategy for screen glyphs
bool m_bReadonly : 1; // Readonly-Doc.
bool m_bStarOneSetting : 1;// Prevent from UI automatics (no scrollbars in readonly documents).
bool m_bIsPagePreview : 1; // The preview mustn't print field/footnote/... shadings.
@@ -433,12 +426,6 @@ public:
void SetPrinting(bool b)
{ SetCore2Option(b, ViewOptCoreFlags2::Printing); }
- GlyphPositioningMode GetGlyphPositioningMode() const
- { return m_eGlyphPositioningMode; }
-
- void SetGlyphPositioningMode(GlyphPositioningMode eMode)
- { m_eGlyphPositioningMode = eMode; }
-
void SetCore2Option(bool b, ViewOptCoreFlags2 f)
{
if (b)
@@ -710,7 +697,6 @@ inline void SwViewOption::SetUIOptions( const SwViewOption& rVOpt )
m_nUIOptions = rVOpt.m_nUIOptions;
m_nTableDestination = rVOpt.m_nTableDestination;
m_nShadowCursorFillMode = rVOpt.m_nShadowCursorFillMode;
- m_eGlyphPositioningMode = rVOpt.m_eGlyphPositioningMode;
}
// Helper function for checking HTML-capabilities.
diff --git a/sw/source/core/inc/scriptinfo.hxx b/sw/source/core/inc/scriptinfo.hxx
index cd479034ed06..cfe9ef3e55fb 100644
--- a/sw/source/core/inc/scriptinfo.hxx
+++ b/sw/source/core/inc/scriptinfo.hxx
@@ -281,8 +281,6 @@ public:
positions in the kerning array.
@param pKernArray
The printers kerning array. Optional.
- @param pScrArray
- The screen kerning array. Optional.
@param nStt
Start referring to the paragraph.
@param nLen
@@ -291,7 +289,7 @@ public:
The value which has to be added to a kashida opportunity.
@return The number of kashida opportunities in the given range
*/
- sal_Int32 KashidaJustify( sal_Int32* pKernArray, sal_Int32* pScrArray,
+ sal_Int32 KashidaJustify( sal_Int32* pKernArray,
TextFrameIndex nStt, TextFrameIndex nLen, tools::Long nSpaceAdd = 0) const;
/** Clears array of kashidas marked as invalid
@@ -354,8 +352,6 @@ public:
The String
@param pKernArray
The printers kerning array. Optional.
- @param pScrArray
- The screen kerning array. Optional.
@param nIdx
Start referring to the paragraph.
@param nLen
@@ -365,7 +361,7 @@ public:
@return The number of extra spaces in the given range
*/
static TextFrameIndex ThaiJustify( const OUString& rText, sal_Int32* pKernArray,
- sal_Int32* pScrArray, TextFrameIndex nIdx,
+ TextFrameIndex nIdx,
TextFrameIndex nLen,
TextFrameIndex nNumberOfBlanks = TextFrameIndex(0),
tools::Long nSpaceAdd = 0 );
@@ -374,7 +370,7 @@ public:
TextFrameIndex nPos, TextFrameIndex nEnd, LanguageType aLang);
static void CJKJustify( const OUString& rText, sal_Int32* pKernArray,
- sal_Int32* pScrArray, TextFrameIndex nStt,
+ TextFrameIndex nStt,
TextFrameIndex nLen, LanguageType aLang,
tools::Long nSpaceAdd, bool bIsSpaceStop );
diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx
index d664602bf3ce..a952ce7649c2 100644
--- a/sw/source/core/text/itradj.cxx
+++ b/sw/source/core/text/itradj.cxx
@@ -122,7 +122,7 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf,
// total number of kashida positions, or the number of kashida positions after some positions
// have been dropped.
// Here we want the clean total, which is OK: We have called ClearKashidaInvalid() before.
- rKashidas = rSI.KashidaJustify ( nullptr, nullptr, rItr.GetStart(), rItr.GetLength() );
+ rKashidas = rSI.KashidaJustify(nullptr, rItr.GetStart(), rItr.GetLength());
if (rKashidas <= 0) // nothing to do
return true;
@@ -147,7 +147,7 @@ static bool lcl_CheckKashidaPositions( SwScriptInfo& rSI, SwTextSizeInfo& rInf,
if (nNext == TextFrameIndex(COMPLETE_STRING) || nNext > nEnd)
nNext = nEnd;
- sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( nullptr, nullptr, nIdx, nNext - nIdx );
+ sal_Int32 nKashidasInAttr = rSI.KashidaJustify(nullptr, nIdx, nNext - nIdx);
if (nKashidasInAttr > 0)
{
// Kashida glyph looks suspicious, skip Kashida justification
@@ -212,7 +212,7 @@ static bool lcl_CheckKashidaWidth ( SwScriptInfo& rSI, SwTextSizeInfo& rInf, SwT
if (nNext == TextFrameIndex(COMPLETE_STRING) || nNext > nEnd)
nNext = nEnd;
- sal_Int32 nKashidasInAttr = rSI.KashidaJustify ( nullptr, nullptr, nIdx, nNext - nIdx );
+ sal_Int32 nKashidasInAttr = rSI.KashidaJustify(nullptr, nIdx, nNext - nIdx);
tools::Long nFontMinKashida = rInf.GetOut()->GetMinKashida();
if ( nFontMinKashida && nKashidasInAttr > 0 && SwScriptInfo::IsArabicText( rInf.GetText(), nIdx, nNext - nIdx ) )
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 3db5d2ab0ac3..bd9d6a0e143c 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -2183,7 +2183,6 @@ tools::Long SwScriptInfo::Compress(sal_Int32* pKernArray, TextFrameIndex nIdx, T
// have been dropped, depending on the state of the m_KashidaInvalid set.
sal_Int32 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
- sal_Int32* pScrArray,
TextFrameIndex const nStt,
TextFrameIndex const nLen,
tools::Long nSpaceAdd ) const
@@ -2253,8 +2252,6 @@ sal_Int32 SwScriptInfo::KashidaJustify( sal_Int32* pKernArray,
while ( nArrayPos < nArrayEnd )
{
pKernArray[ sal_Int32(nArrayPos) ] += nKashAdd;
- if ( pScrArray )
- pScrArray[ sal_Int32(nArrayPos) ] += nKashAdd;
++nArrayPos;
}
nKashAdd += nSpaceAdd;
@@ -2442,7 +2439,7 @@ void SwScriptInfo::MarkKashidasInvalid(sal_Int32 const nCnt,
}
TextFrameIndex SwScriptInfo::ThaiJustify( const OUString& rText, sal_Int32* pKernArray,
- sal_Int32* pScrArray, TextFrameIndex const nStt,
+ TextFrameIndex const nStt,
TextFrameIndex const nLen,
TextFrameIndex nNumberOfBlanks,
tools::Long nSpaceAdd )
@@ -2474,7 +2471,6 @@ TextFrameIndex SwScriptInfo::ThaiJustify( const OUString& rText, sal_Int32* pKer
}
if ( pKernArray ) pKernArray[ nI ] += nSpaceSum;
- if ( pScrArray ) pScrArray[ nI ] += nSpaceSum;
}
return nCnt;
@@ -2775,7 +2771,7 @@ TextFrameIndex SwScriptInfo::CountCJKCharacters(const OUString &rText,
}
void SwScriptInfo::CJKJustify( const OUString& rText, sal_Int32* pKernArray,
- sal_Int32* pScrArray, TextFrameIndex const nStt,
+ TextFrameIndex const nStt,
TextFrameIndex const nLen, LanguageType aLang,
tools::Long nSpaceAdd, bool bIsSpaceStop )
{
@@ -2798,8 +2794,6 @@ void SwScriptInfo::CJKJustify( const OUString& rText, sal_Int32* pKernArray,
nSpaceSum += nSpaceAdd;
}
pKernArray[ nI ] += nSpaceSum;
- if ( pScrArray )
- pScrArray[ nI ] += nSpaceSum;
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 7def7badcc7a..219036aa834d 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -113,7 +113,7 @@ static TextFrameIndex lcl_AddSpace(const SwTextSizeInfo &rInf,
{
if ( SwScriptInfo::IsArabicText( *pStr, nPos, nEnd - nPos ) && pSI->CountKashida() )
{
- const sal_Int32 nKashRes = pSI->KashidaJustify( nullptr, nullptr, nPos, nEnd - nPos );
+ const sal_Int32 nKashRes = pSI->KashidaJustify(nullptr, nPos, nEnd - nPos);
// i60591: need to check result of KashidaJustify
// determine if kashida justification is applicable
if (nKashRes != -1)
@@ -129,7 +129,7 @@ static TextFrameIndex lcl_AddSpace(const SwTextSizeInfo &rInf,
if ( LANGUAGE_THAI == aLang )
{
- nCnt = SwScriptInfo::ThaiJustify( *pStr, nullptr, nullptr, nPos, nEnd - nPos );
+ nCnt = SwScriptInfo::ThaiJustify(*pStr, nullptr, nPos, nEnd - nPos);
const SwLinePortion* pPor = rPor.GetNextPortion();
if ( pPor && ( pPor->IsKernPortion() ||
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 2c5f81a63390..b99408177d0a 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -855,50 +855,6 @@ static void lcl_DrawLineForWrongListData(
rInf.GetOut().Pop();
}
-namespace
-{
- void AdjustKernArray(GlyphPositioningMode eGlyphPositioningMode, sal_Int32 i, tools::Long& rScrPos,
- sal_Unicode cChPrev, sal_Unicode nCh,
- const std::vector<sal_Int32>& rScrArray, std::vector<sal_Int32>& rKernArray,
- int nMul)
- {
- tools::Long nScr = rScrArray[i] - rScrArray[i - 1];
- switch (eGlyphPositioningMode)
- {
- case GlyphPositioningMode::Layout: // <- glyph positioning stable during editing,
- // but at ~90% screen zoom rendering will
- // start to show kerning problems
- case GlyphPositioningMode::LayoutAndMatchRender: // <- glyph positioning stable during editing,
- // and should render nicely at sane zoom levels
- rScrPos = rKernArray[i - 1] + nScr;
- // just accept the print layout positions, this is what editeng does
- // https://freddie.witherden.org/pages/font-rasterisation/#application-requirements
- break;
- case GlyphPositioningMode::Classic: // <- layout unstable during editing, fairly arbitrary glyph
- // positioning depends on zoom
- {
- // https://wiki.openoffice.org/wiki/Writer/WYSIWYG
- if (nCh == CH_BLANK)
- rScrPos = rKernArray[i - 1] + nScr;
- else
- {
- if (cChPrev == CH_BLANK || cChPrev == '-')
- rScrPos = rKernArray[i - 1] + nScr;
- else
- {
- rScrPos += nScr;
-
- const int nDiv = nMul+1;
- rScrPos = (nMul * rScrPos + rKernArray[i]) / nDiv;
- }
- }
- rKernArray[i - 1] = rScrPos - nScr;
- break;
- }
- }
- }
-}
-
void SwFntObj::GetTextArray(const OutputDevice& rDevice, const OUString& rStr, std::vector<sal_Int32>& rDXAry,
sal_Int32 nIndex, sal_Int32 nLen, bool bCaching)
{
@@ -1393,7 +1349,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if (!MsLangId::isKorean(aLang))
{
- SwScriptInfo::CJKJustify( rInf.GetText(), aKernArray.data(), nullptr,
+ SwScriptInfo::CJKJustify( rInf.GetText(), aKernArray.data(),
rInf.GetIdx(), rInf.GetLen(), aLang, nSpaceAdd, rInf.IsSpaceStop() );
bSpecialJust = true;
@@ -1407,7 +1363,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() ) )
{
if ( pSI && pSI->CountKashida() &&
- pSI->KashidaJustify( aKernArray.data(), nullptr, rInf.GetIdx(),
+ pSI->KashidaJustify( aKernArray.data(), rInf.GetIdx(),
rInf.GetLen(), nSpaceAdd ) != -1 )
{
bSpecialJust = true;
@@ -1425,7 +1381,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
{
// Use rInf.GetSpace() because it has more precision than
// nSpaceAdd:
- SwScriptInfo::ThaiJustify( rInf.GetText(), aKernArray.data(), nullptr,
+ SwScriptInfo::ThaiJustify( rInf.GetText(), aKernArray.data(),
rInf.GetIdx(), rInf.GetLen(),
rInf.GetNumberOfBlanks(),
rInf.GetSpace() );
@@ -1534,11 +1490,9 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
else
{
- GlyphPositioningMode eGlyphPositioningMode = rInf.GetShell()->GetViewOptions()->GetGlyphPositioningMode();
const bool bOrigTextRenderModeForResolutionIndependentLayout(rInf.GetOut().GetTextRenderModeForResolutionIndependentLayout());
-
// set text render mode to suit use of resolution independent text layout
- rInf.GetOut().SetTextRenderModeForResolutionIndependentLayout(eGlyphPositioningMode == GlyphPositioningMode::LayoutAndMatchRender);
+ rInf.GetOut().SetTextRenderModeForResolutionIndependentLayout(true);
const OUString* pStr = &rInf.GetText();
@@ -1550,11 +1504,6 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
std::vector<sal_Int32> aKernArray;
CreateScrFont( *rInf.GetShell(), rInf.GetOut() );
- // get screen array
- std::vector<sal_Int32> aScrArray;
- GetTextArray(rInf.GetOut(), rInf.GetText(), aScrArray,
- sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()), true);
-
// OLE: no printer available
// OSL_ENSURE( pPrinter, "DrawText needs pPrinter" )
if ( m_pPrinter )
@@ -1570,12 +1519,8 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
}
else
{
-#ifndef NDEBUG
GetTextArray(rInf.GetOut(), rInf.GetText(), aKernArray,
- sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()), false);
- assert(aKernArray == aScrArray);
-#endif
- aKernArray = aScrArray;
+ sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()), true);
}
// Modify Printer and ScreenArrays for special justifications
@@ -1593,10 +1538,6 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
pSI && pSI->CountCompChg() &&
lcl_IsMonoSpaceFont( rInf.GetOut() ) )
{
- Point aTmpPos( aTextOriginPos );
- pSI->Compress( aScrArray.data(), rInf.GetIdx(), rInf.GetLen(),
- rInf.GetKanaComp(),
- o3tl::narrowing<sal_uInt16>(m_aFont.GetFontSize().Height()), lcl_IsFullstopCentered( rInf.GetOut() ), &aTmpPos );
pSI->Compress( aKernArray.data(), rInf.GetIdx(), rInf.GetLen(),
rInf.GetKanaComp(),
o3tl::narrowing<sal_uInt16>(m_aFont.GetFontSize().Height()), lcl_IsFullstopCentered( rInf.GetOut() ), &aTextOriginPos );
@@ -1609,7 +1550,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if (!MsLangId::isKorean(aLang))
{
- SwScriptInfo::CJKJustify( rInf.GetText(), aKernArray.data(), aScrArray.data(),
+ SwScriptInfo::CJKJustify( rInf.GetText(), aKernArray.data(),
rInf.GetIdx(), rInf.GetLen(), aLang, nSpaceAdd, rInf.IsSpaceStop() );
nSpaceAdd = 0;
@@ -1622,7 +1563,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() ) )
{
if ( pSI && pSI->CountKashida() &&
- pSI->KashidaJustify( aKernArray.data(), aScrArray.data(), rInf.GetIdx(),
+ pSI->KashidaJustify( aKernArray.data(), rInf.GetIdx(),
rInf.GetLen(), nSpaceAdd ) != -1 )
nSpaceAdd = 0;
else
@@ -1638,7 +1579,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
if ( LANGUAGE_THAI == aLang )
{
SwScriptInfo::ThaiJustify( rInf.GetText(), aKernArray.data(),
- aScrArray.data(), rInf.GetIdx(),
+ rInf.GetIdx(),
rInf.GetLen(),
rInf.GetNumberOfBlanks(),
rInf.GetSpace() );
@@ -1649,8 +1590,6 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
}
}
- tools::Long nScrPos = aScrArray[ 0 ];
-
if( bBullet )
{
// !!! HACK !!!
@@ -1722,10 +1661,6 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
}
else
{
- // In case of Pair Kerning the printer influence on the positioning
- // grows
- const int nMul = m_pPrtFont->GetKerning() != FontKerning::NONE ? 1 : 3;
-
// nSpaceSum contains the sum of the intermediate space distributed
// among Spaces by the Justification.
// The Spaces themselves will be positioned in the middle of the
@@ -1745,7 +1680,6 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf )
for (sal_Int32 i = 1; i < sal_Int32(nCnt); ++i, nKernSum += rInf.GetKern())
{
sal_Unicode nCh = rInf.GetText()[sal_Int32(rInf.GetIdx()) + i];
- AdjustKernArray(eGlyphPositioningMode, i, nScrPos, cChPrev, nCh, aScrArray, aKernArray, nMul);
// Apply SpaceSum
if (cChPrev == CH_BLANK)
@@ -2055,45 +1989,7 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf )
else
rInf.SetKanaDiff( 0 );
- if ( rInf.GetKanaDiff() )
- {
- aTextSize.setWidth(aKernArray[sal_Int32(nLn) - 1]);
- }
- else
- {
- GlyphPositioningMode eGlyphPositioningMode = rInf.GetShell()->GetViewOptions()->GetGlyphPositioningMode();
- if (eGlyphPositioningMode == GlyphPositioningMode::Classic)
- {
- std::vector<sal_Int32> aScrArray;
- GetTextArray(rInf.GetOut(), rInf.GetText(), aScrArray,
- sal_Int32(rInf.GetIdx()), sal_Int32(rInf.GetLen()), false);
- tools::Long nScrPos = aScrArray[ 0 ];
- TextFrameIndex nCnt(rInf.GetText().getLength());
- if ( nCnt < rInf.GetIdx() )
- nCnt = TextFrameIndex(0); // assert???
- else
- nCnt = nCnt - rInf.GetIdx();
- nCnt = std::min(nCnt, nLn);
- sal_Unicode nChPrev = rInf.GetText()[ sal_Int32(rInf.GetIdx()) ];
-
- // In case of Pair Kerning the printer influence on the positioning
- // grows
- const int nMul = m_pPrtFont->GetKerning() != FontKerning::NONE ? 1 : 3;
-
- for (sal_Int32 i = 1; i < sal_Int32(nCnt); i++)
- {
- sal_Unicode nCh = rInf.GetText()[sal_Int32(rInf.GetIdx()) + i];
- AdjustKernArray(eGlyphPositioningMode, i, nScrPos, nChPrev, nCh, aScrArray, aKernArray, nMul);
- nChPrev = nCh;
- }
-
- aTextSize.setWidth( nScrPos );
- }
- else
- {
- aTextSize.setWidth(aKernArray[sal_Int32(nLn) - 1]);
- }
- }
+ aTextSize.setWidth(aKernArray[sal_Int32(nLn) - 1]);
}
else
{
@@ -2177,7 +2073,7 @@ TextFrameIndex SwFntObj::GetModelPositionForViewPoint(SwDrawTextInfo &rInf)
if (!MsLangId::isKorean(aLang))
{
- SwScriptInfo::CJKJustify( rInf.GetText(), aKernArray.data(), nullptr,
+ SwScriptInfo::CJKJustify( rInf.GetText(), aKernArray.data(),
rInf.GetIdx(), rInf.GetLen(), aLang, nSpaceAdd, rInf.IsSpaceStop() );
nSpaceAdd = 0;
@@ -2191,7 +2087,7 @@ TextFrameIndex SwFntObj::GetModelPositionForViewPoint(SwDrawTextInfo &rInf)
if ( SwScriptInfo::IsArabicText( rInf.GetText(), rInf.GetIdx(), rInf.GetLen() ) )
{
if ( pSI && pSI->CountKashida() &&
- pSI->KashidaJustify( aKernArray.data(), nullptr, rInf.GetIdx(), rInf.GetLen(),
+ pSI->KashidaJustify( aKernArray.data(), rInf.GetIdx(), rInf.GetLen(),
nSpaceAdd ) != -1 )
nSpaceAdd = 0;
}
@@ -2204,7 +2100,7 @@ TextFrameIndex SwFntObj::GetModelPositionForViewPoint(SwDrawTextInfo &rInf)
if ( LANGUAGE_THAI == aLang )
{
- SwScriptInfo::ThaiJustify( rInf.GetText(), aKernArray.data(), nullptr,
+ SwScriptInfo::ThaiJustify( rInf.GetText(), aKernArray.data(),
rInf.GetIdx(), rInf.GetLen(),
rInf.GetNumberOfBlanks(),
rInf.GetSpace() );
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index 6cfe9b99d1c6..30a3c4cac6e4 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -91,7 +91,6 @@ SwContentOptPage::SwContentOptPage(weld::Container* pPage, weld::DialogControlle
, m_xVRulerRightCBox(m_xBuilder->weld_check_button("vrulerright"))
, m_xVMetric(m_xBuilder->weld_combo_box("vrulercombobox"))
, m_xSmoothCBox(m_xBuilder->weld_check_button("smoothscroll"))
- , m_xGlyphPosModeLB(m_xBuilder->weld_combo_box("glyphposmode"))
, m_xGrfCB(m_xBuilder->weld_check_button("graphics"))
, m_xTableCB(m_xBuilder->weld_check_button("tables"))
, m_xDrwCB(m_xBuilder->weld_check_button("drawings"))
@@ -220,7 +219,6 @@ void SwContentOptPage::Reset(const SfxItemSet* rSet)
m_xShowChangesInMargin->set_active(pElemAttr->m_bShowChangesInMargin);
m_xFieldHiddenCB->set_active( pElemAttr->m_bFieldHiddenText );
m_xFieldHiddenParaCB->set_active( pElemAttr->m_bShowHiddenPara );
- m_xGlyphPosModeLB->set_active(static_cast<int>(pElemAttr->m_eGlyphPositioningMode));
}
m_xMetricLB->set_active(-1);
lcl_SelectMetricLB(*m_xMetricLB, SID_ATTR_METRIC, *rSet);
@@ -248,7 +246,6 @@ bool SwContentOptPage::FillItemSet(SfxItemSet* rSet)
aElem.m_bShowChangesInMargin = m_xShowChangesInMargin->get_active();
aElem.m_bFieldHiddenText = m_xFieldHiddenCB->get_active();
aElem.m_bShowHiddenPara = m_xFieldHiddenParaCB->get_active();
- aElem.m_eGlyphPositioningMode = static_cast<GlyphPositioningMode>(m_xGlyphPosModeLB->get_active());
bool bRet = !pOldAttr || aElem != *pOldAttr;
if(bRet)
diff --git a/sw/source/uibase/config/cfgitems.cxx b/sw/source/uibase/config/cfgitems.cxx
index 39f4d43d63bf..e32c86e14c52 100644
--- a/sw/source/uibase/config/cfgitems.cxx
+++ b/sw/source/uibase/config/cfgitems.cxx
@@ -104,7 +104,6 @@ SwElemItem::SwElemItem() :
m_bShowChangesInMargin =
m_bFieldHiddenText =
m_bShowHiddenPara = false;
- m_eGlyphPositioningMode = GlyphPositioningMode::Classic;
}
SwElemItem::SwElemItem(const SwViewOption& rVOpt) :
@@ -124,7 +123,6 @@ SwElemItem::SwElemItem(const SwViewOption& rVOpt) :
m_bShowChangesInMargin = rVOpt.IsShowChangesInMargin();
m_bFieldHiddenText = rVOpt.IsShowHiddenField();
m_bShowHiddenPara = rVOpt.IsShowHiddenPara();
- m_eGlyphPositioningMode = rVOpt.GetGlyphPositioningMode();
}
SwElemItem* SwElemItem::Clone( SfxItemPool* ) const
@@ -151,8 +149,7 @@ bool SwElemItem::operator==( const SfxPoolItem& rAttr ) const
m_bTreatSubOutlineLevelsAsContent == rItem.m_bTreatSubOutlineLevelsAsContent &&
m_bShowChangesInMargin == rItem.m_bShowChangesInMargin &&
m_bFieldHiddenText == rItem.m_bFieldHiddenText &&
- m_bShowHiddenPara == rItem.m_bShowHiddenPara &&
- m_eGlyphPositioningMode == rItem.m_eGlyphPositioningMode);
+ m_bShowHiddenPara == rItem.m_bShowHiddenPara);
}
void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const
@@ -172,7 +169,6 @@ void SwElemItem::FillViewOptions( SwViewOption& rVOpt) const
rVOpt.SetShowChangesInMargin( m_bShowChangesInMargin );
rVOpt.SetShowHiddenField(m_bFieldHiddenText );
rVOpt.SetShowHiddenPara(m_bShowHiddenPara );
- rVOpt.SetGlyphPositioningMode(m_eGlyphPositioningMode);
}
// CTOR for empty Item
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index ed33926492eb..45590d5e0b8a 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -259,22 +259,21 @@ Sequence<OUString> SwLayoutViewConfig::GetPropertyNames() const
"Window/HorizontalRulerUnit", // 6
"Window/VerticalRulerUnit", // 7
"Window/SmoothScroll", // 8
- "Window/GlyphPositioningMode", // 9
- "Zoom/Value", //10
- "Zoom/Type", //11
- "Other/IsAlignMathObjectsToBaseline", //12
- "Other/MeasureUnit", //13
+ "Zoom/Value", // 9
+ "Zoom/Type", //10
+ "Other/IsAlignMathObjectsToBaseline", //11
+ "Other/MeasureUnit", //12
// below properties are not available in WriterWeb
- "Other/TabStop", //14
- "Window/IsVerticalRulerRight", //15
- "ViewLayout/Columns", //16
- "ViewLayout/BookMode", //17
- "Other/IsSquaredPageMode", //18
- "Other/ApplyCharUnit", //19
- "Window/ShowScrollBarTips", //20
- "ViewLayout/HideWhitespace", //21
+ "Other/TabStop", //13
+ "Window/IsVerticalRulerRight", //14
+ "ViewLayout/Columns", //15
+ "ViewLayout/BookMode", //16
+ "Other/IsSquaredPageMode", //17
+ "Other/ApplyCharUnit", //18
+ "Window/ShowScrollBarTips", //19
+ "ViewLayout/HideWhitespace", //20
};
- const int nCount = m_bWeb ? 14 : 22;
+ const int nCount = m_bWeb ? 13 : 21;
Sequence<OUString> aNames(nCount);
OUString* pNames = aNames.getArray();
for(int i = 0; i < nCount; i++)
@@ -325,19 +324,18 @@ void SwLayoutViewConfig::ImplCommit()
rVal <<= static_cast<sal_Int32>(m_rParent.m_eVScrollMetric); // "Window/VerticalRulerUnit"
break;
case 8: rVal <<= m_rParent.IsSmoothScroll(); break; // "Window/SmoothScroll",
- case 9: rVal <<= static_cast<sal_Int32>(m_rParent.GetGlyphPositioningMode()); break; // "Window/GlyphPositioningMode",
- case 10: rVal <<= static_cast<sal_Int32>(m_rParent.GetZoom()); break; // "Zoom/Value",
- case 11: rVal <<= static_cast<sal_Int32>(m_rParent.GetZoomType()); break; // "Zoom/Type",
- case 12: rVal <<= m_rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline"
- case 13: rVal <<= static_cast<sal_Int32>(m_rParent.GetMetric()); break; // "Other/MeasureUnit",
- case 14: rVal <<= m_rParent.GetDefTabInMm100(); break;// "Other/TabStop",
- case 15: rVal <<= m_rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight",
- case 16: rVal <<= static_cast<sal_Int32>(m_rParent.GetViewLayoutColumns()); break; // "ViewLayout/Columns",
- case 17: rVal <<= m_rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode",
- case 18: rVal <<= m_rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode",
- case 19: rVal <<= m_rParent.IsApplyCharUnit(); break; // "Other/ApplyCharUnit",
- case 20: rVal <<= m_rParent.IsShowScrollBarTips(); break; // "Window/ShowScrollBarTips",
- case 21: rVal <<= m_rParent.IsHideWhitespaceMode(); break; // "ViewLayout/HideWhitespace"
+ case 9: rVal <<= static_cast<sal_Int32>(m_rParent.GetZoom()); break; // "Zoom/Value",
+ case 10: rVal <<= static_cast<sal_Int32>(m_rParent.GetZoomType()); break; // "Zoom/Type",
+ case 11: rVal <<= m_rParent.IsAlignMathObjectsToBaseline(); break; // "Other/IsAlignMathObjectsToBaseline"
+ case 12: rVal <<= static_cast<sal_Int32>(m_rParent.GetMetric()); break; // "Other/MeasureUnit",
+ case 13: rVal <<= m_rParent.GetDefTabInMm100(); break;// "Other/TabStop",
+ case 14: rVal <<= m_rParent.IsVRulerRight(); break; // "Window/IsVerticalRulerRight",
+ case 15: rVal <<= static_cast<sal_Int32>(m_rParent.GetViewLayoutColumns()); break; // "ViewLayout/Columns",
+ case 16: rVal <<= m_rParent.IsViewLayoutBookMode(); break; // "ViewLayout/BookMode",
+ case 17: rVal <<= m_rParent.IsSquaredPageMode(); break; // "Other/IsSquaredPageMode",
+ case 18: rVal <<= m_rParent.IsApplyCharUnit(); break; // "Other/ApplyCharUnit",
+ case 19: rVal <<= m_rParent.IsShowScrollBarTips(); break; // "Window/ShowScrollBarTips",
+ case 20: rVal <<= m_rParent.IsHideWhitespaceMode(); break; // "ViewLayout/HideWhitespace"
}
}
PutProperties(aNames, aValues);
@@ -382,19 +380,18 @@ void SwLayoutViewConfig::Load()
}
break;
case 8: m_rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll",
- case 9: m_rParent.SetGlyphPositioningMode(static_cast<GlyphPositioningMode>(nInt32Val)); break;// "Window/GlyphPositioningMode",
- case 10: m_rParent.SetZoom( static_cast< sal_uInt16 >(nInt32Val) ); break;// "Zoom/Value",
- case 11: m_rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type",
- case 12: m_rParent.SetAlignMathObjectsToBaseline(bSet, true); break;// "Other/IsAlignMathObjectsToBaseline"
- case 13: m_rParent.SetMetric(static_cast<FieldUnit>(nInt32Val), true); break;// "Other/MeasureUnit",
- case 14: m_rParent.SetDefTabInMm100(nInt32Val, true); break;// "Other/TabStop",
- case 15: m_rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight",
- case 16: m_rParent.SetViewLayoutColumns( o3tl::narrowing<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns",
- case 17: m_rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode",
- case 18: m_rParent.SetDefaultPageMode(bSet,true); break;// "Other/IsSquaredPageMode",
- case 19: m_rParent.SetApplyCharUnit(bSet, true); break;// "Other/ApplyUserChar"
- case 20: m_rParent.SetShowScrollBarTips(bSet); break;// "Window/ShowScrollBarTips",
- case 21: m_rParent.SetHideWhitespaceMode(bSet); break;// "ViewLayout/HideWhitespace"
+ case 9: m_rParent.SetZoom( static_cast< sal_uInt16 >(nInt32Val) ); break;// "Zoom/Value",
+ case 10: m_rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type",
+ case 11: m_rParent.SetAlignMathObjectsToBaseline(bSet, true); break;// "Other/IsAlignMathObjectsToBaseline"
+ case 12: m_rParent.SetMetric(static_cast<FieldUnit>(nInt32Val), true); break;// "Other/MeasureUnit",
+ case 13: m_rParent.SetDefTabInMm100(nInt32Val, true); break;// "Other/TabStop",
+ case 14: m_rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight",
+ case 15: m_rParent.SetViewLayoutColumns( o3tl::narrowing<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns",
+ case 16: m_rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode",
+ case 17: m_rParent.SetDefaultPageMode(bSet,true); break;// "Other/IsSquaredPageMode",
+ case 18: m_rParent.SetApplyCharUnit(bSet, true); break;// "Other/ApplyUserChar"
+ case 29: m_rParent.SetShowScrollBarTips(bSet); break;// "Window/ShowScrollBarTips",
+ case 20: m_rParent.SetHideWhitespaceMode(bSet); break;// "ViewLayout/HideWhitespace"
}
}
}
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 12a7336f62ad..66ea4daa05f4 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -166,7 +166,6 @@ SwViewOption::SwViewOption() :
m_nPagePreviewRow( 1 ),
m_nPagePreviewCol( 2 ),
m_nShadowCursorFillMode( SwFillMode::Tab ),
- m_eGlyphPositioningMode( GlyphPositioningMode::Classic ),
m_bReadonly(false),
m_bStarOneSetting(false),
m_bIsPagePreview(false),
@@ -254,7 +253,6 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
m_aRetouchColor = rVOpt.GetRetoucheColor();
m_sSymbolFont = rVOpt.m_sSymbolFont;
m_nShadowCursorFillMode = rVOpt.m_nShadowCursorFillMode;
- m_eGlyphPositioningMode = rVOpt.m_eGlyphPositioningMode;
m_bStarOneSetting = rVOpt.m_bStarOneSetting;
mbBookView = rVOpt.mbBookView;
mbBrowseMode = rVOpt.mbBrowseMode;
@@ -297,7 +295,6 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
m_aRetouchColor = rVOpt.GetRetoucheColor();
m_sSymbolFont = rVOpt.m_sSymbolFont;
m_nShadowCursorFillMode = rVOpt.m_nShadowCursorFillMode;
- m_eGlyphPositioningMode = rVOpt.m_eGlyphPositioningMode;
m_bStarOneSetting = rVOpt.m_bStarOneSetting;
mbBookView = rVOpt.mbBookView;
mbBrowseMode = rVOpt.mbBrowseMode;
diff --git a/sw/source/uibase/inc/cfgitems.hxx b/sw/source/uibase/inc/cfgitems.hxx
index 18ffc5c9b40b..34ffa2d24e12 100644
--- a/sw/source/uibase/inc/cfgitems.hxx
+++ b/sw/source/uibase/inc/cfgitems.hxx
@@ -35,7 +35,6 @@ class SwViewShell;
class SwViewOption;
class SwContentOptPage;
class SwShdwCursorOptionsTabPage;
-enum class GlyphPositioningMode;
enum class SwFillMode;
/// Item for settings dialog - document view
@@ -85,8 +84,6 @@ class SW_DLLPUBLIC SwElemItem final : public SfxPoolItem
bool m_bFieldHiddenText :1;
bool m_bShowHiddenPara :1;
- GlyphPositioningMode m_eGlyphPositioningMode;
-
friend class SwContentOptPage;
public:
diff --git a/sw/source/uibase/inc/optpage.hxx b/sw/source/uibase/inc/optpage.hxx
index e7a6fe34b1fb..99e24ed7f487 100644
--- a/sw/source/uibase/inc/optpage.hxx
+++ b/sw/source/uibase/inc/optpage.hxx
@@ -42,7 +42,6 @@ class SwContentOptPage final : public SfxTabPage
std::unique_ptr<weld::CheckButton> m_xVRulerRightCBox;
std::unique_ptr<weld::ComboBox> m_xVMetric;
std::unique_ptr<weld::CheckButton> m_xSmoothCBox;
- std::unique_ptr<weld::ComboBox> m_xGlyphPosModeLB;
std::unique_ptr<weld::CheckButton> m_xGrfCB;
std::unique_ptr<weld::CheckButton> m_xTableCB;
diff --git a/sw/uiconfig/swriter/ui/viewoptionspage.ui b/sw/uiconfig/swriter/ui/viewoptionspage.ui
index e74d9d270b39..b3e071bf04ec 100644
--- a/sw/uiconfig/swriter/ui/viewoptionspage.ui
+++ b/sw/uiconfig/swriter/ui/viewoptionspage.ui
@@ -357,7 +357,7 @@
<property name="label-xalign">0</property>
<property name="shadow-type">none</property>
<child>
- <!-- n-columns=1 n-rows=3 -->
+ <!-- n-columns=1 n-rows=2 -->
<object class="GtkGrid" id="grid4">
<property name="visible">True</property>
<property name="can-focus">False</property>
@@ -494,49 +494,6 @@
<property name="top-attach">0</property>
</packing>
</child>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="glyphposlabel">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="label" translatable="yes" context="viewoptionspage|glyphposlabel">Glyph positioning:</property>
- <property name="use-underline">True</property>
- <property name="mnemonic-widget">glyphposmode</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkComboBoxText" id="glyphposmode">
- <property name="visible">True</property>
- <property name="can-focus">False</property>
- <property name="hexpand">True</property>
- <property name="active">0</property>
- <items>
- <item translatable="yes" context="viewoptionspage|glyphposmode">Classic</item>
- <item translatable="yes" context="viewoptionspage|glyphposmode">Layout</item>
- <item translatable="yes" context="viewoptionspage|glyphposmode">Layout &amp; Match Render</item>
- </items>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left-attach">0</property>
- <property name="top-attach">2</property>
- </packing>
- </child>
</object>
</child>
<child type="label">
@@ -714,7 +671,6 @@
<widgets>
<widget name="vruler"/>
<widget name="hruler"/>
- <widget name="glyphposlabel"/>
<widget name="measureunitlabel"/>
</widgets>
</object>