svdotxat.cxx (c0739476) svdotxat.cxx (26734c99)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 61 unchanged lines hidden (view full) ---

70// Attribute, StyleSheets und AutoGrow
71//
72////////////////////////////////////////////////////////////////////////////////////////////////////
73
74FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, FASTBOOL bWdt) const
75{
76 if (bTextFrame && pModel!=NULL && !rR.IsEmpty())
77 {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 61 unchanged lines hidden (view full) ---

70// Attribute, StyleSheets und AutoGrow
71//
72////////////////////////////////////////////////////////////////////////////////////////////////////
73
74FASTBOOL SdrTextObj::AdjustTextFrameWidthAndHeight(Rectangle& rR, FASTBOOL bHgt, FASTBOOL bWdt) const
75{
76 if (bTextFrame && pModel!=NULL && !rR.IsEmpty())
77 {
78 SdrFitToSizeType eFit=GetFitToSize();
79 FASTBOOL bFitToSize=(eFit==SDRTEXTFIT_PROPORTIONAL || eFit==SDRTEXTFIT_ALLLINES);
78 FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth();
79 FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight();
80 SdrTextAniKind eAniKind=GetTextAniKind();
81 SdrTextAniDirection eAniDir=GetTextAniDirection();
82 FASTBOOL bScroll=eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE;
83 FASTBOOL bHScroll=bScroll && (eAniDir==SDRTEXTANI_LEFT || eAniDir==SDRTEXTANI_RIGHT);
84 FASTBOOL bVScroll=bScroll && (eAniDir==SDRTEXTANI_UP || eAniDir==SDRTEXTANI_DOWN);
80 FASTBOOL bWdtGrow=bWdt && IsAutoGrowWidth();
81 FASTBOOL bHgtGrow=bHgt && IsAutoGrowHeight();
82 SdrTextAniKind eAniKind=GetTextAniKind();
83 SdrTextAniDirection eAniDir=GetTextAniDirection();
84 FASTBOOL bScroll=eAniKind==SDRTEXTANI_SCROLL || eAniKind==SDRTEXTANI_ALTERNATE || eAniKind==SDRTEXTANI_SLIDE;
85 FASTBOOL bHScroll=bScroll && (eAniDir==SDRTEXTANI_LEFT || eAniDir==SDRTEXTANI_RIGHT);
86 FASTBOOL bVScroll=bScroll && (eAniDir==SDRTEXTANI_UP || eAniDir==SDRTEXTANI_DOWN);
85 if (!GetFitToSize() && (bWdtGrow || bHgtGrow))
87 if (!bFitToSize && (bWdtGrow || bHgtGrow))
86 {
87 Rectangle aR0(rR);
88 long nHgt=0,nMinHgt=0,nMaxHgt=0;
89 long nWdt=0,nMinWdt=0,nMaxWdt=0;
90 Size aSiz(rR.GetSize()); aSiz.Width()--; aSiz.Height()--;
91 Size aMaxSiz(100000,100000);
92 Size aTmpSiz(pModel->GetMaxObjSize());
93 if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();

--- 363 unchanged lines hidden ---
88 {
89 Rectangle aR0(rR);
90 long nHgt=0,nMinHgt=0,nMaxHgt=0;
91 long nWdt=0,nMinWdt=0,nMaxWdt=0;
92 Size aSiz(rR.GetSize()); aSiz.Width()--; aSiz.Height()--;
93 Size aMaxSiz(100000,100000);
94 Size aTmpSiz(pModel->GetMaxObjSize());
95 if (aTmpSiz.Width()!=0) aMaxSiz.Width()=aTmpSiz.Width();

--- 363 unchanged lines hidden ---