[Libreoffice-commits] .: sdext/source
Norbert Thiebaud
nthiebaud at kemper.freedesktop.org
Sun Nov 21 10:28:55 PST 2010
sdext/source/pdfimport/tree/drawtreevisiting.cxx | 37 -----------------------
1 file changed, 1 insertion(+), 36 deletions(-)
New commits:
commit 044da132a089752a2ae0d12c3588994f3eacdc13
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Sun Nov 21 12:28:25 2010 -0600
remove 'busy' code (code that consume cpu to produce unused result)
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index bb6c6c6..c194985 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -120,15 +120,6 @@ void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::cons
rtl::OUString str(elem.Text.getStr());
- // Check for CTL
- bool isComplex = false;
- for(int i=0; i< elem.Text.getLength(); i++)
- {
- sal_Int16 nType = GetBreakIterator()->getScriptType( str, i + 1);
- if (nType == ::com::sun::star::i18n::ScriptType::COMPLEX)
- isComplex = true;
- }
-
m_rEmitContext.rEmitter.beginTag( "text:span", aProps );
for(int i=0; i< elem.Text.getLength(); i++)
@@ -688,13 +679,7 @@ void DrawXmlOptimizer::optimizeTextElements(Element& rParent)
std::list< Element* >::iterator next = rParent.Children.begin();
std::list< Element* >::iterator it = next++;
FrameElement* pFrame = dynamic_cast<FrameElement*>(rParent.Parent);
- bool bRotatedFrame = false;
- if( pFrame )
- {
- const GraphicsContext& rFrameGC = m_rProcessor.getGraphicsContext( pFrame->GCId );
- if( rFrameGC.isRotatedOrSkewed() )
- bRotatedFrame = true;
- }
+
while( next != rParent.Children.end() )
{
bool bConcat = false;
@@ -907,26 +892,6 @@ void DrawXmlFinalizer::visit( ParagraphElement& elem, const std::list< Element*
elem.StyleId = m_rStyleContainer.getStyleId( aStyle );
- // update page boundaries
- if( elem.Parent )
- {
- // check for center alignement
- // criterion: paragraph is small relative to parent and distributed around its center
- double p_x = elem.Parent->x;
- double p_y = elem.Parent->y;
- double p_w = elem.Parent->w;
- double p_h = elem.Parent->h;
-
- PageElement* pPage = dynamic_cast<PageElement*>(elem.Parent);
- if( pPage )
- {
- p_x += pPage->LeftMargin;
- p_y += pPage->TopMargin;
- p_w -= pPage->LeftMargin+pPage->RightMargin;
- p_h -= pPage->TopMargin+pPage->BottomMargin;
- }
- }
-
elem.applyToChildren(*this);
}
More information about the Libreoffice-commits
mailing list